{"id":14994544,"url":"https://github.com/voxpupuli/puppet-rvm","last_synced_at":"2025-10-03T10:30:19.539Z","repository":{"id":43228719,"uuid":"2223529","full_name":"voxpupuli/puppet-rvm","owner":"voxpupuli","description":"A puppet module for installing and using RVM (Ruby Version Manager)","archived":false,"fork":true,"pushed_at":"2025-08-15T08:30:59.000Z","size":602,"stargazers_count":32,"open_issues_count":17,"forks_count":102,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-09-21T10:51:32.170Z","etag":null,"topics":["centos-puppet-module","debian-puppet-module","hacktoberfest","linux-puppet-module","oraclelinux-puppet-module","puppet","redhat-puppet-module","scientific-puppet-module","sles-puppet-module","ubuntu-puppet-module"],"latest_commit_sha":null,"homepage":"https://forge.puppet.com/puppet/rvm","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"blt04/puppet-rvm","license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/voxpupuli.png","metadata":{"files":{"readme":"README.markdown","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"open_collective":"vox-pupuli","github":"voxpupuli"}},"created_at":"2011-08-17T18:35:54.000Z","updated_at":"2025-08-15T08:30:32.000Z","dependencies_parsed_at":"2023-02-05T17:15:29.408Z","dependency_job_id":"d22f0d37-0f0a-409d-8b7f-8c43e9762b9a","html_url":"https://github.com/voxpupuli/puppet-rvm","commit_stats":{"total_commits":448,"total_committers":85,"mean_commits":5.270588235294118,"dds":0.8571428571428572,"last_synced_commit":"c823ab5c96dbb4cd9428a042e0d6c51fe1ae4082"},"previous_names":["maestrodev/puppet-rvm"],"tags_count":54,"template":false,"template_full_name":null,"purl":"pkg:github/voxpupuli/puppet-rvm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-rvm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-rvm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-rvm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-rvm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voxpupuli","download_url":"https://codeload.github.com/voxpupuli/puppet-rvm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-rvm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277208419,"owners_count":25779581,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-27T02:00:08.978Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["centos-puppet-module","debian-puppet-module","hacktoberfest","linux-puppet-module","oraclelinux-puppet-module","puppet","redhat-puppet-module","scientific-puppet-module","sles-puppet-module","ubuntu-puppet-module"],"created_at":"2024-09-24T16:03:48.428Z","updated_at":"2025-10-03T10:30:19.201Z","avatar_url":"https://github.com/voxpupuli.png","language":"Ruby","funding_links":["https://opencollective.com/vox-pupuli","https://github.com/sponsors/voxpupuli"],"categories":[],"sub_categories":[],"readme":"Puppet Module for Ruby Version Manager (RVM)\n==============================================\n\nThis module handles installing system RVM (also known as multi-user installation\nas root) and using it to install rubies and gems.  Support for installing and\nconfiguring passenger is also included.\n\nWe are actively using this module.  It works well, but does have some issues you\nshould be aware of.  Due to the way puppet works, certain resources\n(rvm\\_sytem\\_ruby, rvm\\_gem and rvm\\_gemset) may generate errors until RVM is\ninstalled.  You may want to use run stages to install RVM before the rest\nof your configuration runs.  However, if you run puppet using the `--noop`\nparameter, you may see _Could not find a default provider_ errors.  See the\nTroubleshooting section for more information.\n\nPlease read the troubleshooting section below before opening an issue.\n\n## Add Puppet Module\n\nBefore you begin, you must add the RVM module to your Puppet installation.  This can be done with:\n\n    $ puppet module install puppet/rvm\n\nYou may now continue configuring RVM resources.\n\n\n## Install RVM with Puppet\n\n    class { 'rvm': }\n\nThis will install RVM into `/usr/local/rvm`.\n\nTo use RVM without sudo, users need to be added to the `rvm` group.  This can be easily done with:\n\n    rvm::system_user { bturner: ; jdoe: ; jsmith: ; }\n\nIf GPG is installed, installing RVM requires the RVM GPG key.\nThis module will install the key if `gpg` is already installed or being installed with the\n[`golja-gnupg`](https://forge.puppetlabs.com/golja/gnupg) module.\n\nIf you don't want this module to manage any signing keys, set the `signing_keys` parameter to `[]`\n\n    class { 'rvm': signing_keys =\u003e [] }\n\n## Installing Ruby\n\nYou can tell RVM to install one or more Ruby versions with:\n\n    rvm_system_ruby {\n      'ruby-1.9':\n        ensure      =\u003e 'present',\n        default_use =\u003e true,\n        build_opts  =\u003e ['--binary'];\n      'ruby-2.0':\n        ensure      =\u003e 'present',\n        default_use =\u003e false;\n    }\n\nYou 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.\n\nIf rvm fails to install binary rubies you can increase curl's timeout with the `rvm_max_time_flag` in `~/.rvmrc` with a fully qualified path to the home directory.\n\n    # ensure rvm doesn't timeout finding binary rubies\n    # the umask line is the default content when installing rvm if file does not exist\n    file { '/home/user/rvmrc':\n      content =\u003e 'umask u=rwx,g=rwx,o=rx\n                  export rvm_max_time_flag=20',\n      mode    =\u003e '0664',\n      before  =\u003e Class['rvm'],\n    }\n\nOr, to configure `/etc/rvmrc` you can use use `Class['rvm::rvmrc]`\n\n    class{ 'rvm::rvmrc':\n      max_time_flag =\u003e 20,\n      before  =\u003e Class['rvm'],\n    }\n\n### Installing JRuby from sources\n\nJRuby has some extra requirements, java, maven and ant that you can install using\n[puppetlabs/java](http://forge.puppetlabs.com/puppetlabs/java),\n[maestrodev/ant](http://forge.puppetlabs.com/maestrodev/ant) and\n[maestrodev/maven](http://forge.puppetlabs.com/maestrodev/maven) modules.\n\n    class { 'java': } -\u003e\n    class { 'ant': } -\u003e\n    class { 'maven::maven': } -\u003e\n    rvm_system_ruby { 'jruby-1.7.6':\n      ensure      =\u003e 'present',\n      default_use =\u003e false;\n    }\n\n\n## Creating Gemsets\n\nCreate a gemset with:\n\n    rvm_gemset {\n      'ruby-1.9.3-p448@myproject':\n        ensure  =\u003e present,\n        require =\u003e Rvm_system_ruby['ruby-1.9.3-p448'];\n    }\n\n\n## Installing Gems\n\nInstall a gem with:\n\n    rvm_gem {\n      'ruby-1.9.3-p448@myproject/bundler':\n        ensure  =\u003e '1.0.21',\n        require =\u003e Rvm_gemset['ruby-1.9.3-p448@myproject'];\n    }\n\nThe *name* of the gem should be `\u003cruby-version\u003e[@\u003cgemset\u003e]/\u003cgemname\u003e`.  For example, you can install bundler for ruby-1.9.2 using `ruby-1.9.3-p448/bundler`.  You could install rails in your project's gemset with: `ruby-1.9.3-p448@myproject/rails`.\n\nAlternatively, you can use this more verbose syntax:\n\n    rvm_gem {\n      'bundler':\n        name         =\u003e 'bundler',\n        ruby_version =\u003e 'ruby-1.9.3-p448',\n        ensure       =\u003e latest,\n        require      =\u003e Rvm_system_ruby['ruby-1.9.3-p448'];\n    }\n\n## Creating Aliases\n\nTo create an RVM alias, you can use:\n\n    rvm_alias {\n      'myproject':\n        target_ruby =\u003e 'ruby-1.9.3-p448@myproject',\n        ensure      =\u003e present,\n        require     =\u003e Rvm_gemset['ruby-1.9.3-p448@myproject'];\n    }\n\n## Creating Wrappers\n\nTo create an RVM wrapper, you can use:\n\n    rvm_wrapper {\n      'god':\n        target_ruby =\u003e 'ruby-1.9.3-p448',\n        prefix      =\u003e 'bootup',\n        ensure      =\u003e present,\n        require     =\u003e Rvm_system_ruby['ruby-1.9.3-p448'];\n    }\n\n## Installing Passenger\n\nNOTE: You must install the [puppetlabs/apache](http://forge.puppetlabs.com/puppetlabs/apache) module by yourself.\nIt is not included as a dependency to this module to avoid installing it when is not needed most times.\n\nInstall passenger using the [puppetlabs/apache](http://forge.puppetlabs.com/puppetlabs/apache) module,\nand using:\n\n    class { 'apache': }\n    class { 'rvm::passenger::apache':\n        version            =\u003e '3.0.11',\n        ruby_version       =\u003e 'ruby-1.9.3-p448',\n        mininstances       =\u003e 3,\n        maxinstancesperapp =\u003e 0,\n        maxpoolsize        =\u003e 30,\n        spawnmethod        =\u003e 'smart-lv2',\n    }\n\n## Using Hiera\n\nYou can configure the ruby versions to be installed and the system users from hiera\n\n    rvm::system_rubies:\n      'ruby-1.9':\n        default_use: true\n      'ruby-2.0': {}\n      'jruby-1.7': {}\n\n    rvm::system_users:\n      - john\n      - doe\n\n    rvm::rvm_gems:\n      'bundler':\n        name: 'bundler'\n        ruby_version: 'ruby-1.9'\n        ensure: latest\n\n\n## Building the module\n\nTesting is done with rspec, [Beaker-rspec](https://github.com/puppetlabs/beaker-rspec), [Beaker](https://github.com/puppetlabs/beaker))\n\nTo test and build the module\n\n    bundle install\n    # run specs\n    rake\n\n    # run Beaker system tests with vagrant vms\n    rake beaker\n    # to use other vm from the list spec/acceptance/nodesets and not destroy the vm after the tests\n    BEAKER_destroy=no BEAKER_set=centos-64-x64 bundle exec rake beaker\n\n    # Release the Puppet module to the Forge, doing a clean, build, tag, push, bump_commit and git push\n    rake module:release\n\n## Troubleshooting / FAQ\n\n### An error \"Could not find a default provider for rvm\\_system\\_ruby\" is displayed when running Puppet with --noop\n\nThis means that puppet cannot find the `/usr/local/rvm/bin/rvm` command\n(probably because RVM isn't installed yet).  Currently, Puppet does not support\nmaking a provider suitable using another resource (late-binding).  You may want\nto use run stages to install RVM before the rest of the\nconfiguration runs.  When running in _noop_ mode, RVM is not actually installed\ncausing rvm\\_system\\_ruby, rvm\\_gem and rvm\\_gemset resources to generate this\nerror.  You can avoid this error by surrounding your rvm configuration in an if\nblock:\n\n    if $rvm_installed == \"true\" {\n        rvm_system_ruby ...\n    }\n\nDo not surround `include rvm` in the if block, as this is used to install RVM.\n\nNOTE: $rvm\\_installed is evaluated at the beginning of each puppet run.  If you\nuse this in your manifests, you will need to run puppet twice to fully\nconfigure RVM.\n\n\n### Some packages/libraries I don't want or need are installed (e.g. build-essential, libc6-dev, libxml2-dev).\n\nRVM works by compiling Ruby from source.  This means you must have all the libraries and binaries required to compile Ruby installed on your system, which is handled by rvm autolibs in newer versions of RVM.\n\n\n### It doesn't work on my operating system.\n\nCheck the rspec-system tests as described above to test in a specific OS\nIf that doesn't work feel free to send a pull request ;)\n\n\n### Why didn't you just add an RVM provider for the existing package type?\n\nThe puppet [package](http://docs.puppetlabs.com/references/latest/type.html#package)\ntype seems like an obvious place for the RVM provider.  It would be nice if the syntax\nfor installing Ruby with RVM looked like:\n\n    # NOTE: This does not work\n    package {'ruby':\n        provider =\u003e 'rvm',\n        ensure =\u003e '1.9.2-p290';\n    }\n\nWhile this may be possible, it becomes harder to manage multiple Ruby versions and\nnearly impossible to install gems for a specific Ruby version.  For this reason,\nI decided it was best to create a completely new set of types for RVM.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fpuppet-rvm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoxpupuli%2Fpuppet-rvm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fpuppet-rvm/lists"}