前提・実現したいこと
最近railsを勉強していて、ローカル上で環境構築を行っていた。
それでダウンロードしていたが、
rails -v
とうつとエラーが出る.
発生している問題・エラーメッセージ
$rails -v <internal:/Users/yuya/.rbenv/versions/3.0.1/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- digest/md5 (LoadError) from <internal:/Users/yuya/.rbenv/versions/3.0.1/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require' from /Users/yuya/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/railties-6.1.3.2/lib/rails/generators/app_base.rb:4:in `<top (required)>' from <internal:/Users/yuya/.rbenv/versions/3.0.1/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require' from <internal:/Users/yuya/.rbenv/versions/3.0.1/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require' from /Users/yuya/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/railties-6.1.3.2/lib/rails/generators/rails/app/app_generator.rb:3:in `<top (required)>' from <internal:/Users/yuya/.rbenv/versions/3.0.1/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require' from <internal:/Users/yuya/.rbenv/versions/3.0.1/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require' from /Users/yuya/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/railties-6.1.3.2/lib/rails/commands/application/application_command.rb:4:in `<top (required)>' from <internal:/Users/yuya/.rbenv/versions/3.0.1/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require' from <internal:/Users/yuya/.rbenv/versions/3.0.1/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require' from /Users/yuya/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/railties-6.1.3.2/lib/rails/command/behavior.rb:44:in `block (2 levels) in lookup' from /Users/yuya/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/railties-6.1.3.2/lib/rails/command/behavior.rb:40:in `each' from /Users/yuya/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/railties-6.1.3.2/lib/rails/command/behavior.rb:40:in `block in lookup' from /Users/yuya/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/railties-6.1.3.2/lib/rails/command/behavior.rb:39:in `each' from /Users/yuya/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/railties-6.1.3.2/lib/rails/command/behavior.rb:39:in `lookup' from /Users/yuya/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/railties-6.1.3.2/lib/rails/command.rb:76:in `find_by_namespace' from /Users/yuya/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/railties-6.1.3.2/lib/rails/command.rb:48:in `invoke' from /Users/yuya/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/railties-6.1.3.2/lib/rails/cli.rb:18:in `<top (required)>' from <internal:/Users/yuya/.rbenv/versions/3.0.1/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require' from <internal:/Users/yuya/.rbenv/versions/3.0.1/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require' from /Users/yuya/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/railties-6.1.3.2/exe/rails:10:in `<top (required)>' from /Users/yuya/.rbenv/versions/3.0.1/bin/rails:23:in `load' from /Users/yuya/.rbenv/versions/3.0.1/bin/rails:23:in `<main>'
試したこと
digestがないとあるのでgem install digestを行ったが変化なしだった。
補足情報(FW/ツールのバージョンなど)
Rubyのバージョン:ruby 3.0.1
railsのバージョン:Rails 6.1.3.2
rbenvのバージョン:1.1.2
ずっと悩んでいてわからないのでどなたか教えてください。
あなたの回答
tips
プレビュー