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

···

--
Posted via http://www.ruby-forum.com/\.

Jule Nissen 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 `<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

--
Posted via http://www.ruby-forum.com/\.

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.

···

On Wed, Sep 22, 2010 at 5:46 AM, Jule Nissen <tschellhorn@gmail.com> wrote:

Jule Nissen 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 `<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

--
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Github: rubyredrick (Rick DeNatale) · GitHub
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

--
Posted via http://www.ruby-forum.com/\.

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!

···

--
Posted via http://www.ruby-forum.com/.

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.

···

On Wed, Sep 22, 2010 at 9:14 AM, Jule Nissen <tschellhorn@gmail.com> 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..

--
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Github: rubyredrick (Rick DeNatale) · GitHub
Twitter: @RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale