How come when I type "rails", it won't work... but when I type "/var/lib/gems/1.8/bin/rails" it will work? How do I bind it so that I don't have to type the full path everytime?
相关问题
- Is shmid returned by shmget() unique across proces
- how to get running process information in java?
- Error building gcc 4.8.3 from source: libstdc++.so
- Why should we check WIFEXITED after wait in order
- Null-terminated string, opening file for reading
You need to edit your
$PATH
environmental variable.For example, in your
.bashrc
:Alternatively, you can use an alias, in your
.bashrc
:Or you could even put the rails binary (or a symlink) to one of the directories listed in your
$PATH
. To see those directories, typeecho $PATH
.You can create a soft link:
Then you can run
rails
directly.