前提・実現したいこと
Ruby on Railsでサーバーを立ち上げてブラウザに表示させたいのですが、エラーが出てしまい立ち上げることができません。ご教授いただけないでしょうか?
発生している問題・エラーメッセージ
サーバー立ち上げ時
ChisakinoMacBook-Pro:taskleaf Chisaki$ bin/rails s => Booting Puma => Rails 5.2.4.2 application starting in development => Run `rails server -h` for more startup options Exiting You've tried to invoke Spring when it's already loaded (i.e. the Spring constant is defined). This is probably because you generated binstubs with Spring 1.0, and you now have a Spring version > 1.0 on your system. To solve this, upgrade your bundle to the latest Spring version and then run `bundle exec spring binstub --all` to regenerate your binstubs. This is a one-time step necessary to upgrade from 1.0 to 1.1. Here's the backtrace: /Users/Chisaki/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:55:in `load' /Users/Chisaki/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:55:in `load' /Users/Chisaki/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:285:in `block in load' /Users/Chisaki/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:257:in `load_dependency' /Users/Chisaki/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:285:in `load' /Users/Chisaki/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `<top (required)>' /Users/Chisaki/.rbenv/versions/2.5.1/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:92:in `require' /Users/Chisaki/.rbenv/versions/2.5.1/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:92:in `require' /Users/Chisaki/Desktop/Rails/taskleaf/bin/spring:15:in `<top (required)>' bin/rails:3:in `load' bin/rails:3:in `<main>' ChisakinoMacBook-Pro:taskleaf Chisaki$
試したこと
試した内容として下記のように指定のあったbundle exec spring binstub --all
を実行しました。
ChisakinoMacBook-Pro:taskleaf Chisaki$ bundle exec spring binstub --all NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from /Users/Chisaki/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/specifications/archive-zip-0.12.0.gemspec:16. NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from /Users/Chisaki/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/specifications/coffee-script-source-1.12.2.gemspec:16. NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from /Users/Chisaki/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/specifications/coffee-rails-4.2.2.gemspec:16. NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from /Users/Chisaki/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/specifications/sprockets-3.7.2.gemspec:19. NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from /Users/Chisaki/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/specifications/sass-3.7.4.gemspec:21. * bin/rake: Spring inserted * bin/rails: Spring inserted
そのあとにbundle update
を実行してからrails s
を試したところ、最初のエラーの表示はなくなりましたがもっと大きなエラーになってしまいました...下記がその内容となります。
ChisakinoMacBook-Pro:taskleaf Chisaki$ bin/rails s NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from /Users/Chisaki/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/specifications/archive-zip-0.12.0.gemspec:16. NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from /Users/Chisaki/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/specifications/coffee-script-source-1.12.2.gemspec:16. NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from /Users/Chisaki/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/specifications/coffee-rails-4.2.2.gemspec:16. NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from /Users/Chisaki/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/specifications/sprockets-3.7.2.gemspec:19. NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from /Users/Chisaki/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/specifications/sass-3.7.4.gemspec:21. Beginning in Rails 4, Rails ships with a `rails` binstub at ./bin/rails that should be used instead of the Bundler-generated `rails` binstub. If you are seeing this message, your binstub at ./bin/rails was generated by Bundler instead of Rails. You might need to regenerate your `rails` binstub locally and add it to source control: rails app:update:bin # Bear in mind this generates other binstubs # too that you may or may not want (like yarn) If you already have Rails binstubs in source control, you might be inadverently overwriting them during deployment by using bundle install with the --binstubs option. If your application was created prior to Rails 4, here's how to upgrade: bundle config --delete bin # Turn off Bundler's stub generator rails app:update:bin # Use the new Rails executables git add bin # Add bin/ to source control You may need to remove bin/ from your .gitignore as well. When you install a gem whose executable you want to use in your app, generate it and add it to source control: bundle binstubs some-gem-name git add bin/new-executable => Booting Puma => Rails 5.2.4.2 application starting in development => Run `rails server -h` for more startup options Exiting You've tried to invoke Spring when it's already loaded (i.e. the Spring constant is defined). This is probably because you generated binstubs with Spring 1.0, and you now have a Spring version > 1.0 on your system. To solve this, upgrade your bundle to the latest Spring version and then run `bundle exec spring binstub --all` to regenerate your binstubs. This is a one-time step necessary to upgrade from 1.0 to 1.1. Here's the backtrace: /Users/Chisaki/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:55:in `load' /Users/Chisaki/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:55:in `load' /Users/Chisaki/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:285:in `block in load' /Users/Chisaki/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:257:in `load_dependency' /Users/Chisaki/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:285:in `load' /Users/Chisaki/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `<top (required)>' /Users/Chisaki/.rbenv/versions/2.5.1/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:92:in `require' /Users/Chisaki/.rbenv/versions/2.5.1/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:92:in `require' /Users/Chisaki/Desktop/Rails/taskleaf/bin/spring:15:in `<top (required)>' bin/rails:4:in `load' bin/rails:4:in `<main>' ChisakinoMacBook-Pro:taskleaf Chisaki$
エラー文の内容理解を試みましたが理解できませんでした...
補足情報(FW/ツールのバージョンなど)
Ruby on Rails5
MacOS
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。