This project is archived and is in readonly mode.
no such file to load -- bundler (LoadError) in Rails 3.0.0.beta
-
Marc Love
It could be that you have an old version of the bundler gem still installed on your system and it causes issues with the updated version operating correctly. Do the following:
sudo gem uninstall bundler -a sudo gem install bundlerThen try it again.
-
Johnny
@Marc, did as you suggested, but to no avail. I'm still seeing the same error.
-
José Valim
What
gem list -d bundlerreturns? Something seems to be messed up in your load path. Opening up an irb console and doing 'require "bundler"' works? -
Johnny
@Valim,
Here it is:
$ gem list -d bundler *** LOCAL GEMS *** bundler (0.9.7) Authors: Carl Lerche, Yehuda Katz Homepage: http://github.com/carlhuda/bundler Installed at: /usr/lib/ruby1.9.1/gems/1.9.1 Bundles are fun $ irb irb(main):001:0> require "bundler" LoadError: no such file to load -- bundler from (irb):1:in `require' from (irb):1 from /usr/local/bin/irb:12:in `<main>' -
José Valim
- State changed from new to invalid
It cannot find bundler for some odd reason. Try reinstalling bundler, rails or a clean setup with RVM.
I'm marking as invalid, feel free to open another ticket if I'm wrong. -
Johnny
If I enter a shell with the command:
bundle exec batchthen the error disappears and the server starts up.
-
Eric Koslow
I have this same error, and Ubuntu 9.10. I think it has to do with my PATH, but I'm not certain. I can run bundle from the command line, but "require 'bundler'" gives me the same error.
-
Greg Moreno
I encountered the same problem with ruby 1.9.1p243 + ubuntu 9.10. Setting GEM_HOME fixes the problem.
-
Jeremy Kemper
- Milestone cleared.
- State changed from invalid to open
- Assigned user set to Yehuda Katz (wycats)
-
neocoin
I encountered the same problem
environment
ubuntu 10.04 ruby1.9.1p378executed commands:
gem1.9.1 install --no-ri --no-rdoc rails --pre rails my cd my rails s /...ignore.../my/config/boot.rb:4:in `require': no such file to load -- bundler (LoadError) from /...ignore.../my/config/boot.rb:4:in `<top (required)>' from script/rails:8:in `require' from script/rails:8:in `<main>' -
Arnaud Leymet
I got the same error on Ubuntu 10.04 desktop i386, while using Ruby1.9.1 with Rails 3-pre.
And As Greg said, changing the GEM_HOME environment variable does the trick!
I used the following command to fix this issue:export GEM_HOME=/usr/lib/ruby1.9.1/gems/1.9.1/ -
avapoet
@Arnaud:
Same problem on Ubuntu 10.04 desktop i386, but I needed to run:
export GEM_HOME=/usr/lib/ruby/gems/1.9.1/
Pay attention and check what's right for you. The correct directory is the one which contains the gems directory which in turn contains all of your gems!
-
Rohit Arondekar
I can't reproduce this on Ubuntu 10.04, seems to be a path problem. If you encounter this error do what avapoet has suggested and figure out where your gems are and set GEM_HOME to that path. I believe this ticket can be closed?
-
Ryan Bigg
- State changed from open to invalid
Must set the GEM_HOME environment variable. I think this is more of a bundler issue than a Rails issue (although it does occur during the use of Rails, it may occur elsewhere too)
-
Ryan Bigg
- Tag cleared.
And Rohit informs me it's a package manager issue, not a Bundler issue.
If OP could provide detailed information on how he installed Ruby / Rails then we may be able to go about reproducing this and nail down the real culprit.
-
Will St. Clair
Upgrading an app to R3 and having this problem. Reinstalled bundler and set GEM_HOME to no avail. Mac OS X 10.6, ruby 1.8.7
$ rails server script/rails:9:in `require': no such file to load -- rails/commands (LoadError) from script/rails:9$ irb >> require "bundler" => true >> quit$ echo $GEM_HOME /usr/lib/ruby/gems/1.8/gems/I tried
bundle exec batchbut it just hung so I killed it. Sigh. -
Will St. Clair
Disregard!
sudo bundle installwas bundling 2.3.8 instead of 3.0.0.beta3. Fixed it by specifying the version in my Gemfile. -
Alex Pooley
fwiw... I had to set "RUBYOPT=rubygems" env variable to make bundler happy...
uubuntu@ip-10-170-77-113:~$ bundle /var/lib/gems/1.8/gems/bundler-1.0.7/bin/bundle:4:in `require': no such file to load -- bundler (LoadError) from /var/lib/gems/1.8/gems/bundler-1.0.7/bin/bundle:4 ubuntu@ip-10-170-77-113:~$ export RUBYOPT=rubygems ubuntu@ip-10-170-77-113:~$ bundle Could not locate Gemfile -
herval
this might be a completely unrelated case, but... I've stumbled on this problem lately when running a rails app in my env (Snow Leopard + RVM + 1.9.2). I get the 'bundler not found' problem when starting with sudo (to use port 80), but NOT when running regularly
$ script/rails server => Booting WEBrick => Rails 3.0.1 application starting in development on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server [2011-02-10 16:59:17] INFO WEBrick 1.3.1 [2011-02-10 16:59:17] INFO ruby 1.9.2 (2010-12-25) [x86_64-darwin10.6.0] [2011-02-10 16:59:17] INFO WEBrick::HTTPServer#start: pid=82986 port=3000
versus....
$ sudo script/rails server /Users/herval/Development/plim/config/boot.rb:9:in
rescue in <top (required)>': uninitialized constant Object::Bundler (NameError)from /Users/herval/Development/plim/config/boot.rb:5:in `<top (required)>' from <internal:lib/rubygems/custom_require>:29:in `require' from <internal:lib/rubygems/custom_require>:29:in `require' from script/rails:5:in `<main>'Guess it's more of a problem related to RVM and some weird linkage to osx's system ruby? (I installed RVM on a user level)