Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I had used below mentioned commands to install rails in ubuntu 12.10

sudo apt-get update

sudo apt-get install curl

\curl -L https://get.rvm.io | bash -s stable

source ~/.rvm/scripts/rvm

rvm requirements

rvm install 1.9.3

rvm use 1.9.3 --default

rvm rubygems current

gem install rails

Every steps are doing good, but it works for terminal which we are installing rails. If we exit from the terminal and work on a new terminal then the following error occurs.

The program 'rails' can be found in the following packages: * rails * ruby-railties-3.2 Try: sudo apt-get install

Help me to install rails.

share|improve this question

migrated from stackoverflow.com Feb 1 '13 at 15:48

This question came from our site for professional and enthusiast programmers.

add comment

3 Answers

You have to load the rvm script into your shell.

Put this at the end of your .zshrc or .bashrc or whatever depending on your shell :

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" 
share|improve this answer
    
I can't make use of this command, if u can plz instruct step by step process how to put this code at the end of .bashrc file. –  Mothi rajha Feb 16 '13 at 6:17
    
open it with a text editor, for instance, gedit : gedit ~/.bashrc –  Intrepidd Feb 16 '13 at 10:43
add comment

Not really sure what exactly your problem is. If you use rvm and have installed Rails with it, you may have to use

rvm use 1.9.3 after gem install rails.

Then you may or may have not a gemset with this. So:

bundle install

should install Rails gem in this gemset. Maybe use

rvm sudo bundle install

or just manually install the Rails gem.

share|improve this answer
add comment

source ~/.rvm/scripts/rvm rvm --default use 1.9.3-p374

By running the following code at each terminal Ruby on rails get starts to work.
This problem is occurred because

share|improve this answer
    
sorry for such a delay reply, plz tell me the reason why this happens –  Mothi rajha Jun 25 '13 at 13:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.