Giter VIP home page Giter VIP logo

puppet-rvm's Introduction

Puppet Module for Ruby Version Manager (RVM)

This module handles installing system RVM (also known as multi-user installation as root) and using it to install rubies and gems. Support for installing and configuring passenger is also included.

We are actively using this module. It works well, but does have some issues you should be aware of. Due to the way puppet works, certain resources (rvm_sytem_ruby, rvm_gem and rvm_gemset) may generate errors until RVM is installed. The puppet-rvm module uses run stages to install RVM before the rest of your configuration runs. However, if you run puppet using the --noop parameter, you may see Could not find a default provider errors. See the Troubleshooting section for more information.

Please read the troubleshooting section below before opening an issue.

System Requirements

Puppet 2.6.7 or higher.

Add Puppet Module

Before you begin, you must add the RVM module to your Puppet installation. This can be done with:

$ git clone git://github.com/blt04/puppet-rvm.git /etc/puppet/modules/rvm

Enable plugin synchronization for custom types. In your puppet.conf (usually in /etc/puppet) on both the Master and Client ensure you have:

[main]
    pluginsync = true

You may now continue configuring RVM resources.

Install RVM with Puppet

Install RVM with:

include rvm

or

class { 'rvm': version => '1.20.12' }

This will install RVM into /usr/local/rvm.

To use RVM without sudo, users need to be added to the rvm group. This can be easily done with:

rvm::system_user { bturner: ; jdoe: ; jsmith: ; }

NOTE: You must define a user elsewhere in your manifest to use rvm::system_user.

Installing Ruby

You can tell RVM to install one or more Ruby versions with:

rvm_system_ruby {
  'ruby-1.9.2-p290':
    ensure => 'present',
    default_use => true;
  'ruby-1.8.7-p357':
    ensure => 'present',
    default_use => false;
}

You should use the full version number. While the shorthand version may work (e.g. '1.9.2'), the provider will be unable to detect if the correct version is installed.

Creating Gemsets

Create a gemset with:

rvm_gemset {
  "ruby-1.9.2-p290@myproject":
    ensure => present,
    require => Rvm_system_ruby['ruby-1.9.2-p290'];
}

Installing Gems

Install a gem with:

rvm_gem {
  'ruby-1.9.2-p290@myproject/bundler':
    ensure => '1.0.21',
    require => Rvm_gemset['ruby-1.9.2-p290@myproject'];
}

The name of the gem should be <ruby-version>[@<gemset>]/<gemname>. For example, you can install bundler for ruby-1.9.2 using ruby-1.9.2-p290/bundler. You could install rails in your project's gemset with: ruby-1.9.2-p290@myproject/rails.

Alternatively, you can use this more verbose syntax:

rvm_gem {
  'bundler':
    name => 'bundler',
    ruby_version => 'ruby-1.9.2-p290',
    ensure => latest,
    require => Rvm_system_ruby['ruby-1.9.2-p357'];
}

Installing Passenger

Install passenger with:

class {
  'rvm::passenger::apache':
    version => '3.0.11',
    ruby_version => 'ruby-1.9.2-p290',
    mininstances => '3',
    maxinstancesperapp => '0',
    maxpoolsize => '30',
    spawnmethod => 'smart-lv2';
}

Troubleshooting / FAQ

An error "Could not find a default provider for rvm_system_ruby" is displayed when running Puppet with --noop

This means that puppet cannot find the /usr/local/rvm/bin/rvm command (probably because RVM isn't installed yet). Currently, Puppet does not support making a provider suitable using another resource (late-binding). The puppet-rvm module uses run stages to install RVM before the rest of the configuration runs. When running in noop mode, RVM is not actually installed causing rvm_system_ruby, rvm_gem and rvm_gemset resources to generate this error. You can avoid this error by surrounding your rvm configuration in an if block:

if $rvm_installed == "true" {
    rvm_system_ruby ...
}

Do not surround include rvm in the if block, as this is used to install RVM.

NOTE: $rvm_installed is evaluated at the beginning of each puppet run. If you use this in your manifests, you will need to run puppet twice to fully configure RVM.

An error "Resource type rvm_gem does not support parameter false" prevents puppet from running.

The RVM module requires Puppet version 2.6.7 or higher.

There is a bug in Puppet versions 2.7.4 through 2.7.9 that also causes this error. The error can be safely ignored in these versions. For best results, upgrade to Puppet 2.7.10.

Some packages/libraries I don't want or need are installed (e.g. build-essential, libc6-dev, libxml2-dev).

RVM works by compiling Ruby from source. This means you must have all the libraries and binaries required to compile Ruby installed on your system. I've tried to include these in manifests/classes/dependencies.rb.

It doesn't work on my operating system.

I've only tested this on Ubuntu 10.04 and Ubuntu 11.04. omarqureshi was kind enough to add CentOS support. Other operating systems may require different paths or dependencies. Feel free to send me a pull request ;)

Why didn't you just add an RVM provider for the existing package type?

The puppet package type seems like an obvious place for the RVM provider. It would be nice if the syntax for installing Ruby with RVM looked like:

# NOTE: This does not work
package {'ruby':
    provider => 'rvm',
    ensure => '1.9.2-p290';
}

While this may be possible, it becomes harder to manage multiple Ruby versions and nearly impossible to install gems for a specific Ruby version. For this reason, I decided it was best to create a completely new set of types for RVM.

TODO

  • Allow upgrading the RVM version

puppet-rvm's People

Contributors

adamcohen avatar baphled avatar blt04 avatar englishm avatar fritz avatar heffergm avatar jefflaporte avatar joerx avatar johnf avatar krissi avatar kronn avatar leitmedium avatar luxflux avatar mbklein avatar omarqureshi avatar pbrit avatar pspoerri avatar sgp avatar shapeshed avatar sinajahan avatar stmontgomery avatar teknotus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

puppet-rvm's Issues

stdlib module in puppet usage

Trying to use the stdlib class to use the file_line resource
class postgresql::profilechange1{
include stdlib
file_line{'Path updation':
ensure => present,
line => 'PATH=$PATH:/usr/local/pgsql/bin\n',
path => '/etc/profile',
}
}


Error encountered
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class stdlib for sys-server on node sys-server
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Is unable to find the class stdlib to use the file_line class?
What needs to be there other than the class installed
I have puppet 3.4 installed

Why pre-install packages?

RVM will install all the packages that it needs in order to run. In addition, RVM provides an rvm autolibs command flag that installs Ruby dependencies. Would it not make sense to allow RVM to control this stuff rather than expecting the puppet module to do it?

Error installing

ruby-1.9.2-p290 - #installing....................
Retrieving rubygems-2.1.11
There is no checksum for 'http://production.cf.rubygems.org/rubygems/rubygems-2.1.11.tgz' or 'rubygems-2.1.11.tgz', it's not possible to validate it.
This could be because your RVM install's list of versions is out of date. You may want to
update your list of rubies by running 'rvm get stable' and try again.
If that does not resolve the issue and you wish to continue with unverified download
add '--verify-downloads 1' after the command.

There has been an error while trying to fetch rubygems.
Halting the installation.

gemset provider not reading gemset list properly on centos5

The gemset provider shows no gemset installed on each puppet run and tries to create them. To fix this I had to update the plugin with the following:

provider/rvm_gemset/gemset.rb

command = gemsetcommand + ['list']
output = execute(command)
output.each do |line|
 if line =~ /^\s+\S+/
   list << line.strip
 end
end

from

command = gemsetcommand + ['list']
output = execute(command)
output.lines do |line|
 if line =~ /^\s+\S+/
   list << line.strip
 end
end

Package curl not required

When starting with a fresh machine, I get the message:

err: /Stage[rvm-install]/Rvm::System/Exec[system-rvm]/returns: change from notrun to 0 failed: bash: /usr/bin/curl: No such file or directory

Somewhere the dependency needs to be added.

Error when provisioning install script returning "7" instead of "0"

I'm getting this error:

err: /Stage[rvm-install]/Rvm::System/Exec[system-rvm]/returns: change from notrun to 0 failed: bash -c '/usr/bin/curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer -o /tmp/rvm-installer && chmod +x /tmp/rvm-installer && rvm_bin_path=/usr/local/rvm/bin rvm_man_path=/usr/local/rvm/man /tmp/rvm-installer --version 1.20.12 && rm /tmp/rvm-installer' returned 7 instead of one of [0] at /tmp/vagrant-puppet/modules-0/rvm/manifests/system.pp:19

Thought it could be due to proxy however these are all correctly set as far as I can tell.

Some minor edits

Some minor edits and fixes:

  1. Fixed path otherwise you'll get a default provider failure when Puppet can't find the rvm command
  2. Fixed the gem selection - you'll see this is also upstream in the gem provider
  3. Added no-ri and no-rdoc to speed up installation.

I would have done a pull request but it appears already having a repo called puppet-rvm messes that up.

require 'puppet/provider/package'
require 'uri'

# Ruby gems support.
Puppet::Type.type(:rvm_gem).provide(:gem) do
  desc "Ruby Gem support using RVM."

  commands :rvmcmd => "/usr/local/rvm/bin/rvm"

  def ruby_version
    resource[:ruby_version]
  end

  def gembinary
    [command(:rvmcmd), ruby_version, "gem"]
  end


  def gemlist(hash)
    command = gembinary + ['list']

    if hash[:local]
      command << "--local"
    else
      command << "--remote"
    end

    if name = hash[:justme]
      command << name + "$"
    end

    begin
      list = execute(command).split("\n").collect do |set|
        if gemhash = self.class.gemsplit(set)
          gemhash[:provider] = :gem
          gemhash
        else
          nil
        end
      end.compact
    rescue Puppet::ExecutionFailure => detail
      raise Puppet::Error, "Could not list gems: #{detail}"
    end

    if hash[:justme]
      return list.shift
    else
      return list
    end
  end

  def self.gemsplit(desc)
    case desc
    when /^\*\*\*/, /^\s*$/, /^\s+/; return nil
    when /^(\S+)\s+\((.+)\)/
      name = $1
      version = $2.split(/,\s*/)[0]
      return {
        :name => name,
        :ensure => version
      }
    else
      Puppet.warning "Could not match #{desc}"
      nil
    end
  end


  def install(useversion = true)
    command = gembinary + ['install']
    command << "-v" << resource[:ensure] if (! resource[:ensure].is_a? Symbol) and useversion
    # Always include dependencies
    command << "--include-dependencies" << "--no-rdoc" << "no-ri"

    if source = resource[:source]
      begin
        uri = URI.parse(source)
      rescue => detail
        fail "Invalid source '#{uri}': #{detail}"
      end

      case uri.scheme
      when nil
        # no URI scheme => interpret the source as a local file
        command << source
      when /file/i
        command << uri.path
      when 'puppet'
        # we don't support puppet:// URLs (yet)
        raise Puppet::Error.new("puppet:// URLs are not supported as gem sources")
      else
        # interpret it as a gem repository
        command << "--source" << "#{source}" << resource[:name]
      end
    else
      command << resource[:name]
    end

    output = execute(command)
    # Apparently some stupid gem versions don't exit non-0 on failure
    self.fail "Could not install: #{output.chomp}" if output.include?("ERROR")
  end

  def latest
    # This always gets the latest version available.
    hash = gemlist(:justme => resource[:name])

    hash[:ensure]
  end

  def query
    gemlist(:justme => resource[:name], :local => true)
  end

  def uninstall
    execute(gembinary + ["uninstall", "-x", "-a", resource[:name]])
  end

  def update
    self.install(false)
  end
end

Do dependencies really work?

I tried running the module on ubuntu 10.10 and it crashed with an error even though I have 'apache2' installed:

err: Failed to apply catalog: Could not find dependency Package[apache2] for Exec[passenger-install-apache2-module] at /etc/puppet/modules/rvm/manifests/classes/passenger-ubuntu-post.pp:10

Then I placed this line in 'rvm/manifests/classes/dependencies-ubuntu.pp':

if ! defined(Package['apache2'])      { package { 'apache2':      ensure => installed } }

This solved the problem, but I had to do the same thing for a number of other packages. Am I missing something here?

Puppet versions:
server - 2.7.1
client - 2.6.11

Also, it is written that the module was tested on ubuntu 10.04, but I see 'libapr-dev' in dependencies for ubuntu, which isn't even present on that version - libapr1-dev is.

Really, what am I missing? :)

git version error with rvm installer

The rvm docs say that the rvm installer must have the latest version of git. My RHEL4 system only has git version 1.5.4 and does not implement the --trace option. Therefore the entire module will not work unless I get an git rpm package from somewhere else.

I later found out that RVM requires Bash 4.0 which is not part of RHEL4 so looks like I can't use your wonderful module since I don't meet the minimum requirements of RVM. :(

rvm broke gemsets?

I asked #rvm on irc and they said that "gem list --local bundler$" is now "do gem list --local bundler$".

I'm getting this:

Oct 4 18:17:06 int-bacin-app01 puppet-agent[11734]: (/Stage[main]/Bacin/Rvm_gem[ruby-1.9.3-p194@bacin/bundler]) Could not evaluate: Could not list gems: Execution of '/usr/local/rvm/bin/rvm ruby-1.9.3-p194@bacin do gem list --local bundler$' returned 1: Unrecognized command line argument: 'do gem' ( see: 'rvm usage' )

but I can do this on the command-line and get success:

[root@int-bacin-app01 ~]# /usr/local/rvm/bin/rvm ruby-1.9.3-p194@bacin do gem list --local bundler$

*** LOCAL GEMS ***

bundler (1.2.1)

I'm not sure which version of the rvm module that I have of yours. I've not updated it in 6+ months.

Syntax error

Keep getting a syntax error on the client side:

err: Could not retrieve catalog from remote server: Error 400 on SERVER: Syntax error at '('; expected ')' at /etc/puppet/modules/rvm/manifests/classes/passenger.pp:2 on node puppet1

Should I be defining something I'm not in the node?

node 'puppet1' inherits basenode {
include rvm::system
if $rvm_installed == "true" {
rvm_system_ruby {
'ruby-1.9.2-p180':
ensure => 'present',
default_use => true;
'ruby-1.8.7-p334':
ensure => 'present',
default_use => false;
}
}
}

Documentation suggestion

When installing a gem in a gemset you need to use ruby-version@gemset-name as the 'ruby-version' attribute instead of the gemset identifier used in puppet (ruby-version/gemset-name).

Might be nice to add that to the documentation :)

Thanks for the great module btw, glad to see one that just works...

Arthur

libyaml dependency not in CentOS repo

CentOS 6.3 user here. centos.pp tries to install the libyaml-devel package, but this doesn't exist. Should there be an EPEL prerequisite added for this?

VERSION hasn't been updated

This is pretty simple, but the puppet forge version says '1.1.3' and the VERSION file still says '1.0.0-pre' and hasn't been updated for over a year.

That is all. Great product, been using it for a while and love the updates. Thanks a lot.

ps. Didn't want to send a pull request cause it's so easy to change, but if you want me to send one I certainly can.

Could not find default provider error (even with run stages)

In Pull Request #39 I talked about my puppet setup, which has a problem finding the default provider, even when I use run stages.

I've uploaded a Vagrantfile + manifests that show the issue (with very few extra Puppet instructions to get in the way: http://www.wilcoxd.com/oss/puppet_rvm_provider_not_found.zip

When I try this with puppet-rvm (this repo) I get:

Could not find a default provider for rvm_system_ruby

But, given that I think everything is set up properly, I don't think I should be getting this error....

Any help would be very much appreciated :)

reinstall rvm_system_ruby

If i first install the blow dvm
rvm_system_ruby {
'ree-1.8.7-2012.02':
ensure => 'present',
require => Class['rvm::system'],
default_use => true;
}
and then i want to install ruby-other-version, and if i exec again puppet command it will report the blow error:
puppet apply --debug --modulepath '/tmp/vagrant-puppet-1/modules-0' --manifestdir /tmp/vagrant-puppet-1/manifests --detailed-exitcodes /tmp/vagrant-puppet-1/manifests/hotspot-precise64.pp || [ $? -eq 2 ]

Stdout from the command:

Stderr from the command:

