Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

From directory with .ruby-version, rvm_system_ruby never installs anything #45

Open
mcary opened this issue Jun 24, 2014 · 1 comment
Open

Comments

@mcary
Copy link

mcary commented Jun 24, 2014

I'm invoking puppet via puppet apply from a project directory that has a .ruby-version to request a specific ruby version of rvm or rbenv. However, when the rvm_system_ruby resource calls "rvm list strings" in that context, the output is:

ruby-2.0.0-p481 is not installed.
To install do: 'rvm install ruby-2.0.0-p481'

I'm guessing that puppet is calling "cd" or doing something else that triggers RVM to handle the .ruby-version as part of the shell command and that rvmcmd("list", "strings") runs in lib/puppet/provider/rvm_system_ruby/rvm_system_ruby.rb's "exists?" method.

Perhaps the ruby version regex we're looking for should be anchored to then beginning and end of line? Or at least the line should be excluded if it contains spaces? Or just if it includes "install"?

In the mean time, I'll call "puppet apply" from another directory...

@hugocorbucci
Copy link

👍

Same problem happens when you have a Gemfile with a "ruby" line.
Got me very confused for a while.

hugocorbucci pushed a commit to agile-alliance-brazil/submissions that referenced this issue Jan 10, 2016
This should avoid RVM from thinking the rubies are already available
Check voxpupuli/puppet-rvm#45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants