質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.51%
Ruby on Rails 5

Ruby on Rails 5は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

MacOS(OSX)

MacOSとは、Appleの開発していたGUI(グラフィカルユーザーインターフェース)を採用したオペレーションシステム(OS)です。Macintoshと共に、市場に出てGUIの普及に大きく貢献しました。

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Q&A

解決済

2回答

1573閲覧

"rails s"ができない...

_chii

総合スコア48

Ruby on Rails 5

Ruby on Rails 5は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

MacOS(OSX)

MacOSとは、Appleの開発していたGUI(グラフィカルユーザーインターフェース)を採用したオペレーションシステム(OS)です。Macintoshと共に、市場に出てGUIの普及に大きく貢献しました。

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

0グッド

0クリップ

投稿2020/05/12 04:48

編集2020/05/12 16:52

前提・実現したいこと

実現したい内容としてbin/rails sをしてもサーバーが立ち上がらないトラブルに直面しておりますのでサーバーを立ち上げることを実現したいです!

発生している問題・エラーメッセージ

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/ツールのバージョンなど)

MacOS
Ruby on Rails 5.2

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答2

0

ベストアンサー

springが邪魔をしているようです。
kill してからやり直してみてくだし

追記
良く読んでみたら、springのversion違いのようです
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.

投稿2020/05/12 06:46

編集2020/05/12 15:06
winterboum

総合スコア23282

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

_chii

2020/05/12 12:05

ご丁寧にご回答してくださりありがとうございます。ご回答して頂いた内容をもとに試しましたが求めていた結果とはなりませんでした...もしよろしければ編集した内容をご確認して頂けないでしょうか?
_chii

2020/05/12 16:57

ご親切にありがとうございます。でも今後は違うエラーがでてしまって...エラー文の理解に努めましたがどうしても解決に届かなくて...
winterboum

2020/05/12 20:36

and then run bundle exec spring binstub --all はやりました?
guest

0

なんか関連した質問に、同じ質問とやりとりのものがいくつもあるのですが…自分の場合はインストールしようとしてたGemfileのバージョンを最新のものに指定したら直りました。

投稿2020/07/12 13:01

maztak

総合スコア61

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.51%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問