Created
October 2, 2011 17:44
-
-
Save danmayer/1257690 to your computer and use it in GitHub Desktop.
This helps setup and trust a new gemset in a project
This file contains 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
#!/usr/bin/env ruby | |
# example usage: init_gemset mygemset | |
# to use this setup an alias in your .bash_profile | |
# | |
# #setup new gemset | |
# function initgemset() | |
# { | |
# local myresult=`ruby /Users/danmayer/projects/script_helpers/init_gemset.rb $#1` | |
# eval "$myresult" | |
# } | |
# | |
# alias init_gemset='initgemset' | |
# | |
# puts "creating gemset #{ARGV[0]} and .rvmrc with 'rvm use ree-1.8.7-2011.03@#{ARGV[0]}'" | |
`rvm use ree` | |
`rvm gemset create #{ARGV[0]}` | |
`echo 'rvm use ree-1.8.7-2011.03@#{ARGV[0]}' > .rvmrc` | |
old_dir = `pwd`.strip | |
rvmrc_file = "#{old_dir}/.rvmrc" | |
`rvm rvmrc trust #{rvmrc_file}` | |
puts "rvm use ree-1.8.7-2011.03@#{ARGV[0]}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment