In Ubuntu 12.04, gem install rails
succeeds, but when I try rails -v
I get an error message saying:
The program rails is currently not installed. You can install it by ...
How can I get the rails
command to work?
I've never had this problem, but for rails to be found, the rails binary file must be on the path. That is, in a directory listed in the PATH environment variable.
To see the value of the PATH environment variable.
echo $PATH
env | grep PATH
You might try uninstalling rails, and then reinstalling.
Problem solved!!!
I just type source .rvm/scripts/rvm
in my HOME path, and it works!!!
You should put the following in your ~/.profile
or ~/.bashrc
, because in your solution you will need to write your source ...
after every reboot:
# This loads RVM into a shell session.
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.