Ruby on Rails 6.0.3を利用してアプリ作成を行なっています。
ログイン機能を搭載するためbcryptをインストールしたのですがrails testを実行すると
Traceback (most recent call last): 22: from /usr/local/bundle/gems/spring-2.1.1/bin/spring:49:in `<main>' 21: from /usr/local/bundle/gems/spring-2.1.1/lib/spring/client.rb:30:in `run' 20: from /usr/local/bundle/gems/spring-2.1.1/lib/spring/client/command.rb:7:in `call' 19: from /usr/local/bundle/gems/spring-2.1.1/lib/spring/client/server.rb:9:in `call' 18: from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' 17: from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' 16: from /usr/local/bundle/gems/spring-2.1.1/lib/spring/server.rb:9:in `<top (required)>' 15: from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' 14: from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' 13: from /usr/local/bundle/gems/spring-2.1.1/lib/spring/commands.rb:4:in `<top (required)>' 12: from /usr/local/bundle/gems/spring-2.1.1/lib/spring/commands.rb:33:in `<module:Spring>' 11: from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' 10: from /usr/local/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' 9: from /usr/local/lib/ruby/2.6.0/bundler/setup.rb:20:in `<top (required)>' 8: from /usr/local/lib/ruby/2.6.0/bundler.rb:107:in `setup' 7: from /usr/local/lib/ruby/2.6.0/bundler/runtime.rb:20:in `setup' 6: from /usr/local/lib/ruby/2.6.0/bundler/runtime.rb:108:in `block in definition_method' 5: from /usr/local/lib/ruby/2.6.0/bundler/definition.rb:226:in `requested_specs' 4: from /usr/local/lib/ruby/2.6.0/bundler/definition.rb:237:in `specs_for' 3: from /usr/local/lib/ruby/2.6.0/bundler/definition.rb:170:in `specs' 2: from /usr/local/lib/ruby/2.6.0/bundler/spec_set.rb:85:in `materialize' 1: from /usr/local/lib/ruby/2.6.0/bundler/spec_set.rb:85:in `map!' /usr/local/lib/ruby/2.6.0/bundler/spec_set.rb:91:in `block in materialize': Could not find bcrypt-3.1.16 in any of the sources (Bundler::GemNotFound)
このようなエラーが発生します。
以下のページの解決方法を試しましたがうまく行きません。
https://qiita.com/totto357/items/1741da83bf642dab99df
ちなみに
Gemfile
1source 'https://rubygems.org' 2git_source(:github) { |repo| "https://github.com/#{repo}.git" } 3 4ruby '2.6.6' 5 6# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' 7gem 'rails', '~> 6.0.3', '>= 6.0.3.4' 8# Use mysql as the database for Active Record 9gem 'mysql2', '>= 0.4.4' 10# Use Puma as the app server 11gem 'puma', '~> 4.1' 12# Use SCSS for stylesheets 13gem 'sass-rails', '>= 6' 14# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker 15gem 'webpacker', '~> 4.0' 16# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks 17gem 'turbolinks', '~> 5' 18# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder 19gem 'jbuilder', '~> 2.7' 20# Use Redis adapter to run Action Cable in production 21# gem 'redis', '~> 4.0' 22# Use Active Model has_secure_password 23 gem 'bcrypt', '~> 3.1', '>= 3.1.12' 24 25# Use Active Storage variant 26# gem 'image_processing', '~> 1.2' 27 28# Reduces boot times through caching; required in config/boot.rb 29gem 'bootsnap', '>= 1.4.2', require: false
Gemfileは以上のようになっております。
わかる方いらっしゃいましたらご教授願います
あなたの回答
tips
プレビュー