SiddharthaRT
SiddharthaRT

Reputation: 2297

Installing Ruby 1.9.3 in Ubuntu giving errors

I had to do a lot of juggling when I tried to install Ruby 1.9.3, and it is mentioned in community that ruby1.9.1 is the package to be installed for Ruby 1.9.3. Now, if i run ruby, I get

<internal:gem_prelude>:1:in `require': 
        cannot load such file -- rubygems.rb (LoadError)
        from <internal:gem_prelude>:1:in `<compiled>'

What can I do?

FYI, I uninstalled everything in my comp by sudo apt-get remove --purge ruby1.8 libruby1.8

Then I installed Ruby1.9.1 by sudo apt-get install ruby1.9.1 libruby1.9.1

What do i do?

EDIT:

After the comments, I used rvm to install newer ruby 1.9.3, ANd now everything is perfect.

MORAL:

dont use apt-get for ruby. Use rvm, gem and other ruby tools. It's brilliant.

Upvotes: 0

Views: 1448

Answers (1)

Casper
Casper

Reputation: 34308

If you installed Ruby system-wide with apt then the latest RubyGems won't be included in the install. Ruby is the language, RubyGems is the package manager which has to be installed separately.

To install RubyGems just go here and follow the instructions:

  1. Download from above.
  2. Unpack into a directory and cd there
  3. Install with: ruby setup.rb (you may need admin/root privilege)
  4. For more details and other options, see: ruby setup.rb --help

Upvotes: 1

Related Questions