Reputation: 38772
I'm trying to execute shell commands from Ruby, but in order to these commands to work properly a RVM environment has to be selected. I don't find the way to do so.
For example I'm trying:
require "rubygems"
require "rvm"
RVM.gemset_use! "ruby-1.9.3-p286@my_project"
%x[rails s]
But looks like the rvm environment is not been loaded because the gems are not found.
The only way I'm seeing is
%x[source /Users/fguillen/.rvm/environments/ruby-1.9.3-p286@my_project && rails s]`
Is this the best way to do this?
Upvotes: 1
Views: 165