Can't load gem

J

Jule Nissen

Hi!

I've run into some trouble while updating my ruby-version on ubuntu.
I installed ruby1.9.1 linked /usr/bin/ruby to ruby1.9.1
installed rubygems1.3.7 with ruby1.9.1.

My gem env output is this:

RubyGems Environment:
- RUBYGEMS VERSION: 1.3.7
- RUBY VERSION: 1.9.1 (2010-01-10 patchlevel 378) [i486-linux]
- INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: /usr/bin/ruby1.9.1
- EXECUTABLE DIRECTORY: /usr/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /usr/lib/ruby/gems/1.9.1
- /home/jule/.gem/ruby/1.9.1
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/

When I run
ruby --disable-gems -S irb
require 'rubygems'
require 'ri_cal'

everything works fine!

Does ruby load a wrong gem version by default?
How is it possible to configure this?
Is it an ruby or an ubuntu issue?

Really don't know how to find a solution.

Thanks in advance.

landge

PS: I haven't set any environment variables
 
J

Jule Nissen

Jule said:
Hi!

I've run into some trouble while updating my ruby-version on ubuntu.
I installed ruby1.9.1 linked /usr/bin/ruby to ruby1.9.1
installed rubygems1.3.7 with ruby1.9.1.
when I run

irb(main):001:0> require 'ri_cal'

I get this error:

LoadError: no such file to load -- ri_cal
from (irb):1:in `require'
from (irb):1
from /usr/bin/irb:12:in `<main>'
irb(main):002:0>

with require gems its like this:


irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'ri_cal'
LoadError: no such file to load -- ri_cal
from (irb):2:in `require'
from (irb):2
from /usr/bin/irb:12:in `<main>'
irb(main):003:0>


My gem env output is this:

RubyGems Environment:
- RUBYGEMS VERSION: 1.3.7
- RUBY VERSION: 1.9.1 (2010-01-10 patchlevel 378) [i486-linux]
- INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: /usr/bin/ruby1.9.1
- EXECUTABLE DIRECTORY: /usr/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /usr/lib/ruby/gems/1.9.1
- /home/jule/.gem/ruby/1.9.1
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/

When I run
ruby --disable-gems -S irb
require 'rubygems'
require 'ri_cal'

everything works fine!

Does ruby load a wrong gem version by default?
How is it possible to configure this?
Is it an ruby or an ubuntu issue?

Really don't know how to find a solution.

Thanks in advance.

landge

PS: I haven't set any environment variables
 
R

Rick DeNatale

Jule said:
Hi!

I've run into some trouble while updating my ruby-version on ubuntu.
I installed ruby1.9.1 linked /usr/bin/ruby to ruby1.9.1
installed rubygems1.3.7 with ruby1.9.1.
when I run

irb(main):001:0> require 'ri_cal'

I get this error:

LoadError: no such file to load -- ri_cal
=A0from (irb):1:in `require'
=A0from (irb):1
=A0from /usr/bin/irb:12:in `<main>'
irb(main):002:0>

with require gems its like this:


irb(main):001:0> require 'rubygems'
=3D> true
irb(main):002:0> require 'ri_cal'
LoadError: no such file to load -- ri_cal
=A0from (irb):2:in `require'
=A0from (irb):2
=A0from /usr/bin/irb:12:in `<main>'
irb(main):003:0>


My gem env output is this:

RubyGems Environment:
=A0 - RUBYGEMS VERSION: 1.3.7
=A0 - RUBY VERSION: 1.9.1 (2010-01-10 patchlevel 378) [i486-linux]
=A0 - INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.9.1
=A0 - RUBY EXECUTABLE: /usr/bin/ruby1.9.1
=A0 - EXECUTABLE DIRECTORY: /usr/bin
=A0 - RUBYGEMS PLATFORMS:
=A0 =A0 - ruby
=A0 =A0 - x86-linux
=A0 - GEM PATHS:
=A0 =A0 =A0- /usr/lib/ruby/gems/1.9.1
=A0 =A0 =A0- /home/jule/.gem/ruby/1.9.1
=A0 - GEM CONFIGURATION:
=A0 =A0 =A0- :update_sources =3D> true
=A0 =A0 =A0- :verbose =3D> true
=A0 =A0 =A0- :benchmark =3D> false
=A0 =A0 =A0- :backtrace =3D> false
=A0 =A0 =A0- :bulk_threshold =3D> 1000
=A0 - REMOTE SOURCES:
=A0 =A0 =A0- http://rubygems.org/

When I run
ruby --disable-gems -S irb
require 'rubygems'
require 'ri_cal'

everything works fine!

Does ruby load a wrong gem version by default?
How is it possible to configure this?
Is it an ruby or an ubuntu issue?

Really don't know how to find a solution.

Thanks in advance.

landge

PS: I haven't set any environment variables

Have you installed the ri_cal gem under 1.9?

there are separate gem directories for 1.8 and 1.9.

Probably not the problem but Ruby 1.9.1 is getting rather old, but I
guess that's the latest debian/ubuntu packaged version of Ruby.

--=20
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale
 
J

Jule Nissen

Rick said:
Have you installed the ri_cal gem under 1.9?

there are separate gem directories for 1.8 and 1.9.

Probably not the problem but Ruby 1.9.1 is getting rather old, but I
guess that's the latest debian/ubuntu packaged version of Ruby.

I've installed ri_cal under

/usr/lib/ruby/gems/1.9.1/gems

and I added this path to the $RUBYLIB variable. It still doesn't work.
Maybe I should compile a newer ruby version?

Thanks

PS: Your ri_cal gem works great when it's loaded!!
 
J

Jule Nissen

I've installed ruby 1.9.2 from source and everything works fine now!
So, there must be a buck in the ruby 1.9 ubuntu version..

Thanks!
 
R

Rick DeNatale

I've installed ruby 1.9.2 from source and everything works fine now!
So, there must be a buck in the ruby 1.9 ubuntu version..

I stopped using debian packaged Rubies a long time ago. They just
don't keep up well enough, and the packagers tend to break stuff. I
was advised to install from source as a padawan Rubyist by Andy Hunt
of the Pragmatic Programmers.

I do the same thing on Mac OS X.

And these days I do the installs and manage multiple ruby versions using RVM.



--
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,149
Members
46,695
Latest member
StanleyDri

Latest Threads

Top