Using https://github.com/maestrodev/puppet-rvm, I have this code to install
a gem I copied in /tmp/mailcatcher.gem
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
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/b540a9db-96f6-4656-bce7-e9649130c7ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.