i came across a very strange issue. i have installed rails through rvm & tested the installation. next day when i logged into system neither ruby nor rails command was found. I reinstalled everything again (rvm, ruby, rails) and tested last night. now this time i kept a terminal open and hibernated the system. but as I am trying to run rails on the new terminal instance it is giving error "bash: rails: command not found"
though other commands ruby, rvm, and gem are working and its showing in rails in"gem list"
however when i tried running it into the instance i kept open it works fine. what could be the issue? i have no clue really. :(
echo $PATH
(terminalA - rails not working)
terminalA: /usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:
/usr/sbin:/sbin:/home/ankit/.rvm/bin:/home/ankit/bin:
/home/ankit/.rvm/bin
terminalB: /home/ankit/.rvm/gems/ruby-2.0.0-p353/bin:
/home/ankit/.rvm/gems/ruby-2.0.0-p353@global/bin:
/home/ankit/.rvm/rubies/ruby-2.0.0-p353/bin:
/home/ankit/.rvm/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:
/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/ankit/bin
EDIT: although i see that by updating the path it would work. but why is it showing 2 different values for the same system at the same time? is there anything know that cause such problem?
EDIT2: I noticed that, this command is getting removed from path everytime system wake up from hibernate. it works on terminal instance which i left open before hibernate. but on every new instance of terminal i get the command not found error.
whereis ruby
andecho $PATH
? – schaiba Dec 18 '13 at 20:17echo $PATH
output to make it more readable. Feel free to rollback if you feel the edit is unnecessary. – Joseph R. Dec 18 '13 at 20:35