rvm_gem { 'mailcatcher':
name => 'mailcatcher',
source => '/tmp/mailcatcher.gem',
ruby_version => 'ruby-1.9.3-p547',
ensure => latest,
require => [
File['/tmp/mailcatcher.gem'],
Rvm_system_ruby['ruby-1.9.3-p547']
],
}
How can i run the installed gem script afterwards, with the new path set by ruby/rvm?
If i do this, it fails with "could not find command mailcatcher":
exec { 'start mailcatcher':
command => "mailcatcher --http-ip=0.0.0.0",
require => Rvm_gem['mailcatcher'],
}
I need something to refresh the env variables, or something to get the new installed gem path.
I could hardcode the new path since i know which version of ruby i've installed:
exec { 'start mailcatcher':
command => "mailcatcher --http-ip=0.0.0.0",
require => Rvm_gem['mailcatcher'],
cwd => "/usr/local/rvm/ruby-1.9.3-p547/bin/"
}
..but there must be a better way