This project is archived and is in readonly mode.
no such file to load -- bundler (LoadError) in Rails 3.0.0.beta
I installed Rails 3.0.0.beta in both Ruby 1.9.1 and JRuby 1.4.0
following the instructions found here: http://weblog.rubyonrails.org/2010/2/5/rails-3-0-beta-release
and after generating a new application with
rails rails3_blog -d mysql
all goes well, but when I try to start the server with
/home/johnny/workspace/rails3_blog/config/boot.rb:6:in `require': no such file to load -- bundler (LoadError) from /home/johnny/workspace/rails3_blog/config/boot.rb:6:in `rescue in <top (required)>' from /home/johnny/workspace/rails3_blog/config/boot.rb:2:in `<top (required)>' from /home/johnny/workspace/rails3_blog/script/rails:9:in `require' from /home/johnny/workspace/rails3_blog/script/rails:9:in `<main>'
On JRuby I'm seeing the same error.
My environment is as follows:
$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 9.10 Release: 9.10 Codename: karmic $ cat /proc/version Linux version 2.6.31-20-generic (buildd@yellow) (gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu9) ) [#57](/projects/8994/tickets/57 "Ticket #57")-Ubuntu SMP Mon Feb 8 09:02:26 UTC 2010 $ ruby -v ruby 1.9.1p243 (2009-07-16 revision 24175) [x86_64-linux] $ jruby -v jruby 1.4.0 (ruby 1.8.7 patchlevel 174) (2009-11-02 69fbfa3) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_15) [amd64-java]
Comments and changes to this ticket
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>'
I encountered the same problem
ubuntu 10.04 ruby1.9.1p378
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>'
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:
Same problem on Ubuntu 10.04 desktop i386, but I needed to run:
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!
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/
bundle exec batchbut it just hung so I killed it. Sigh.
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
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
$ 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)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>