How to run a program without specifying the full path?

前端 未结 2 795
梦毁少年i
梦毁少年i 2021-01-25 16:59

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 ever

2条回答
  •  渐次进展
    2021-01-25 17:13

    You can create a soft link:

    ln -s /var/lib/gems/1.8/bin/rails /usr/local/bin
    

    Then you can run rails directly.

提交回复
热议问题