spring: Spring is broken with bundler >= 1.11.0
After https://github.com/bundler/bundler/pull/4002 (which is included into 1.11.0 and up) bundler restores RUBYLIB env var, but it seems that spring actually needs former behavior. spring-1.6.0 (rails-4.2.5) w/ bundler >= 1.11.0 fails like this:
ojab-notebook:dashboard-ng ojab$ bundle exec rails c
/Users/ojab/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- bundler/setup (LoadError)
from /Users/ojab/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/ojab/Documents/repos/phones/dashboard-ng/vendor/bundle/ruby/2.2.0/gems/spring-1.6.0/lib/spring/commands.rb:33:in `<module:Spring>'
from /Users/ojab/Documents/repos/phones/dashboard-ng/vendor/bundle/ruby/2.2.0/gems/spring-1.6.0/lib/spring/commands.rb:4:in `<top (required)>'
from /Users/ojab/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/ojab/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/ojab/Documents/repos/phones/dashboard-ng/vendor/bundle/ruby/2.2.0/gems/spring-1.6.0/lib/spring/application.rb:77:in `preload'
from /Users/ojab/Documents/repos/phones/dashboard-ng/vendor/bundle/ruby/2.2.0/gems/spring-1.6.0/lib/spring/application.rb:143:in `serve'
from /Users/ojab/Documents/repos/phones/dashboard-ng/vendor/bundle/ruby/2.2.0/gems/spring-1.6.0/lib/spring/application.rb:131:in `block in run'
from /Users/ojab/Documents/repos/phones/dashboard-ng/vendor/bundle/ruby/2.2.0/gems/spring-1.6.0/lib/spring/application.rb:125:in `loop'
from /Users/ojab/Documents/repos/phones/dashboard-ng/vendor/bundle/ruby/2.2.0/gems/spring-1.6.0/lib/spring/application.rb:125:in `run'
from /Users/ojab/Documents/repos/phones/dashboard-ng/vendor/bundle/ruby/2.2.0/gems/spring-1.6.0/lib/spring/application/boot.rb:18:in `<top (required)>'
from /Users/ojab/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/ojab/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from -e:1:in `<main>'
sping app/server starts fine:
ojab 23200 0.1 0.1 2480972 11048 ?? Ss 4:38PM 0:00.12 spring app | dashboard-ng | started 9 secs ago | development mode
ojab 23198 0.0 0.3 2505632 23612 s005 S 4:38PM 0:00.32 spring server | dashboard-ng | started 9 secs ago
Issue for bundler is filled (https://github.com/bundler/bundler/issues/4165), but I’m not really sure that it is their bug.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 38 (12 by maintainers)
Commits related to this issue
- Add bundler Dependency to gemspec, closes #456 — committed to sonalkr132/spring by sonalkr132 9 years ago
- Print "Running via Spring preloader" message from the app process Rather than from the Spring client process. See https://github.com/rails/spring/pull/455/files#r48411471 Within the app process, we'... — committed to rails/spring by jonleighton 8 years ago
- Disable `spring` Re-enable when https://github.com/rails/spring/issues/456 is resolved. — committed to HouseTrip/deploylist by tadejm 8 years ago
- Update ruby gems. Spring 1.6.2 fixed the issue of https://github.com/rails/spring/issues/456 — committed to vincedevendra/cfp-app by winston 8 years ago
- Start server process in clean env, closes #456 ENV["GEM_PATH"] was empty string, so GEM_PATH and GEM_HOME passed to server process were same path. It used to work before bundler 1.11.0 release cause ... — committed to sonalkr132/spring by sonalkr132 8 years ago
- Start server process in clean env, closes #456 ENV["GEM_PATH"] was empty string, so GEM_PATH and GEM_HOME passed to server process were same path. It used to work before bundler 1.11.0 release cause ... — committed to sonalkr132/spring by sonalkr132 8 years ago
- Dsiable spring until https://github.com/rails/spring/issues/456 is fixed. — committed to jollygoodcode/dasherize by winston 8 years ago
- Dsiable spring until https://github.com/rails/spring/issues/456 is fixed. — committed to jollygoodcode/dasherize by winston 8 years ago
- Disable spring until https://github.com/rails/spring/issues/456 is fixed. — committed to jollygoodcode/reread by winston 8 years ago
- Remove Spring to avoid issue * https://github.com/rails/spring/issues/456 — committed to siruguri/track_status by siruguri 8 years ago
- Specify path which we'll load bundler from Fixes #456. See my analysis at https://github.com/rails/spring/issues/456#issuecomment-177282363 Previously we were implicitly relying on Bundler setting R... — committed to rails/spring by jonleighton 8 years ago
- Specify path which we'll load bundler from Fixes #456. See my analysis at https://github.com/rails/spring/issues/456#issuecomment-177282363 Previously we were implicitly relying on Bundler setting R... — committed to rails/spring by jonleighton 8 years ago
- Specify path which we'll load bundler from Fixes #456. See my analysis at https://github.com/rails/spring/issues/456#issuecomment-177282363 Previously we were implicitly relying on Bundler setting R... — committed to rails/spring by jonleighton 8 years ago
- Specify path which we'll load bundler from Fixes #456. See my analysis at https://github.com/rails/spring/issues/456#issuecomment-177282363 Previously we were implicitly relying on Bundler setting R... — committed to rails/spring by jonleighton 8 years ago
- Updated: spring to exec rails c see https://github.com/rails/spring/issues/456 — committed to codefirst/vertex by suer 8 years ago
- Specify path which we'll load bundler from Fixes #456. See my analysis at https://github.com/rails/spring/issues/456#issuecomment-177282363 Previously we were implicitly relying on Bundler setting R... — committed to smartech7/ruby-preloader-spring by jonleighton 8 years ago
Updating Rails binaries worked for me
bundle exec rake rails:update:bin
Hey, I hit this issue, too, and regenerating binstubs with
seems to have fixed it.
@MatayoshiMariano your suggestion of running the
rails:update:bin
rake task saved the day for me as the main cause of my problem was I updated all my gems and rails (5.0.1) updated to rails (5.0.2).Thought I’d share the root cause of my spring issues…
If you’re on rails 5.0.1 update all your gems via
bundle update
then runbe rake rails:update:bin
and you’ll be good! 😃