###前提
本番サーバは問題なく動作中で、ローカルの開発環境でのみrailsが起動しません。
###発生している問題・エラーメッセージ
bundle exec rails s
だと下記のメッセージの後、エラー自体は出ずにそのまま元のプロンプトに戻ります。
Looks like your app's ./bin/rails is a stub that was generated by Bundler. In Rails 5, your app's bin/ directory contains executables that are versioned like any other source code, rather than stubs that are generated on demand. Here's how to upgrade: bundle config --delete bin # Turn off Bundler's stub generator rails app:update:bin # Use the new Rails 5 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
bundle exec rails c
でも同様。
bin/rails s
を実行すると、上記メッセージの後に下記のエラーが出力されます。
/Users/hoge/home/p3commerce/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.6.8/lib/nokogiri.rb:32:in `require': incompatible library version - /Users/hoge/home/p3commerce/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.6.8/lib/nokogiri/nokogiri.bundle (fatal) from /Users/hoge/home/p3commerce/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.6.8/lib/nokogiri.rb:32:in `rescue in <top (required)>' from /Users/hoge/home/p3commerce/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.6.8/lib/nokogiri.rb:28:in `<top (required)>' (以下出力略)
###試したこと
Gemの削除からのbundle install
し直し、binの削除からのbundle install
し直しは実施。
Gemfile.lockは特に本番環境と差分が出てません。
###補足情報(言語/FW/ツール等のバージョンなど)
rails 5.0.0rc
ruby 2.3.1
Mac OSX 10.12
rbenv
$ which rbenv /usr/local/bin/rbenv $ rbenv --version rbenv 1.0.0 $ rbenv versions system 2.2.3 * 2.3.1 $ which ruby /Users/hoge/.rbenv/shims/ruby $ ruby --version ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15] $ bundle exec gem list | grep noko nokogiri (1.6.8) $ bundle config Settings are listed in order of priority. The top value will be used. path Set for your local app (/Users/hoge/home/p3commerce/.bundle/config): "vendor/bundle" jobs Set for your local app (/Users/hoge/home/p3commerce/.bundle/config): "4" disable_shared_gems Set for your local app (/Users/hoge/home/p3commerce/.bundle/config): "true" bin Set for your local app (/Users/hoge/home/p3commerce/.bundle/config): "bin" $ bundle exec rails --version Looks like your app's ./bin/rails is a stub that was generated by Bundler. In Rails 5, your app's bin/ directory contains executables that are versioned like any other source code, rather than stubs that are generated on demand. Here's how to upgrade: bundle config --delete bin # Turn off Bundler's stub generator rails app:update:bin # Use the new Rails 5 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 Rails 5.0.0.rc2 ohaleMac:p3commerce oshale$ bin/rails --version Looks like your app's ./bin/rails is a stub that was generated by Bundler. In Rails 5, your app's bin/ directory contains executables that are versioned like any other source code, rather than stubs that are generated on demand. Here's how to upgrade: bundle config --delete bin # Turn off Bundler's stub generator rails app:update:bin # Use the new Rails 5 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 Rails 5.0.0.rc2
回答3件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。