Skip to content

Instantly share code, notes, and snippets.

@tomas-stefano
Forked from nathmisaki/gist:425733
Created June 4, 2010 19:32
Show Gist options
  • Save tomas-stefano/425846 to your computer and use it in GitHub Desktop.
Save tomas-stefano/425846 to your computer and use it in GitHub Desktop.
HOME_DIR = "/home/nelson"
versions = Dir[File.join('#{HOME_DIR}/.rvm/rubies', "ruby*")]
versions.each do |version|
version.match(/-([\d\.]\+)-/)
ruby_version_string = version.split('/').last
ruby_version = $1
ENV['GEM_PATH'] = Dir["#{HOME_DIR}/.rvm/gems/#{ruby_version_string}*/"].join(':')
Dir.chdir "#{HOME_DIR}/projects/morpheus"
system(%&#{File.join(version, 'bin/ruby')} -r 'rubygems' -e "STDOUT.puts Gem.source_index.spec_dirs ;STDOUT.puts RUBY_VERSION; load Gem.bin_path('rspec', 'spec')" spec &)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment