No Such File to Load Bundler Error for Rails 3

cannot load such file -- bundler/setup (LoadError)

It could be that there was a previous Ruby env installed on your system prior to your installation of 2.0? This might have had an existing GEM_PATH that lead to the /1.8 directory which the installation of version 2.0 simply kept.

The problem you where likely having, then, was that Passenger/Apache was looking in the /2.0 directory when in fact the gems were in the /1.8 directory. Your explicitly telling apache to use the /1.8 directory thus makes sense to fix the problem.

SetEnv GEM_HOME /usr/lib/ruby/gems/1.8

You might also try using the Ruby Version Manager to handle multiple Ruby envs.

Some things I found in Google:

  • New to Ruby and am having trouble with LOAD_PATH
  • http://weblog.rubyonrails.org/2009/9/1/gem-packaging-best-practices/
  • http://guides.rubygems.org/faqs/

LoadError: cannot load such file -- bundler/setup

The error shows you are using the system Ruby, not RVM. You need to tell Pow to use the right Ruby version. You need to create a .rvmrc file specifying which Ruby to use, and also create or edit a .powrc or .powenv file to tell Pow to load RVM. See the Pow docs on using RVM.

no such file to load -- bundler (LoadError)

Everything is correct, since 1.9.2dev version is prior to 1.9.2:

irb > Gem::Version.new('1.9.2dev') >= Gem::Version.new('1.9.2')
# => false
irb > Gem::Version.new('1.9.2dev') >= Gem::Version.new('1.9.1')
# => true

As a temporary workaround you may try to install bundler explicitly:

gem install bundler

Apparently I would suggest you to upgrade Ruby in any case, dev versions are definitely not the best choice to deal with.

Rake aborted! no such file to load --bundler/setup Rails 3.1

Run:

gem install bundler
bundle install
bundle exec rake db:create

You might want to learn about Bundler.

See the link on "Creating new Rails Project".

bundler/setup (LoadError)

You likely have bundler gem missing.

To get it to work run (first command may need be executed with sudo, depending on your environment):

[sudo] gem install bundler
bundle install


Related Topics



Leave a reply



Submit