Search code examples
rvmruby-1.9.3linux-mint

RVM + Ruby 1.9.3 on Linux Mint 12 - Is there a way to shorten the shebang line?


With my RVM/Ruby installation, my shebang line is the monstrous:

#!/home/kevin/.rvm/rubies/ruby-1.9.3-p286/bin/ruby

Is there a simple way to shorten it/use an alias?


Solution

  • Are you seeing that in the scripts that RVM itself generates or modifies (e.g. executables in gems)? If so, I would just leave it as is; it isn't hurting anything.

    Otherwise you can put #!/usr/bin/env ruby in your own scripts, to use whichever Ruby happens to be current at any given time; combine that with a .rvmrc that selects the right RVM Ruby.