Created
April 17, 2012 13:00
-
-
Save alexpc/2405825 to your computer and use it in GitHub Desktop.
Small wrapper for Ruby scripts running on RVM Single-User installations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Change those for valid ones | |
HOMEDIR=/home/yourlogin | |
RUBYVER="1.9.2-p318" | |
# Adding to $PATH paths for rvm and ruby executables | |
PATH=$PATH:$HOMEDIR/.rvm/bin:$HOMEDIR/.rvm/rubies/ruby-$RUBYVER/bin/ | |
# Creating variable containing path to installed gems | |
RUBYLIB=$HOMEDIR/.rvm/gems/ruby-$RUBYVER/gems/:$HOMEDIR/.rvm/gems/ruby-$RUBYVER@global/gems/ | |
# Modify locales for your needs, for me it was necessary to use UTF-8 while running with arguments containing non-iso characters | |
LC_ALL=pl_PL.UTF-8 | |
LANG=pl_PL.UTF-8 | |
# Running script | |
# Usage: rubywrap.sh ruby rubyscript.rb | |
$@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment