Find the answer to your Linux question:
Results 1 to 2 of 2
When I run scripts with a shebang such as #!/usr/bin/env ruby I'd like to invoke a particular ruby. Right now, I haven't told /usr/bin/env where I installed ruby to and ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2011
    Posts
    18

    How to set /usr/bin/env ruby to an arbitrary ruby?


    When I run scripts with a shebang such as #!/usr/bin/env ruby I'd like to invoke a particular ruby. Right now, I haven't told /usr/bin/env where I installed ruby to and I would very much like to.




    What I'm doing with this:

    I'm working on a bash script and one of the many things it does is install rvm. But rvm is a really weird thing and so you can't use it from scripts to setup rubies. But you can install it from a script, and you can use it to install rubies from a script. From there, though, if I try to install a gem, I get an error that

    Code:
    /usr/bin/env: ruby: No such file or directory

  2. #2
    Just Joined!
    Join Date
    Aug 2011
    Posts
    18
    Ughh... solved it

    Code:
    export PATH=$PATH:`echo ~/.rvm/rubies/ruby-1.9.3-*/bin`
    I was specifying export PATH=$PATH:`echo ~/.rvm/rubies/ruby-1.9.3-*/bin/ruby` by typo. Oops =/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •