error when installing Rails

Hello All,

I have just created a new install of Ubuntu 8.10, and have proceeded to install all of the necessary packages for Ruby on Rails. I installed ruby, gems, and rails, but when i run rails -v, i get the following error:

root@li41-22:~# rails -v

-bash: rails: command not found

any guidance would be greatly appreciated


3 Replies

It's probably just not in your path? The deb package for rails installs it to /usr/bin/rails, check to see if that file exists. I'm not sure where it goes if you install it from gem, but i think that is the recommended method.

How did you install Rails? Via Rubygems or Aptitude?

If you installed via RubyGems, it's probably in a directory like /var/lib/gems/1.8/bin

you have to create the symlinks :)

sudo ln -s /usr/bin/ruby1.8 /usr/bin/ruby

sudo ln -s /usr/bin/ri1.8 /usr/bin/ri

sudo ln -s /usr/bin/rdoc1.8 /usr/bin/rdoc

sudo ln -s /usr/bin/irb1.8 /usr/bin/irb

edit: ops i didin't see this post was this old. Maybe this will be usefull for future generation :P


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct