`require': no such file to load -- rubygems
I am new to gems. Do you see a way to fix the "no such file to load -- rubygems" load error?
Here is the error in action:
$ spec --format specdoc note_spec.rb
./spec_helper.rb:10:in `require': no such file to load -- rubygems (LoadError)
Line 10 of spec_helper.rb file is:
require 'rubygems'
I am running Jruby 1.4.0 on Ubuntu 10.4. Before I installed Jruby, I was running Ruby 1.9, which has since been removed.
The following is every relevant diagnostic I could think of:
/usr/lib/jruby/lib/ruby/site_ruby/1.8$ ls
gauntlet_rubygems.rb rbconfig rubygems.rb
gemconfigure.rb rubygems ubygems.rb
$ which rubygems.rb
<empty>
$ which rubygems
<empty>
$ jirb
>> require 'rubygems'
=> true
>> $:.each { |d| puts d}
/usr/lib/jruby//lib/ruby/site_ruby/1.8
/usr/lib/jruby//lib/ruby/site_ruby/shared
/usr/lib/jruby//lib/ruby/1.8
.
=> ...
>> exit
$ jruby -v
jruby 1.4.0 (ruby 1.8.7 patchlevel 174) (2010-02-11 6586) (OpenJDK Client VM 1.6.0_18) [i386-java]
$ ruby -v
The program 'ruby' is currently not installed.
$ gem env
The program 'gem' can be found in the following packages:
* rubygems1.8
* rubygems1.9.1
Try: sudo apt-get install <selected package>
Thank you.
Comments are currently closed for this discussion. You can start a new one.
2 Posted by wolf_volpi on 19 Sep, 2010 08:37 PM
Problem solved, all it needed was two more gems:
$ sudo jruby -S gem install rspec
$ sudo jruby -S gem install hpricot
wolf_volpi closed this discussion on 19 Sep, 2010 08:38 PM.