Using RubyGems package in Ubuntu Feisty Fawn apt-get Repository

After receiving a comment on my post about installing Rails on Ubuntu Feisty Fawn via RubyGems, I found, to my surprise, there exists a rubygems package in the Ubuntu Feisty Fawn universe repository. Though it is a bit outdated at 0.9.0, while the latest is 0.9.2.

So the commenter ran into a problem trying to use the repository installed rubygems and when executing in the terminal rails Terminal, they would get a command not found error.

In actual fact, the rails program does exist but in another path ( /var/lib/gems/1.8/bin File ).

There are two solutions to this. If you want to use the rubygems package from the repository, go with solution 1. Personally, I would go with solution 2.

Select your poison.

Solution 1: Modify your PATH environment variable

Open up ~/.bashrc File (This is in your home directory). Append the following:

export PATH=$PATH:/var/lib/gems/1.8/bin

Now either source your .bashrc (source ~/.bashrc Terminal) or restart your terminal. But it should work fine after this.

Solution 2: Remove the rubygems package and install via source

sudo apt-get remove rubygems

Then continue with my guide on installing Rails on Ubuntu Feisty Fawn via RubyGems.

This entry was posted in RubyGems, Ubuntu Feisty Fawn. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*