-
-
Notifications
You must be signed in to change notification settings - Fork 374
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
Feature Suggestion: Add a rubygems
resource.
#40
Comments
I've been feeling that need as well based on issues and feedback. Unfortunately, there is still a real need for 1.3.7 when supporting older codebases. Sounds good, it's on the board :) |
So is there a suggested way to update rubygems with this cookbook for now? |
@alindeman I've done this in the past which can work (although a bit lower level) in a cookbook recipe: # assumptions:
# * this is a system-wide install. For user-based ones use rvm::user_install
# * the RVM Ruby to be modified is the default ruby
# include system_install which only installs RVM (doesn't install any rubies or gems)
include_recipe "rvm::system_install"
# install the default ruby from attribute metadata
rvm_default_ruby node['rvm']['default_ruby']
# use an rvm_shell to call rvm rubygems before installing any gems
rvm_shell "use rubygems 1.3.7 with default_ruby" do
ruby_string node['rvm']['default_ruby']
code %{rvm rubygems 1.3.7}
end
# install gems, like:
rvm_gem "nokogiri" do
ruby_string node['rvm']['default_ruby']
end The tricky part is upgrading/downgrading your version of RubyGems after RVM installs and before gems get installed. Hope that helps in the meantime :) |
Thanks for the tip. It would still be cool to have
|
I agree and probably the best solution is to provide an |
Any news on this? |
I've made a pull request (#100) that is, I think, the first step in addressing this. |
@cgriego I'm hoping to get a tagged release out and then tackle this one. |
Thanks to @cgriego this is (finally) pulled in. Thanks everyone for helping out on this one. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Feature Suggestion: Add a
rubygems
resource.And an accompanying
rubygems
provider.Motivation:
The user may have installed ruby and its default rubygems some time ago, but may wish to keep current with rubygems or downgrade in case of rubygems issues.
Specification:
The resource should have a required attribute
ruby_string
to specify which rvm-managed ruby's rubygems to change.The resource should have an optional attribute
version
to specify the version constraints on the rubygems for the named ruby. Theversion
attribute should permit an exact version, and it should also permit a version constraint, a comma-separated string of version constraints, or an array of version constraints.The resource should have a default action of
install
, but also an action ofupgrade
.The
install
action should install/upgrade rubygems into the named ruby only if a version of rubygems complying with the version constraints from theversion
attribute is missing.The
upgrade
action should always install/upgrade rubygems into the named ruby, unless the most-recent version of rubygems complying with the version constraints from theversion
attribute is already installed.The text was updated successfully, but these errors were encountered: