teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

6

エラーを追加

2021/10/30 02:29

投稿

shohei_mlb
shohei_mlb

スコア9

title CHANGED
File without changes
body CHANGED
@@ -46,7 +46,7 @@
46
46
  /Users/my_name/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bcrypt-3.1.16/lib/bcrypt_ext.bundle: mach-o, but wrong architecture - /Users/my_name/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bcrypt-3.1.16/lib/bcrypt_ext.bundle:
47
47
 
48
48
  Started POST "/__better_errors/30db173a3c039884/variables" for 127.0.0.1 at 2021-10-25 09:45:40 +0900
49
-
49
+ Since there is no EDITOR or BETTER_ERRORS_EDITOR environment variable, using Textmate by default.
50
50
  ```
51
51
 
52
52
  ■補足

5

gemfileを追加

2021/10/30 02:29

投稿

shohei_mlb
shohei_mlb

スコア9

title CHANGED
File without changes
body CHANGED
@@ -54,6 +54,72 @@
54
54
  「gem 'bcrypt', '~> 3.1.7'」はコメントアウトされたままだが、「bcrypt (3.1.16)」はインストールされている。
55
55
   →おそらく、deviseインストール時に自動でbcryptがインストールされたと思われます。
56
56
 
57
+ ■Gemfile
58
+ ```Ruby
59
+ source 'https://rubygems.org'
60
+ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
61
+
62
+ ruby '3.0.0'
63
+
64
+ # Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main'
65
+ gem 'rails', '~> 6.1.4', '>= 6.1.4.1'
66
+ # Use sqlite3 as the database for Active Record
67
+ gem 'sqlite3', '~> 1.4'
68
+ # Use Puma as the app server
69
+ gem 'puma', '~> 5.0'
70
+ # Use SCSS for stylesheets
71
+ gem 'sass-rails', '>= 6'
72
+ # Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
73
+ gem 'webpacker', '~> 5.0'
74
+ # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
75
+ gem 'turbolinks', '~> 5'
76
+ # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
77
+ gem 'jbuilder', '~> 2.7'
78
+ # Use Redis adapter to run Action Cable in production
79
+ # gem 'redis', '~> 4.0'
80
+ # Use Active Model has_secure_password
81
+ # gem 'bcrypt', '~> 3.1.7'
82
+ # gem 'bcrypt-ruby', '3.1.5', :require => 'bcrypt'
83
+
84
+ # Use Active Storage variant
85
+ # gem 'image_processing', '~> 1.2'
86
+
87
+ # Reduces boot times through caching; required in config/boot.rb
88
+ gem 'bootsnap', '>= 1.4.4', require: false
89
+
90
+ gem 'devise'
91
+
92
+ group :development, :test do
93
+ # Call 'byebug' anywhere in the code to stop execution and get a debugger console
94
+ gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
95
+ end
96
+
97
+ group :development do
98
+ # Access an interactive console on exception pages or by calling 'console' anywhere in the code.
99
+ gem 'web-console', '>= 4.1.0'
100
+ # Display performance information such as SQL time and flame graphs for each request in your browser.
101
+ # Can be configured to work on production as well see: https://github.com/MiniProfiler/rack-mini-profiler/blob/master/README.md
102
+ gem 'rack-mini-profiler', '~> 2.0'
103
+ gem 'listen', '~> 3.3'
104
+ # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
105
+ gem 'spring'
106
+ gem 'better_errors'
107
+ gem 'binding_of_caller'
108
+ end
109
+
110
+ group :test do
111
+ # Adds support for Capybara system testing and selenium driver
112
+ gem 'capybara', '>= 3.26'
113
+ gem 'selenium-webdriver'
114
+ # Easy installation and use of web drivers to run system tests with browsers
115
+ gem 'webdrivers'
116
+ end
117
+
118
+ # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
119
+ gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
120
+
121
+ ```
122
+
57
123
  ■やったこと1
58
124
  「/Users/my_name/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bcrypt-3.1.16/lib/bcrypt_ext.bundle」を削除したが、
59
125
  同様のエラーが発生した。

4

やったことを追加

2021/10/30 02:07

投稿

shohei_mlb
shohei_mlb

スコア9

title CHANGED
File without changes
body CHANGED
@@ -54,8 +54,12 @@
54
54
  「gem 'bcrypt', '~> 3.1.7'」はコメントアウトされたままだが、「bcrypt (3.1.16)」はインストールされている。
55
55
   →おそらく、deviseインストール時に自動でbcryptがインストールされたと思われます。
56
56
 
57
- ■やったこと
57
+ ■やったこと1
58
58
  「/Users/my_name/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bcrypt-3.1.16/lib/bcrypt_ext.bundle」を削除したが、
59
59
  同様のエラーが発生した。
60
60
 
61
+ ■やったこと2
62
+ 「rbenv uninstall bcrypt」を実行したが、「rbenv: version `bcrypt' not installed」となり、
63
+ bcryptはインストールされていなかった。
64
+
61
65
  以上、ご教授いただけますと幸いです。