stdin: is not a tty
/opt/vagrant_ruby/lib/ruby/site_ruby/1.8/rubygems.rb:900:in report_activate_error': Could not find RubyGem puppet (>= 0) (Gem::LoadError) from /opt/vagrant_ruby/lib/ruby/site_ruby/1.8/rubygems.rb:248:inactivate'
from /opt/vagrant_ruby/lib/ruby/site_ruby/1.8/rubygems.rb:1276:in `gem'
from /opt/vagrant_ruby/bin/puppet:18

The root cause is the current $PATH already have the ree-1.8.7 execution env, so its ruby version will be conflict with puppet ruby version.

curl-devel dependency fails on Amazon Linux

Amazon linux runs down the centos dependencies path, but in /dependencies/centos.pp, there is a version number-specific conditional for the curl-devel / libcurl-devel dependency that only works on centos. Amazon Linux uses different numbering.

See operatingsystem / operatingsystemrelease values as of this writing:
notice: The value is: Amazon
notice: The value is: 3.4.68-59.97.amzn1.x86_64

Since the string doesn't start with 6, it drops to the default case of curl-devl instead of libcurl-devel, which is incorrect.

Not sure the preferred solution here; hence creating an issue vs pull request.

No way to keep RVM up-to-date

I just discovered that the version of RVM isn't kept up-to-date and there is no way to tell puppet-rvm that it should be running a specific version or 'latest'.

I can manually log in and update RVM, but it sort of defeats the purpose of having puppetized RVM.

Ordering problem when installing passenger

Thanks for your efforts with this module, its been very helpful so far. I have ran into an issue I wanted to report. When using the following in a node:

include rvm
rvm_system_ruby {
    'ruby-1.9.3-p327':
        ensure => 'present',
        default_use => true;
    'ruby-1.8.7-p370':
        ensure => 'present',
        default_use => false;
}
class {
    'rvm::passenger::apache':
        version => '3.0.18',
        ruby_version => 'ruby-1.8.7-p370',
        mininstances => '3',
        maxpoolsize => '30',
}

The first run on the node results in errors:

Error: Could not update: Execution of '/usr/local/rvm/bin/rvm ruby-1.8.7-p370 do gem install -v 3.0.18 --include-dependencies --no-rdoc --no-ri passenger' returned 1: Ruby ruby-1.8.7-p370 is not installed.

Error: /Stage[main]/Rvm::Passenger::Gem/Rvm_gem[passenger]/ensure: change from absent to 3.0.18 failed: Could not update: Execution of '/usr/local/rvm/bin/rvm ruby-1.8.7-p370 do gem install -v 3.0.18 --include-dependencies --no-rdoc --no-ri passenger' returned 1: Ruby ruby-1.8.7-p370 is not installed.

/Stage[main]/Rvm::Passenger::Apache::Ubuntu::Post/Exec[passenger-install-apache2-module]: Dependency Rvm_gem[passenger] has failures: true
Warning: /Stage[main]/Rvm::Passenger::Apache::Ubuntu::Post/Exec[passenger-install-apache2-module]: Skipping because of failed dependencies
/Stage[main]/Rvm::Passenger::Apache::Ubuntu::Post/File[/etc/apache2/mods-available/passenger.conf]: Dependency Rvm_gem[passenger] has failures: true
Warning: /Stage[main]/Rvm::Passenger::Apache::Ubuntu::Post/File[/etc/apache2/mods-available/passenger.conf]: Skipping because of failed dependencies
/Stage[main]/Rvm::Passenger::Apache::Ubuntu::Post/File[/etc/apache2/mods-enabled/passenger.conf]: Dependency Rvm_gem[passenger] has failures: true
Warning: /Stage[main]/Rvm::Passenger::Apache::Ubuntu::Post/File[/etc/apache2/mods-enabled/passenger.conf]: Skipping because of failed dependencies
/Stage[main]/Rvm::Passenger::Apache::Ubuntu::Post/File[/etc/apache2/mods-available/passenger.load]: Dependency Rvm_gem[passenger] has failures: true
Warning: /Stage[main]/Rvm::Passenger::Apache::Ubuntu::Post/File[/etc/apache2/mods-available/passenger.load]: Skipping because of failed dependencies
/Stage[main]/Rvm::Passenger::Apache::Ubuntu::Post/File[/etc/apache2/mods-enabled/passenger.load]: Dependency Rvm_gem[passenger] has failures: true
Warning: /Stage[main]/Rvm::Passenger::Apache::Ubuntu::Post/File[/etc/apache2/mods-enabled/passenger.load]: Skipping because of failed dependencies

I tried adding a Require:

class {
    'rvm::passenger::apache':
        version => '3.0.18',
        ruby_version => 'ruby-1.8.7-p370',
        mininstances => '3',
        maxpoolsize => '30',
        require => Rvm_system_ruby['ruby-1.8.7-p370'];
}

But that didn't seem to help.

The second time I run the agent on the node, passenger installs just fine.

I resolved this by modifying rvm::passenger::gem:

class rvm::passenger::gem($ruby_version, $version) {
  rvm_gem {
    "passenger":
      ensure       => $version,
      ruby_version => $ruby_version,
      require      => Rvm_system_ruby[$ruby_version]; # <-- added this line
  }
}

To require the system ruby. I then did a rm -rf /usr/local/rvm and ran the agent again, this time without error.

rvm::passenger::apache fails for ubuntu 12.04 / ruby-2.0.0-p195 / passenger 4.0.2

Using this as node config for a ubuntu 12.04 system;

rvm_system_ruby {
  'ruby-2.0.0-p195':
  ensure => 'present',
  default_use => true;
}

class {
  'rvm::passenger::apache':
    version => "4.0.2",
    ruby_version => "ruby-2.0.0-p195",
    mininstances => 3,
    maxinstancesperapp => 0,
    maxpoolsize => 30,
    spawnmethod => "smart-lv2";
}

fails with this exception on the node:

Notice: /Stage[main]/Rvm::Passenger::Apache::Ubuntu::Post/Exec[passenger-install-apache2-module]/returns:  * Checking for Zlib development headers...
Notice: /Stage[main]/Rvm::Passenger::Apache::Ubuntu::Post/Exec[passenger-install-apache2-module]/returns:       Found: yes
Notice: /Stage[main]/Rvm::Passenger::Apache::Ubuntu::Post/Exec[passenger-install-apache2-module]/returns:       Location: /usr/include/zlib.h
Notice: /Stage[main]/Rvm::Passenger::Apache::Ubuntu::Post/Exec[passenger-install-apache2-module]/returns: /usr/local/rvm/gems/ruby-2.0.0-p195/gems/passenger-4.0.2/lib/phusion_passenger/platform_info/ruby.rb:195:in `expand_path': non-absolute home (ArgumentError)

wont install with recommended syntax

I'm running puppet 2.7.19 and the system is installing rvm jst fone, but I can't get it to install a version of ruby and set it to the default.

Here is a snipet of my node.pp file...

include rvm
rvm_system_ruby { 'ruby-1.9.2-p290':
ensure => 'present',
default_use => true,
}

On the client (RedHat 6.1 for both server an client), after logging out and back in, rvm seems to b working...

[jdehnert@dev-async-1 ~]$ vm list default

[jdehnert@dev-async-1 ~]$

List known gives me the usual suspects, including ruby-1.9.2-p290.

Any ideas as to why this isn't working?

Gems folder is root only

I'm using this :

include 'rvm' 

rvm::system_user { vagrant: }

rvm_system_ruby { 'ruby-2.0.0':
  ensure => 'present',
  default_use => true,
}

After, I do "gem install bundler" and I get

ERROR:  While executing gem ... (Errno::EACCES)
    Permission denied - /usr/local/rvm/gems/ruby-2.0.0-p0/cache/bundler-1.3.2.gem

