Trouble with gems on Ubuntu

I’m trying to install rails in my laptop, ubuntu partition, but gems
won’t work. This is what it says:

$ sudo gem update --system
/usr/bin/gem:23: uninitialized constant Gem::GemRunner (NameError)

Obviously, the error exists here:


#! /usr/bin/ruby1.8
#–

Copyright 2006 by Chad F., Rich Kilmer, Jim W. and others.

All rights reserved.

See LICENSE.txt for permissions.

#++

require ‘rubygems’
Gem.manage_gems

required_version = Gem::Version::Requirement.new(">= 1.8.0")
unless required_version.satisfied_by?(Gem::Version.new(RUBY_VERSION))
puts “Expected Ruby Version #{required_version}, was
#{RUBY_VERSION}”
exit(1)
end

We need to preserve the original ARGV to use for passing gem options

to source gems. If there is a – in the line, strip all options

after

it…its for the source building process.

args = !ARGV.include?("–") ? ARGV.clone : ARGV[0…ARGV.index("–")]

Gem::GemRunner.new.run(args) #ERROR HERE!!!

What can I do to fix this?

did you use apt-get ?

No. I used the directions here (note, I used rubygems-1.1.1.tgz
instead):
https://help.ubuntu.com/community/RubyOnRails

Stick with Ubuntu rubygems and spare yourself the headaches. It works
fine even at 0.9.4.

– Long
http://FATdrive.tv/wall/trakb/10-Long
http://FATdrive.tv/ - store, play, share

----- Original Message -----
Taro wrote:

No. I used the directions here (note, I used rubygems-1.1.1.tgz
instead):
https://help.ubuntu.com/community/RubyOnRails

On May 8, 7:27 pm, glasswing28 [email protected] wrote:

did you use apt-get ?

On May 8, 4:22 pm, Taro [email protected] wrote:

I’m trying to install rails in my laptop, ubuntu partition, but
gems

#–

Copyright 2006 by Chad F., Rich Kilmer, Jim W. and

others.

All rights reserved.

See LICENSE.txt for permissions.

#++

require ‘rubygems’
Gem.manage_gems

required_version = Gem::Version::Requirement.new(">= 1.8.0")
unless
required_version.satisfied_by?(Gem::Version.new(RUBY_VERSION))

puts “Expected Ruby Version #{required_version}, was
#{RUBY_VERSION}”
exit(1)
end

We need to preserve the original ARGV to use for passing gem

options

to source gems. If there is a – in the line, strip all options

after

it…its for the source building process.

args = !ARGV.include?("–") ? ARGV.clone :
ARGV[0…ARGV.index("–")]

Taro wrote:

What can I do to fix this?

In usr/bin/gem add

require ‘rubygems/gem_runner’

right after the

require ‘rubygems’

statement.

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