Monday, 9 September 2013

missing library 'bundler' running script/console

missing library 'bundler' running script/console

When I try to open script/console from within any of my Rails
Applications, I get this error:
-$ script/console
/home/mattia/rails/app/config/../config/preinitializer.rb:5: Could not
load the bundler gem. Install it with gem install bundler. (RuntimeError)
from /home/mattia/rails/app/config/boot.rb:28:in load' from
/home/mattia/rails/app/config/boot.rb:28:inpreinitialize' from
/home/mattia/rails/app/config/boot.rb:10:in boot!' from
/home/mattia/rails/app/config/boot.rb:128 from script/console:2:inrequire'
from script/console:2
The same from IRB:
irb(main):001:0> require 'bundler'
LoadError: no such file to load -- bundler
from (irb):1:in `require'
from (irb):1
irb(main):002:0>
These are my configurations:
$ gem list -d bundler
*** LOCAL GEMS ***
bundler (1.0.7)
Authors: Carl Lerche, Yehuda Katz, André Arko
Rubyforge: http://rubyforge.org/projects/bundler
Homepage: http://gembundler.com
Installed at: /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8
[mattia@sviluppo rails]$ gem -v
1.3.7
[mattia@sviluppo rails]$ which gem
/usr/bin/gem
[mattia@sviluppo rails]$ which rails
/usr/bin/rails
[mattia@sviluppo rails]$ which rake
/usr/bin/rake
[mattia@sviluppo rails]$ bundle -v
Bundler version 1.0.7
[mattia@sviluppo rails]$ bundle config
Settings are listed in order of priority. The top value will be used.
/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/shared_helpers.rb:3:
undefined method `source_index' for Gem:Module (NoMethodError)
from
/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler.rb:187:in
`default_gemfile'
from
/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler.rb:157:in
`root'
from
/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler.rb:163:in
`app_config_path'
from
/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler.rb:175:in
`settings'
from
/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/cli.rb:378:in
`config'
from
/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor/task.rb:22:in
`send'
from
/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor/task.rb:22:in
`run'
from
/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor/invocation.rb:118:in
`invoke_task'
from
/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor.rb:246:in
`dispatch'
from
/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor/base.rb:389:in
`start'
from
/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/bundler-1.0.7/bin/bundle:13
from /usr/bin/bundle:19:in `load'
from /usr/bin/bundle:19
And this is the environment:
$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.7
- RUBY VERSION: 1.8.7 (2009-06-12 patchlevel 174) [i686-linux]
- INSTALLATION DIRECTORY:
/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /opt/ruby-enterprise-1.8.7-2009.10/bin/ruby
- EXECUTABLE DIRECTORY: /opt/ruby-enterprise-1.8.7-2009.10/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8
- /home/mattia/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
This problem stated after trying to update nokogiri on Centos, following
these commands:
sudo yum install -y rubygem-nokogiri
sudo yum install -y gcc ruby-devel libxml2 libxml2-devel libxslt
libxslt-devel

No comments:

Post a Comment