7 May 2012
Using Ruby shell scripts with RVM
Posted on May 7, 2012
After using RVM to manage my ruby environments I had some problems finding a solution to choose the correct ruby and gemset when running my ruby shell scripts. Here is what I have done to make it work.
First I created a separate gemset where I installed all needed gems into. I use one gemset for all scripts but of course it is up to you to use the default gemset or even one gemset per script.
> rvm use ruby-1.9.3-p194@scripts --create
Getting a script to use a specific ruby version and gemset is also very easy. RVM creates a wrapper script in “.rvm/bin” for every installed gemset. So using the following as the shebang line will run your ruby script with the correct environment:
#!/usr/bin/env ruby-1.9.3-p194@scripts
Recommended reading
- Migliori Casino Non Aams
- Casino Crypto
- Non Gamstop Casinos
- Casinos Not On Gamstop
- New Betting Sites
- Non Gamstop Casino
- Non Gamstop Casinos UK
- Casino Sites Not On Gamstop
- Casino En Ligne Fiable
- Best Online Casino Canada
- Casino En Ligne Meilleur Site
- Non Gamstop Casino Sites UK
- UK Online Casinos Not On Gamstop
- Best Non Gamstop Casinos
- Non Gamstop Casinos UK