I have an issue with a "missing gem".
After executing rake gems:install
>> rake gems:install
(in /some/path)
gem install google-api-client --version "= 0.7.1"
Successfully installed uuidtools-2.1.5
Successfully installed google-api-client-0.7.1
2 gems installed
Installing ri documentation for uuidtools-2.1.5...
Installing ri documentation for google-api-client-0.7.1...
Installing RDoc documentation for uuidtools-2.1.5...
Installing RDoc documentation for google-api-client-0.7.1...
Where we can see with a gem list the presence of the gem
>> gem list | grep google
google-api-client (0.7.1)
When starting my rail app I get a :
Missing these required gems:
google-api-client
You're running:
ruby 1.8.7.302 at /usr/bin/ruby1.8
rubygems 1.3.7 at /some/path/.gem/ruby/1.8, /usr/lib/ruby/gems/1.8
and then Rails advices me to execute a "rake gems:install" to solve the issue..
I only have a single version of ruby installed : ruby 1.8.7-p302
>> which ruby
/usr/bin/ruby
>> ls -l /usr/bin/ruby
lrwxrwxrwx 1 root root 7 Aug 26 2013 /usr/bin/ruby -> ruby1.8
>> ruby -v
ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux]
>> gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.7
- RUBY VERSION: 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /usr/bin/ruby1.8
- EXECUTABLE DIRECTORY: /usr/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /usr/lib/ruby/gems/1.8
- /root/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
I don't know where does the issue come from.
(Similarly, if I just make a ruby test file
require "rubygems"
require "google-api-client"
It outputs the same error :
>> ruby test.rb
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- google-api-client (LoadError)
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from test.rb:2
)
EDIT : I don't use bundle on this app.
Do you have some clue to solve this ?
Thanks !
Well, it was just the require that was erroneous
require "google/api_client"
instead of
require "google-api-client"
Thanks for the help.
You will update bundle version and then update gem.
Related
I'm getting this error when trying to create a new Rails project:
/Users/jameslett/.rbenv/versions/2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:126:in require: cannot load such file -- bundler (LoadError)
from /Users/jameslett/.rbenv/versions/2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:126:in rescue in require
from /Users/jameslett/.rbenv/versions/2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:39:in require
from /Users/jameslett/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/generators/app_base.rb:319:in bundle_command
from /Users/jameslett/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/generators/app_base.rb:335:in run_bundle
from (eval):1:in run_bundle
from /Users/jameslett/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/command.rb:27:in run
from /Users/jameslett/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in invoke_command
from /Users/jameslett/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in block in invoke_all
from /Users/jameslett/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in each
from /Users/jameslett/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in map
from /Users/jameslett/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:133:in invoke_all
from /Users/jameslett/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/group.rb:232:in dispatch
from /Users/jameslett/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/thor-0.19.1/lib/thor/base.rb:440:in start
from /Users/jameslett/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/commands/application.rb:17:in <top (required)>
from /Users/jameslett/.rbenv/versions/2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:67:in require
from /Users/jameslett/.rbenv/versions/2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:67:in require
from /Users/jameslett/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/cli.rb:14:in <top (required)>
from /Users/jameslett/.rbenv/versions/2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:67:in require
from /Users/jameslett/.rbenv/versions/2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:67:in require
from /Users/jameslett/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.2/bin/rails:9:in <top (required)>
from /Users/jameslett/.rbenv/versions/2.2.2/bin/rails:23:in load
from /Users/jameslett/.rbenv/versions/2.2.2/bin/rails:23:in `<main>'
I cd'd into my project and ran bundle install and I got this error:
Errno::EACCES: Permission denied # rb_sysopen - /Users/jameslett/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.7.1/.autotest
An error occurred while installing nokogiri (1.6.7.1), and Bundler cannot continue. Make sure that gem install nokogiri -v 1.6.7.1 succeeds before bundling.
If I run gem install nokogirl I get the "Errno::EACCES" error again.
I'm not sure what to do to solve this. I read the Bundler and Nokogirl documentation but that hasn't helped.
Just in case, I'm running:
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14]
My Gem ENV is:
RubyGems Environment:
- RUBYGEMS VERSION: 2.5.1
- RUBY VERSION: 2.2.2 (2015-04-13 patchlevel 95) [x86_64-darwin14]
- INSTALLATION DIRECTORY: /Users/jameslett/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0
- USER INSTALLATION DIRECTORY: /Users/jameslett/.gem/ruby/2.2.0
- RUBY EXECUTABLE: /Users/jameslett/.rbenv/versions/2.2.2/bin/ruby
- EXECUTABLE DIRECTORY: /Users/jameslett/.rbenv/versions/2.2.2/bin
- SPEC CACHE DIRECTORY: /Users/jameslett/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /Users/jameslett/.rbenv/versions/2.2.2/etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-14
- GEM PATHS:
- /Users/jameslett/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0
- /Users/jameslett/.gem/ruby/2.2.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
Is my gem path causing this error?
Make sure you own all the files in the .rbenv folder.
$ sudo chown -R $(whoami) /Users/jameslett/.rbenv
In addition all files should be readable and writable.
$ chmod -R u+rw /Users/jameslett/.rbenv
Permissions may be messed up when combining sudo with the actual user's environment.
You can try this
sudo gem update --system
Bundle install is not working on shared hosting , but i installed gem bundle , when i ran the following command
i tried
bundle install
-jailshell: bundle: command not found
so i try to evaluate the following commands
gem list bundler -v 1.1.4
*** REMOTE GEMS ***
bundler (1.1.4)
bundler-auto-update (0.0.4)
bundler-bootstrap (0.0.3)
bundler-bouncer (0.1.2)
bundler-fastupdate (0.0.3)
bundler-github (0.2.0)
bundler-maglev- (1.0.21)
bundler-talks (0.0.4)
bundler08 (0.8.5)
bundler_bash_completion (0.1.1)
bundler_geminabox (0.0.1)
bundler_local_development (0.3.0)
bundler_push_host (0.0.1)
bundler_timer (1.1.2)
bundler has installed , but i don't know why its not working?
when i ran
gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.15
- RUBY VERSION: 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux]
- INSTALLATION DIRECTORY: /home/username/ruby/gems
- RUBY EXECUTABLE: /usr/bin/ruby
- EXECUTABLE DIRECTORY: /home/username/ruby/gems/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /home/username/ruby/gems
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- "gempath" => []
- "gem" => "--remote --gen-rdoc --run-tests"
- "gemhome" => "/home/username/ruby/gems"
- "rdoc" => "--inline-source --line-numbers"
- REMOTE SOURCES:
- http://rubygems.org/
echo $PATH
/usr/local/jdk/bin:/home/username/perl5/bin:/usr/kerberos/bin:/usr/lib/courier-imap/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/home/username/bin
uname -mrsn
Linux osprey.arvixe.com 2.6.18-374.3.1.el5.lve0.8.44 x86_64
more /proc/version
Linux version 2.6.18-374.3.1.el5.lve0.8.44 (mockbuild#buildfarm.cloudlinux.com)
(gcc version 4.1.2 20080704 (Red Hat 4.1.2-51)) #1 SMP Mon Oct 3 18:27:54 EEST 2
011
which gem
/usr/bin/gem
which ruby
/usr/bin/ruby
which rails
/usr/bin/rails
ruby -v
ruby 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux]
rails -v
Rails 2.3.14
gem -v
1.8.15
locate bundle
locate: can not open `/var/lib/mlocate/mlocate.db': Permission denied
Guys Please help me basic bundle install command is not working , so i don't know what todo and also i am new to ruby on rails.
I solved my problem, hosting guys need to give some permissions.
you always need to install gems on our home directory particularly in shared hosting
bundle install --path /home/username/bundle
I want to install rails 3.2.1 on ubuntu 11.10.
I already installed rbenv, ruby-build.
When I run
gem install rails
it tells me
Successfully installed rails-3.2.1
1 gem installed
Installing ri documentation for rails-3.2.1...
Installing RDoc documentation for rails-3.2.1...
then after rbenv rehash, if I run "rails", it cannot find the binary file. So I guess rails is NOT installed. How can I do?
edit:
~ » gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.15
- RUBY VERSION: 1.9.3 (2011-10-30 patchlevel 0) [x86_64-linux]
- INSTALLATION DIRECTORY: /home/jafar/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: /home/jafar/.rbenv/versions/1.9.3-p0/bin/ruby
- EXECUTABLE DIRECTORY: /home/jafar/.rbenv/versions/1.9.3-p0/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /home/jafar/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1
- /home/jafar/.gem/ruby/1.9.1
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
edit 2 :
gem list tells me the rails gem is installed. When I search for the rails binary I find this :
~ » find . -name rails
./.oh-my-zsh/plugins/rails
./Downloads/robbyrussell-oh-my-zsh-3629270/plugins/rails
./.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/railties-3.2.1/guides/code/getting_started/script/rails
./.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/railties-3.2.1/bin/rails
./.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails
./.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/generators/rails
./.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/generators/rails/app/templates/script/rails
./.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/generators/rails/plugin_new/templates/rails
./.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-rails-3.2.4/test/fixtures/engine_project/script/rails
./.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-rails-3.2.4/test/fixtures/engine_project/test/dummy/script/rails
./.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-rails-3.2.4/test/fixtures/scss_project/script/rails
./.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-rails-3.2.4/test/fixtures/sass_project/script/rails
./.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-rails-3.2.4/lib/sass/rails
./.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-rails-3.2.4/lib/rails
./.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/activerecord-3.2.1/lib/rails
./.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionmailer-3.2.1/lib/rails
./.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/jquery-rails-2.0.0/lib/jquery/rails
./.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sass-3.1.12/rails
./.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/coffee-rails-3.2.2/lib/coffee/rails
./.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/coffee-rails-3.2.2/lib/rails
./.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/bin/rails
The rails binary should be in ~/.rbenv/shims but it's not. ~/.rbenv/shims is in my PATH
You need to add the bin subdirectory of /home/jafar/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1 to your PATH, e.g. edit your ~/.bashrc file and add this line at the end:
export PATH=/home/jafar/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/bin:$PATH
And then see what the command rails --version will output.
My rails application is working well under my user:
$ rails server
=> Booting WEBrick
=> Rails 3.0.5 application starting in development on htttp://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2011-03-30 01:56:29] INFO WEBrick 1.3.1
[2011-03-30 01:56:29] INFO ruby 1.9.2 (2011-02-18) [x86_64-darwin10.7.0]
[2011-03-30 01:56:29] INFO WEBrick::HTTPServer#start: pid=3899 port=3000
But I need to run it under port 80, so running it as sudo gives me this:
$ sudo rails server -p 80
/Users/jamez/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:900:in `report_activate_error': Could not find RubyGem rails (>= 0) (Gem::LoadError)
from /Users/jamez/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:248:in `activate'
from /Users/jamez/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:1276:in `gem'
from /Users/jamez/.rvm/gems/ruby-1.9.2-p180/bin/rails:18:in `<main>'
More info:
$ ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.7.0]
$ sudo ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.7.0]
$ rails -v
Rails 3.0.5
$ sudo rails -v
/Users/jamez/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:900:in `report_activate_error': Could not find RubyGem rails (>= 0) (Gem::LoadError)
from /Users/jamez/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:248:in `activate'
from /Users/jamez/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:1276:in `gem'
from /Users/jamez/.rvm/gems/ruby-1.9.2-p180/bin/rails:18:in `<main>'
$ gem list --local rails
*** LOCAL GEMS ***
rails (3.0.5)
$ sudo gem list --local rails
*** LOCAL GEMS ***
rails (3.0.5)
$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.6.2
- RUBY VERSION: 1.9.2 (2011-02-18 patchlevel 180) [x86_64-darwin10.7.0]
- INSTALLATION DIRECTORY: /Users/jamez/.rvm/gems/ruby-1.9.2-p180
- RUBY EXECUTABLE: /Users/jamez/.rvm/rubies/ruby-1.9.2-p180/bin/ruby
- EXECUTABLE DIRECTORY: /Users/jamez/.rvm/gems/ruby-1.9.2-p180/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-10
- GEM PATHS:
- /Users/jamez/.rvm/gems/ruby-1.9.2-p180
- /Users/jamez/.rvm/gems/ruby-1.9.2-p180#global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
$ sudo gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.6.2
- RUBY VERSION: 1.9.2 (2011-02-18 patchlevel 180) [x86_64-darwin10.7.0]
- INSTALLATION DIRECTORY: /Users/jamez/.rvm/gems/ruby-1.9.2-p180
- RUBY EXECUTABLE: /Users/jamez/.rvm/rubies/ruby-1.9.2-p180/bin/ruby
- EXECUTABLE DIRECTORY: /Users/jamez/.rvm/gems/ruby-1.9.2-p180/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-10
- GEM PATHS:
- /Users/jamez/.rvm/gems/ruby-1.9.2-p180
- /Users/jamez/.rvm/gems/ruby-1.9.2-p180#global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
Any idea of what's going on?
How can I make it work with and without sudo?
RVM is preventing sudo from seeing the Rails binary.
To get around this, use rvmsudo:
> rails -v
Rails 2.3.11
> sudo rails -v
/Users/dan/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems.rb:779:in `report_activate_error': Could not find RubyGem rails (>= 0) (Gem::LoadError)
from /Users/dan/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems.rb:214:in `activate'
from /Users/dan/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems.rb:1082:in `gem'
from /Users/dan/.rvm/gems/ree-1.8.7-2010.02#crm/bin/rails:18
> rvmsudo rails -v
Rails 2.3.11
You are using Rails 3, which uses Bundler, which installs gems on a per-user basis, so before you can run the app as a given user, you must first run bundle install while logged in as that user. I think that will make it work for you.
By the way, I assume you know that running anything as root is risky. You probably want to configure Apache and Passenger (or something like that) to serve up your Rails application over port 80.
I just upgraded my ubuntu from 9.10 to 10.04,
before the upgrade everything was fine, but after the upgrade I can no
longer run script/console.
Loading development environment (Rails 2.3.10)
/usr/local/lib/site_ruby/1.9.1/rubygems.rb:779:in
`report_activate_error':Gem::LoadError: RubyGem version error:
rails(2.3.4 not = 2.3.10)
/usr/lib/ruby/1.9.1/irb/init.rb:264:in `require':LoadError: no such file
to load -- console_app
/usr/lib/ruby/1.9.1/irb/init.rb:264:in `require':LoadError: no such file
to load -- console_with_helpers
# gem -v
1.5.2
# ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [i686-linux]
# rails -v
Rails 2.3.10
Google was not much help so far :(
Update:
After trying several options, I updated to 10.10 and now getting following errors
$ ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [i686-linux]
$ gem -v
1.6.2
$ rails -v
Rails 2.3.10
$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.6.2
- RUBY VERSION: 1.9.2 (2010-08-18 patchlevel 0) [i686-linux]
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: /usr/local/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /usr/local/lib/ruby/gems/1.9.1
- /home/recmend/.gem/ruby/1.9.1
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
$ whereis ruby
ruby: /usr/bin/ruby1.8 /usr/bin/ruby /usr/lib/ruby /usr/local/bin/ruby /usr/local/lib/ruby /usr/share/man/man1/ruby.1.gz
$ whereis gem
gem: /usr/bin/gem /usr/local/bin/gem
$ script/console
Loading development environment (Rails 2.3.10)
/usr/local/lib/site_ruby/1.9.1/rubygems/source_index.rb:68:in `installed_spec_directories': undefined method `path' for Gem:Module (NoMethodError)
from /usr/local/lib/site_ruby/1.9.1/rubygems/source_index.rb:58:in `from_installed_gems'
from /usr/local/lib/site_ruby/1.9.1/rubygems.rb:883:in `source_index'
Off to next problem...
the problem is in your Rubies versions. You see:
$ ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [i686-linux]
but
Loading development environment (Rails 2.3.10) /usr/local/lib/site_ruby/1.9.1/rubygems.rb:779:in
It is trying to load 1.9.1 with all its gems.
What you can do here.
which ruby will return your Ruby 1.9.2 dir
add it into your PATH export PATH=/your/ruby1.9.2/dir/bin:$PATH
enjoy :)