[vagrant@localhost ~]$ ls -al /usr/local/rvm/gems/ruby-2.0.0-p0/
total 28
drwxrwsr-x 7 root rvm  4096 Mar  7 12:45 .
drwxrwsr-x 6 root rvm  4096 Mar 12 11:15 ..
drwxr-xr-x 2 root root 4096 Mar  7 12:44 build_info
drwxr-xr-x 2 root root 4096 Mar  7 12:44 cache
drwxrwsr-x 3 root rvm  4096 Mar  7 12:45 doc
drwxr-xr-x 5 root root 4096 Mar  7 12:44 gems
drwxr-xr-x 3 root root 4096 Mar  7 12:44 specifications

I'm using Vagrant and CentOS 6.3

rvm_gem isn't working

Hi,
i'm testing puppet-rvm module using vagrant

i added "puppet.options = [ "--pluginsync" ] " in Vagrantfile
i'm using rvm module as following :
include rvm

rvm_system_ruby {'ruby-1.9.3-p194':
ensure => present,
default_use => false,
}

rvm_gemset { 'ruby-1.9.3-p194@labsweb':
ensure => present,
ruby_version => 'ruby-1.9.3-p194',
require => Rvm_system_ruby['ruby-1.9.3-p194'],
}

rvm_gem{'ruby-1.9.3-p194@labsweb/bundler':
ensure => latest,
require => Rvm_gemset['ruby-1.9.3-p194@labsweb'],
ruby_version => 'ruby-1.9.3-p194@labsweb',
}

vagrant output :
notice: /Stage[rvm-install]/Rvm::Dependencies::Ubuntu/Package[build-essential]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[rvm-install]/Rvm::Dependencies::Ubuntu/Package[libxslt1-dev]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[rvm-install]/Rvm::Dependencies::Ubuntu/Package[libsqlite3-dev]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[rvm-install]/Rvm::Dependencies::Ubuntu/Package[sqlite3]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[rvm-install]/Rvm::Dependencies::Ubuntu/Package[libyaml-dev]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[rvm-install]/Rvm::Dependencies::Ubuntu/Package[curl]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[rvm-install]/Rvm::Dependencies::Ubuntu/Package[git-core]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[rvm-install]/Rvm::Dependencies::Ubuntu/Package[autoconf]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[rvm-install]/Rvm::Dependencies::Ubuntu/Package[bison]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[rvm-install]/Rvm::System/Exec[system-rvm]/returns: executed successfully
notice: /Stage[main]//Node[precise64]/Rvm_system_ruby[ruby-1.9.3-p194]/ensure: created
notice: /Stage[main]//Node[precise64]/Rvm_gemset[ruby-1.9.3-p194@labsweb]/ensure: created
notice: Finished catalog run in 282.39 seconds

inside vagrant box :
vagrant@precise64:$ ls /usr/local/rvm/gems/ruby-1.9.3-p194@labsweb/
bin
vagrant@precise64:
$ ls /usr/local/rvm/gems/ruby-1.9.3-p194@global/
bin cache doc gems specifications
vagrant@precise64:~$ ls /usr/local/rvm/gems/ruby-1.9.3-p194
specifications

any ideas why this happens ?

Thanks in advance

"Installing Passenger" not work on Debian, and solved

I tried "Installing Passenger" on Debian squeeze.
It didn't install passenger at all with no errors.
After a short struggle, I found few missing.

It worked perfect with a trivial fix.

