Can't load gem

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:

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

Jule N. wrote:

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
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
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:

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

On Wed, Sep 22, 2010 at 5:46 AM, Jule N. [email protected]
wrote:

I get this error:
irb(main):001:0> require ‘rubygems’

- x86-linux
 - http://rubygems.org/

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.


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

Rick Denatale wrote:

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!!


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

On Wed, Sep 22, 2010 at 9:14 AM, Jule N. [email protected]
wrote:

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 H.
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

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!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs