Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用我的 RVM/Ruby 安装,我的 shebang 线是可怕的:
#!/home/kevin/.rvm/rubies/ruby-1.9.3-p286/bin/ruby
有没有一种简单的方法来缩短它/使用别名?
您是否在 RVM 本身生成或修改的脚本(例如 gems 中的可执行文件)中看到了这一点?如果是这样,我会保持原样;它没有伤害任何东西。
否则,您可以放入#!/usr/bin/env ruby自己的脚本,以使用任何给定时间恰好是最新的 Ruby;将它与选择正确的 RVM Ruby 的 .rvmrc 结合起来。
#!/usr/bin/env ruby