diff --git a/manifests/passenger/apache.pp b/manifests/passenger/apache.pp
index 9e4a084..f453544 100644
--- a/manifests/passenger/apache.pp
+++ b/manifests/passenger/apache.pp
@@ -10,7 +10,7 @@ class rvm::passenger::apache(
) {

case $operatingsystem {

  • Ubuntu: { include rvm::passenger::apache::ubuntu::pre }
  • Ubuntu,Debian: { include rvm::passenger::apache::ubuntu::pre }
    CentOS,RedHat: { include rvm::passenger::apache::centos::pre }
    }

@@ -27,7 +27,7 @@ class rvm::passenger::apache(
$binpath = "${rvm_prefix}rvm/bin/"

case $operatingsystem {

  • Ubuntu: {
  • Ubuntu,Debian: {
    class { 'rvm::passenger::apache::ubuntu::post':
    ruby_version => $ruby_version,
    version => $version,

Thank you for a great job!
The puppet-rvm saved me.

Cannot install gems: Resource type rvm_gem does not support parameter false

Puppet 2.6.2 / Ubuntu 10.04

I am trying to install bundler from nodes.pp as specified in the README. I am getting this error:
err: Could not run Puppet configuration client: Resource type rvm_gem does not support parameter false

I include this in nodes.pp:


  include rvm::system

  if $rvm_installed == "true" {
      rvm_system_ruby {
           'ruby-1.9.2-p180-fastrequire':
                    ensure => 'present',
                    default_use => true;
           'ruby-1.8.7':
                    ensure => 'present',
                    default_use => false;
      }
  }

  rvm_gem {
      'bundler':
      ruby_version => 'ruby-1.9.2-p180-fastrequire',
      ensure => '1.0.13',
      require => Rvm_system_ruby['ruby-1.9.2-p180-fastrequire'];
  }

Location for mod_passenger.so changed in passenger >= 4

Should be:

 ${gempath}/passenger-${version}/buildout/apache2/mod_passenger.so

instead of

 ${gempath}/passenger-${version}/ext/apache2/mod_passenger.so

...both in the exec running passenger-install-apache and in the file defining the contents of passenger.load

Syntax error in dependent class of rvm

I got the following error when running rvm_gemsets

Syntax error at '('; expected ')' at /etc/puppet/modules/rvm/manifests/classes/passenger.pp:1

I tried creating gemsets using the classes. My VM is ubuntu 10.04 32 bit.

unable to install rubies and bundlers on puppet 2.7.9

   if $rvm_installed == "true" {
      rvm_system_ruby {
        'jruby-1.6.3':
          ensure => 'present',
          default_use => true;
        'jruby-1.6.4':
          ensure => 'present',
          default_use => false;
        'jruby-1.6.5':
          ensure => 'present',
          default_use => false;
        'ruby-1.9.3-p0':
          ensure => 'present',
          default_use => false;
      }
      rvm_gem {
        'bundler193':
                name => 'bundler',
                ruby_version => 'ruby-1.9.3-p0',
                ensure => 'present',
                require => Rvm_system_ruby['ruby-1.9.3-p0'];
        'bundlerjruby163':
                name => 'bundler',
                ruby_version => 'jruby-1.6.3',
                ensure => 'present',
                require => Rvm_system_ruby['jruby-1.6.3'];
        'bundlerjruby164':
                name => 'bundler',
                ruby_version => 'jruby-1.6.4',
                ensure => 'present',
                require => Rvm_system_ruby['jruby-1.6.4'];
        'bundlerjruby165':
                name => 'bundler',
                ruby_version => 'jruby-1.6.5',
                ensure => 'present',
                require => Rvm_system_ruby['jruby-1.6.5'];
        'railsjruby163':
                name => 'rails',
                ruby_version => 'jruby-1.6.3',
                ensure => 'present',
                require => Rvm_system_ruby['jruby-1.6.3'];
        'railsjruby164':
                name => 'rails',
                ruby_version => 'jruby-1.6.4',
                ensure => 'present',
                require => Rvm_system_ruby['jruby-1.6.4'];
        'railsjruby165':
                name => 'rails',
                ruby_version => 'jruby-1.6.5',
                ensure => 'present',
                require => Rvm_system_ruby['jruby-1.6.5'];
      }
    }

Doesn't work with puppet 2.7.1

I'm trying to install rvm with ree and ruby-1.9.3

I'm getting these errors:
err: Could not run Puppet configuration client: Could not find a default provider for rvm_gem
err: Could not run Puppet configuration client: Could not find a default provider for rvm_system_ruby

This is my config

node 'ubuntu' {
        include rvm::system

        rvm_system_ruby {
                'ruby-1.9.3-preview1':
                        ensure => 'present',
                        default_use => true;
                'ree-1.8.7-2011.03':
                        ensure => 'present',
                        default_use => false;
        }
        rvm_gem {
                'bundler193':
                        name => 'bundler',
                        ruby_version => 'ruby-1.9.3-preview1',
                        ensure => '1.0.15',
                        require => Rvm_system_ruby['ruby-1.9.3-preview1'];
                'bundler187':
                        name => 'bundler',
                        ruby_version => 'ree-1.8.7-2011.03',
                        ensure => '1.0.15',
                        require => Rvm_system_ruby['ree-1.8.7-2011.03'];
        }

}

It works fine with puppet 2.6.9

What am I missing here?

Invalid parameter false(false) - possible re-introduction of previous error from puppet 2.6

Running rvm_gem on puppet 2.7.5 causes the following error -

err: Could not create resource file /var/lib/puppet/state/resources.txt: Invalid parameter false(false) at /etc/puppet/modules/rvm/manifests/classes/passenger-gem.pp:6

When the same puppet scripts are run on 2.7.3 we get no errors.

Commenting out all reference to rvm_gem removes the error in 2.7.5 (but obviously doesn't install our gems!).

I believe the bug #13 - Resource type rvm_gem does not support parameter false has been reintroduced with the latest puppet release.

Invalid resource type error

I'm running into an error I can't figure out...

err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Puppet::Parser::AST::Resource failed with error ArgumentError: 
Invalid resource type rvm_system_ruby at /some/secret/file

What I've done is add this to manifests/init.pp:

 rvm_system_ruby {
  'ree-1.8.7-2012.02':
    ensure => 'present',
    default_use => false;
  }

I figured one should be able to do this and since I want at least that ruby to be available on every machine that gets RVM I figured this should be as good as any place to do it.

"include rvm" fails because curl is not installed

This is the error message when I include the rvm module on Ubuntu 12.04 x64:

# puppet agent --test --verbose --onetime
info: Retrieving plugin
info: Loading facts in /var/lib/puppet/lib/facter/rvm_installed.rb
info: Loading facts in /var/lib/puppet/lib/facter/3ware.rb
info: Caching catalog for gshc4.artcom.de
info: Applying configuration version '1337778790'
err: /Stage[rvm-install]/Rvm::System/Exec[system-rvm]/returns: change from notrun to 0 failed: bash -c '/usr/bin/curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer -o /tmp/rvm-installer ;                 chmod +x /tmp/rvm-installer ;                 rvm_bin_path=/usr/local/rvm/bin rvm_man_path=/usr/local/rvm/man /tmp/rvm-installer --version latest ;                 rm /tmp/rvm-installer' returned 1 instead of one of [0] at /etc/puppet/modules/rvm/manifests/system.pp:12

Curl wasn't installed, allthough it is specified in dependency file for Ubuntu.

class lookup problem

Sorry about that!
I am pretty new to puppet-rvm.
I was using this module with puppet 2.6 without any problem, but since I upgraded to puppet 2.7 I had to upgrade rvm module too, and now I am getting this error message:

Could not find declared class rvm::dependencies at /etc/puppet/modules/rvm/manifests/init.pp:8

Ubuntu 10.04 with backport 2.7.1 puppet.
Could you point me to the right direction?

Installing bundler for two Rubies

If you install two versions of Ruby (say 1.8.7 and 1.9.2) and try to install bundler for each of them you get an error. Specifically:

rvm_system_ruby {
  'ruby-1.9.2-p180':
    ensure => 'present',
    default_use => false;
  'ruby-1.8.7-p334':
    ensure => 'present',
    default_use => false;
}

rvm_gem {
  'bundler':
    ruby_version => 'ruby-1.9.2-p180',
    ensure => '1.0.13',
    require => Rvm_system_ruby['ruby-1.9.2-p180'];
}

rvm_gem {
    'bundler':
    ruby_version => 'ruby-1.8.7-p334',
    ensure => '1.0.13',
    require => Rvm_system_ruby['ruby-1.8.7-p334'];
}

Won't work. If you change the name for them to be something like bundler187 and bundler192 then it can't find the right gem (of course).

Will this need a patch or am I missing something here?

doesnt seem to work with vagrant and puppet solo

ashley@kyopel:~/work/novapost/rh2_env$ vagrant provision
[default] Running provisioner: Vagrant::Provisioners::Puppet...
[default] Running Puppet with rh2.pp...
[default] stdin: is not a tty
[default] info: Loading facts in rvm_installed
[default]
[default] warning: Could not retrieve fact fqdn
[default]
[default] notice: Scope(Class[main]): Operating autodiscovery: Ubuntu and running with DEBUG=True
[default]
[default] warning: Host is missing hostname and/or domain: lucid32
[default]
[default] debug: importing '/tmp/vagrant-puppet/modules-0/base/manifests/init.pp' in environment production
[default]
[default] debug: Automatically imported base from base into production
[default]
[default] debug: Failed to load library 'shadow' for feature 'libshadow'
[default]
[default] debug: Failed to load library 'selinux' for feature 'selinux'
[default]
[default] debug: Failed to load library 'ldap' for feature 'ldap'
[default]
[default] debug: importing '/tmp/vagrant-puppet/modules-0/cloudcrowd/manifests/init.pp' in environment production
[default]
[default] debug: Automatically imported cloudcrowd from cloudcrowd into production
[default]
[default] debug: importing '/tmp/vagrant-puppet/modules-2/wget/manifests/init.pp' in environment production
[default]
[default] debug: Automatically imported wget::fetch from wget/fetch into production
[default]
[default] debug: importing '/tmp/vagrant-puppet/modules-2/rvm/manifests/init.pp' in environment production
[default]
[default] debug: importing '/tmp/vagrant-puppet/modules-2/rvm/manifests/classes/dependencies-ubuntu.pp' in environment production
[default]
[default] debug: importing '/tmp/vagrant-puppet/modules-2/rvm/manifests/classes/passenger.pp' in environment production
[default]
[default] debug: importing '/tmp/vagrant-puppet/modules-2/rvm/manifests/classes/dependencies-centos.pp' in environment production
[default]
[default] debug: importing '/tmp/vagrant-puppet/modules-2/rvm/manifests/classes/system.pp' in environment production
[default]
[default] debug: importing '/tmp/vagrant-puppet/modules-2/rvm/manifests/classes/passenger-ubuntu-pre.pp' in environment production
[default]
[default] debug: importing '/tmp/vagrant-puppet/modules-2/rvm/manifests/classes/passenger-centos-pre.pp' in environment production
[default]
[default] debug: importing '/tmp/vagrant-puppet/modules-2/rvm/manifests/classes/dependencies.pp' in environment production
[default]
[default] debug: importing '/tmp/vagrant-puppet/modules-2/rvm/manifests/classes/passenger-centos-post.pp' in environment production
[default]
[default] debug: importing '/tmp/vagrant-puppet/modules-2/rvm/manifests/classes/passenger-ubuntu-post.pp' in environment production
[default]
[default] debug: importing '/tmp/vagrant-puppet/modules-2/rvm/manifests/classes/passenger-gem.pp' in environment production
[default]
[default] debug: importing '/tmp/vagrant-puppet/modules-2/rvm/manifests/definitions/system_user.pp' in environment production
[default]
[default] Could not find class rvm::system for lucid32 at /tmp/vagrant-puppet/modules-0/cloudcrowd/manifests/init.pp:45 on node lucid32

Is there any desire for rvm::passenger::nginx?

I have a "working" rvm::passenger::nginx which is closely modeled on the apache version, except that of course with nginx you have to compile the web server with the module. It is only tested on CentOS, but I could contribute the code if anyone else wanted to use nginx?

Could not find command '/usr/bin/curl'

I've this manifest file:

Exec { path => "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"}

include rvm

and I get this error:

vagrant@fullstack:~/.puppet$ sudo puppet apply --verbose /etc/puppet/manifests/site.pp --modulepath=/home/vagrant/.puppet/modules
Info: Loading facts in /home/vagrant/.puppet/modules/stdlib/lib/facter/root_home.rb
Info: Loading facts in /home/vagrant/.puppet/modules/stdlib/lib/facter/facter_dot_d.rb
Info: Loading facts in /home/vagrant/.puppet/modules/stdlib/lib/facter/puppet_vardir.rb
Info: Loading facts in /home/vagrant/.puppet/modules/stdlib/lib/facter/pe_version.rb
Info: Loading facts in /home/vagrant/.puppet/modules/rvm/lib/facter/rvm_version.rb
Info: Loading facts in /home/vagrant/.puppet/modules/rvm/lib/facter/rvm_installed.rb
Info: Loading facts in /home/vagrant/.puppet/modules/concat/lib/facter/concat_basedir.rb
Warning: Config file /etc/puppet/hiera.yaml not found, using Hiera defaults
Notice: Compiled catalog for fullstack.lan in environment production in 0.29 seconds
Info: Loading facts in /home/vagrant/.puppet/modules/stdlib/lib/facter/root_home.rb
Info: Loading facts in /home/vagrant/.puppet/modules/stdlib/lib/facter/facter_dot_d.rb
Info: Loading facts in /home/vagrant/.puppet/modules/stdlib/lib/facter/puppet_vardir.rb
Info: Loading facts in /home/vagrant/.puppet/modules/stdlib/lib/facter/pe_version.rb
Info: Loading facts in /home/vagrant/.puppet/modules/rvm/lib/facter/rvm_version.rb
Info: Loading facts in /home/vagrant/.puppet/modules/rvm/lib/facter/rvm_installed.rb
Info: Loading facts in /home/vagrant/.puppet/modules/concat/lib/facter/concat_basedir.rb
Info: Applying configuration version '1390941992'
Error: Could not find command '/usr/bin/curl'
Error: /Stage[main]/Rvm::System/Exec[system-rvm]/returns: change from notrun to 0 failed: Could not find command '/usr/bin/curl'

Than I try this:

Exec { path => "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"}

stage {'req-install': before => Stage['rvm-install']}
class requirements {
    package { 'curl':
                 ensure => present 
        }
}

class doinstall {
  class { requirements:, stage => "req-install" }
}
include doinstall
include rvm 

and I get this error:

vagrant@fullstack:~/.puppet$ sudo puppet apply --verbose /etc/puppet/manifests/site.pp --modulepath=/home/vagrant/.puppet/modules
Info: Loading facts in /home/vagrant/.puppet/modules/stdlib/lib/facter/root_home.rb
Info: Loading facts in /home/vagrant/.puppet/modules/stdlib/lib/facter/facter_dot_d.rb
Info: Loading facts in /home/vagrant/.puppet/modules/stdlib/lib/facter/puppet_vardir.rb
Info: Loading facts in /home/vagrant/.puppet/modules/stdlib/lib/facter/pe_version.rb
Info: Loading facts in /home/vagrant/.puppet/modules/rvm/lib/facter/rvm_version.rb
Info: Loading facts in /home/vagrant/.puppet/modules/rvm/lib/facter/rvm_installed.rb
Info: Loading facts in /home/vagrant/.puppet/modules/concat/lib/facter/concat_basedir.rb
Warning: Config file /etc/puppet/hiera.yaml not found, using Hiera defaults
Notice: Compiled catalog for fullstack.lan in environment production in 0.63 seconds
Error: Could not find dependent Stage[rvm-install] for Stage[req-install] at /etc/puppet/manifests/site.pp:4

Running Puppet v3.4.2 on Debian 7.1. Puppet module rvm-puppet installed via:

puppet module install maestrodev/rvm

Any help would be greatly appreciated :)

Must Run apt-get update Before RVM Will Install

When booting a new system, RVM will not successfully install on the first try. First you must SSH into the box and run sudo apt-get update, then re-run vagrant provision for it to work. Is there a way around this? I tried adding a require to the command, but that had no effect at all. It even shows its acknowledgement of that requirement up in the debug output, but it does not actually run it.

Include rvm fail

The same recipe works in a Vagrant with lucid32 but fail in an amazon instance with ubuntu 10.04.

The error I get is:

No LSB modules are available.
Could not load confine test 'operatingsystem': cannot load such file -- puppet/provider/confine/operatingsystem
Could not load confine test 'operatingsystem': cannot load such file -- puppet/provider/confine/operatingsystem
Could not load confine test 'operatingsystem': cannot load such file -- puppet/provider/confine/operatingsystem
Could not load confine test 'operatingsystem': cannot load such file -- puppet/provider/confine/operatingsystem
Could not load confine test 'operatingsystem': cannot load such file -- puppet/provider/confine/operatingsystem
Could not load confine test 'operatingsystem': cannot load such file -- puppet/provider/confine/operatingsystem
Could not load confine test 'operatingsystem': cannot load such file -- puppet/provider/confine/operatingsystem
Could not load confine test 'operatingsystem': cannot load such file -- puppet/provider/confine/operatingsystem
Could not load confine test 'operatingsystem': cannot load such file -- puppet/provider/confine/operatingsystem
Could not find class rvm for ip-10-99-86-66.ec2.internal at /home/ubuntu/puppet/manifests/init.pp:27 on node ip-10-99-86-66.ec2.internal

In line 27 of manifest I have the include rvm.

Could not find class rvm

I'm trying to provision a box with vagrant

I've added puppet-rvm as a git submodule in my modules dir

and the following puppet scripts in the manifest dir:

init.pp

group { "puppet":
ensure => "present",
}

Exec { path => [ "/bin", "/usr/bin" ] }

include "scm"
include "openjdk"
include "jenkins"
include "install-rvm"

install-rvm.pp

class install-rvm {
include rvm
rvm::system_user { deployer: ; }

if $rvm_installed == "true" {
rvm_system_ruby {
'ruby-1.9.3-p194':
ensure => 'present',
default_use => true;
}
}
}

But I get the error

"Could not find class rvm for oneiric32 at /tmp/vagrant-puppet/manifests/install-rvm.pp:2 on node oneiric32"

Is there a method for debugging why this isn't working?

rvm_system_ruby exists? method

I think your exists? method in rvm_system_ruby isn't supporting multiple rubies.

I have:

  rvm_system_ruby { "ruby-1.9.2-p180":
      default_use => true,
      provider => rvm_system_ruby,
      require => Exec["install rvm"],
  }

  rvm_system_ruby { "ruby-1.8.7-p334":
      provider => rvm_system_ruby,
      require => Exec["install rvm"],
  }

in a manifest. When I run the manifest one Ruby gets installed but the other returns:

debug: Rvm_system_ruby[ruby-1.8.7-p334](provider=rvm_system_ruby): Executing '/usr/local/rvm/bin/rvm list strings'

Even though:

$ /usr/local/rvm/bin/rvm list strings
ruby-1.9.2-p180

only returns 1.9.2 installed.

Use of run stage causing ordering problems

Brandon, I've made some substantial modifications to puppet-rvm to add both support for using an RPM package as well as selinux support (everything is optional/backwards compatible), which I will make available soon in a pull request after additional testing. In the meantime, my testing has turned up a problem with run stages. My puppet environment uses a "pre" run stage to set up yum repos, otherwise every single package install would depend on those repos. The problem is that there is no relationship between my run stage and the one in your module, so it accidentally trumps my "pre" stage and then tries to install a bunch of RPMs from yum repos that don't exist yet, thus causing my puppet config to blow up when building a new box.

Can you explain the rationale behind the run stage? It seems like something that is better handled with dependencies, and I'm not sure that having a module implement a run stage is a good idea, but it's entirely possible that I haven't considered all the angles since I didn't write your module. :)

Thanks.

feature: specify ruby gems version for rvm_system_ruby

Something like:

rvm_system_ruby {
    'ruby-1.9.3-p327':
        ensure => 'present',
        default_use => true;
    $ruby_187:
        #rails 2.3.5 has issues with newer rubygems.  See notes at:
        # http://www.redmine.org/projects/redmine/wiki/RedmineInstall/123
        rubygems => '1.4.2',
        ensure => 'present',
        default_use => false;
}

I hacked something together:

type/rvm_system_ruby.rb

newparam(:rubygems) do
desc "The version of rubygems to install"
defaultto false
end

provider/provider/rvm_system_ruby.rb

def create
rvmcmd "install", resource[:name]
if resource[:rubygems]
rvmcmd resource[:name], 'rubygems', resource[:rubygems]
end
set_default if resource.value(:default_use)
end

but this isn't really adequate as it only applies when the system ruby is installed, not if you want to specify it later.

Good notes here: https://rvm.io/rubies/rubygems/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.