3

エラー内容を追加

2021/10/30 01:51

投稿

shohei_mlb
shohei_mlb

スコア9

title CHANGED
File without changes
body CHANGED
@@ -22,10 +22,31 @@
22
22
 
23
23
  ■エラー内容
24
24
  ```ruby
25
+ Started GET "/users/sign_up" for 127.0.0.1 at 2021-10-25 09:45:00 +0900
26
+ Processing by Devise::RegistrationsController#new as HTML
27
+ Rendering layout layouts/application.html.erb
28
+ Rendering users/registrations/new.html.erb within layouts/application
29
+ Rendered users/shared/_error_messages.html.erb (Duration: 0.9ms | Allocations: 223)
30
+ Rendered users/shared/_links.html.erb (Duration: 1.2ms | Allocations: 533)
31
+ Rendered users/registrations/new.html.erb within layouts/application (Duration: 13.3ms | Allocations: 5339)
32
+ [Webpacker] Everything's up-to-date. Nothing to do
33
+ Rendered layout layouts/application.html.erb (Duration: 21.0ms | Allocations: 10257)
34
+ Completed 200 OK in 45ms (Views: 25.2ms | ActiveRecord: 1.2ms | Allocations: 20580)
35
+
36
+
37
+ Started POST "/users" for 127.0.0.1 at 2021-10-25 09:45:40 +0900
38
+ Processing by Devise::RegistrationsController#create as HTML
39
+ Parameters: {"authenticity_token"=>"[FILTERED]", "user"=>{"user_name"=>"test9999", "email"=>"test9999@gmail.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "commit"=>"Sign up"}
40
+ Completed 500 Internal Server Error in 28ms (ActiveRecord: 0.0ms | Allocations: 6201)
41
+
42
+
43
+
25
44
  LoadError - dlopen(/Users/my_name/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bcrypt-3.1.16/lib/bcrypt_ext.bundle, 9): no suitable image found. Did find:
26
45
  /Users/my_name/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bcrypt-3.1.16/lib/bcrypt_ext.bundle: mach-o, but wrong architecture
27
46
  /Users/my_name/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bcrypt-3.1.16/lib/bcrypt_ext.bundle: mach-o, but wrong architecture - /Users/my_name/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bcrypt-3.1.16/lib/bcrypt_ext.bundle:
28
47
 
48
+ Started POST "/__better_errors/30db173a3c039884/variables" for 127.0.0.1 at 2021-10-25 09:45:40 +0900
49
+
29
50
  ```
30
51
 
31
52
  ■補足

2

誤字の編集

2021/10/30 01:49

投稿

shohei_mlb
shohei_mlb

スコア9

title CHANGED
File without changes
body CHANGED
@@ -31,7 +31,7 @@
31
31
  ■補足
32
32
  「devise (4.8.0)」はインストール済みで、Gemfileにデフォルトで記載されてある、
33
33
  「gem 'bcrypt', '~> 3.1.7'」はコメントアウトされたままだが、「bcrypt (3.1.16)」はインストールされている。
34
-  →おそらく、deviseインストール時にbcryptがインストールされたと思われます。
34
+  →おそらく、deviseインストール時に自動でbcryptがインストールされたと思われます。
35
35
 
36
36
  ■やったこと
37
37
  「/Users/my_name/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bcrypt-3.1.16/lib/bcrypt_ext.bundle」を削除したが、

1

誤字を編集した

2021/10/24 10:45

投稿

shohei_mlb
shohei_mlb

スコア9

title CHANGED
@@ -1,1 +1,1 @@
1
- deviseでパスワード認証を行うとエラーが
1
+ deviseでパスワード認証を行うとエラーが発生す
body CHANGED
@@ -18,7 +18,7 @@
18
18
  ■エラーが出るまでの流れ
19
19
  1. railsにdeviseをインストール
20
20
  2. 新規登録画面からメールとパスワードを入力
21
- 3. 以下のエラーが発生する
21
+ 3. 新規登録ボタンを押下すると、以下のエラーが発生する
22
22
 
23
23
  ■エラー内容
24
24
  ```ruby