前提・実現したいこと
Railsで以下のコマンドを実行したところ、次のようなエラーが出てきます。
Railsの書籍を見ながらやっていたんですが、現在のRailsのバージョンは5.2ですがその本は5.1
でした。
`bundle exec rails _5.1.3_ new ./ -B -d mysql --skip-turbolinks --skip-test`
と実行したのですが、バージョンが5.2のままになっていたのでGemfileを途中で修正し、
gem 'rails', '5.1.3'
`bundle update` `bundle install`
としました。
エラーメッセージで調べたところ、多分バージョンをいじったことが関係していると思うんですが、
どうやって直せばよいのか分かっていません、わかる方いらしたらご教授ください。
発生している問題・エラーメッセージ
/mnt/c/Users/ryota/environment/RailsSampleApp$ EDITOR=vim bin/rails secrets:edit /mnt/c/Users/ryota/environment/RailsSampleApp/vendor/bundle/ruby/2.4.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require': cannot load such file -- active_storage/engine (LoadError) from /mnt/c/Users/ryota/environment/RailsSampleApp/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/dependencies.rb:292:in `block in require' from /mnt/c/Users/ryota/environment/RailsSampleApp/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/dependencies.rb:258:in `load_dependency' from /mnt/c/Users/ryota/environment/RailsSampleApp/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/dependencies.rb:292:in `require' from /mnt/c/Users/ryota/environment/RailsSampleApp/config/application.rb:8:in `<main>' from /mnt/c/Users/ryota/environment/RailsSampleApp/vendor/bundle/ruby/2.4.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require' from /mnt/c/Users/ryota/environment/RailsSampleApp/vendor/bundle/ruby/2.4.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi' from /mnt/c/Users/ryota/environment/RailsSampleApp/vendor/bundle/ruby/2.4.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register' from /mnt/c/Users/ryota/environment/RailsSampleApp/vendor/bundle/ruby/2.4.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi' from /mnt/c/Users/ryota/environment/RailsSampleApp/vendor/bundle/ruby/2.4.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require' from /mnt/c/Users/ryota/environment/RailsSampleApp/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/dependencies.rb:292:in `block in require' from /mnt/c/Users/ryota/environment/RailsSampleApp/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/dependencies.rb:258:in `load_dependency' from /mnt/c/Users/ryota/environment/RailsSampleApp/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/dependencies.rb:292:in `require' from /mnt/c/Users/ryota/environment/RailsSampleApp/vendor/bundle/ruby/2.4.0/gems/railties-5.1.3/lib/rails/command/actions.rb:15:in `require_application_and_environment!' from /mnt/c/Users/ryota/environment/RailsSampleApp/vendor/bundle/ruby/2.4.0/gems/railties-5.1.3/lib/rails/commands/secrets/secrets_command.rb:31:in `edit' from /mnt/c/Users/ryota/environment/RailsSampleApp/vendor/bundle/ruby/2.4.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run' from /mnt/c/Users/ryota/environment/RailsSampleApp/vendor/bundle/ruby/2.4.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command' from /mnt/c/Users/ryota/environment/RailsSampleApp/vendor/bundle/ruby/2.4.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch' from /mnt/c/Users/ryota/environment/RailsSampleApp/vendor/bundle/ruby/2.4.0/gems/railties-5.1.3/lib/rails/command/base.rb:63:in `perform' from /mnt/c/Users/ryota/environment/RailsSampleApp/vendor/bundle/ruby/2.4.0/gems/railties-5.1.3/lib/rails/command.rb:44:in `invoke' from /mnt/c/Users/ryota/environment/RailsSampleApp/vendor/bundle/ruby/2.4.0/gems/railties-5.1.3/lib/rails/commands.rb:16:in `<main>' from /mnt/c/Users/ryota/environment/RailsSampleApp/vendor/bundle/ruby/2.4.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require' from /mnt/c/Users/ryota/environment/RailsSampleApp/vendor/bundle/ruby/2.4.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi' from /mnt/c/Users/ryota/environment/RailsSampleApp/vendor/bundle/ruby/2.4.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register' from /mnt/c/Users/ryota/environment/RailsSampleApp/vendor/bundle/ruby/2.4.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi' from /mnt/c/Users/ryota/environment/RailsSampleApp/vendor/bundle/ruby/2.4.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require' from /mnt/c/Users/ryota/environment/RailsSampleApp/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/dependencies.rb:292:in `block in require' from /mnt/c/Users/ryota/environment/RailsSampleApp/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/dependencies.rb:258:in `load_dependency' from /mnt/c/Users/ryota/environment/RailsSampleApp/vendor/bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/dependencies.rb:292:in `require' from bin/rails:4:in `<main>' ubuntu0876@sarn:/mnt/c/Users/ryota/environment/RailsSampleApp$
該当のソースコード
Ruby
1ソースコード
試したこと
ここに問題に対して試したことを記載してください。
補足情報(FW/ツールのバージョンなど)
ここにより詳細な情報を記載してください。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/01/24 13:57
2019/01/25 00:28
2019/01/25 01:28 編集
2019/01/25 01:30
2019/01/25 01:39
2019/01/25 01:42