{"id":19816897,"url":"https://github.com/rvm/rvm1-capistrano3","last_synced_at":"2025-04-05T19:14:22.189Z","repository":{"id":11428943,"uuid":"13882111","full_name":"rvm/rvm1-capistrano3","owner":"rvm","description":"RVM 1.x Capistrano 3.x integration gem","archived":false,"fork":false,"pushed_at":"2023-01-06T10:30:57.000Z","size":54,"stargazers_count":73,"open_issues_count":29,"forks_count":35,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-03-29T18:08:29.674Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rvm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-10-26T11:15:43.000Z","updated_at":"2024-08-29T07:51:57.000Z","dependencies_parsed_at":"2023-01-13T16:30:23.669Z","dependency_job_id":null,"html_url":"https://github.com/rvm/rvm1-capistrano3","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvm%2Frvm1-capistrano3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvm%2Frvm1-capistrano3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvm%2Frvm1-capistrano3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvm%2Frvm1-capistrano3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rvm","download_url":"https://codeload.github.com/rvm/rvm1-capistrano3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247386266,"owners_count":20930619,"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","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":[],"created_at":"2024-11-12T10:11:00.524Z","updated_at":"2025-04-05T19:14:22.150Z","avatar_url":"https://github.com/rvm.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RVM 1.x Capistrano 3.x integration\n\nAn automated version of the integration requiring minimal configuration.\nIncludes task to install RVM and Ruby.\n\n## Installation\nAdd this line to your application's Gemfile:\n\n    gem 'rvm1-capistrano3', require: false\n\nYou need to run `bundle install` to install the gem.\n\nOr install it yourself as:\n\n    $ gem install rvm1-capistrano3\n\n## Usage\n\nIn `Capfile` add\n\n```ruby\nrequire 'rvm1/capistrano3'\n```\n\nIt will automatically:\n\n- detect rvm installation path, preferring user installation\n- detect ruby from project directory\n- create the gemset if not existing already\n\n## Security\n\nPlease note that for now no automatic installation of PGP keys is done,\nbased on this instruction \u003chttp://rvm.io/rvm/security\u003e a minimalistic\ntask can be added to handle the keys installation:\n\n```ruby\nnamespace :app do\n  task :update_rvm_key do\n    execute :gpg, \"--keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3\"\n  end\nend\nbefore \"rvm1:install:rvm\", \"app:update_rvm_key\"\n```\nreplace `:gpg` with `:gpg2` depending on the output from RVM.\n\n\n## Install RVM 1.x\n\nThis task will install stable version of rvm in `$HOME/.rvm`:\n```bash\ncap rvm1:install:rvm\n```\n\nOr add an before hook:\n```ruby\nbefore 'deploy', 'rvm1:install:rvm'  # install/update RVM\n```\n\n## Install Ruby\n\nThis task will install ruby from the project (other the specified one):\n```bash\ncap rvm1:install:ruby\n```\n\nOr add an before hook:\n```ruby\nbefore 'deploy', 'rvm1:install:ruby'  # install/update Ruby\n```\n\nThis task requires [`NOPASSWD` for the user in `/etc/sudoers`](http://serverfault.com/a/160587),\nor at least all ruby requirements installed already.\n\nPlease note that `NOPASSWD` can bring security vulnerabilities to your system and\nit's not recommended to involve this option unless you really understand implications of it.\n\n## Create alias\n\nCreates alias with the application name for the app ruby:\n\n```ruby\nbefore 'deploy', 'rvm1:alias:create'\n```\n\nTo change the alias name use:\n\n```ruby\nset :rvm1_alias_name, 'my-alias-name'\n```\n\n## Install Gems\n\nThis task replaces `capistrano-bundler` gem use only one at time\n\nThis will install gems from the project `Gemfile`:\n```bash\ncap rvm1:install:gems\n```\n\nOr add an before hook:\n```ruby\nbefore 'deploy', 'rvm1:install:gems'  # install/update gems from Gemfile into gemset\n```\n\nRight now all gems in Gemfile will be installed into gemset.\n\nSupport for `Gemfile` installation in Rubygems is still young,\nwe will improve it with new RG releases.\n\n- RG 2.0-2.1 - support for gem + version in `Gemfile`\n- RG 2.2 - limited support for `Gemfile.lock` - work still in progress,\n  test with `rvm rubygems head`\n\n## Configuration\n\nWell if you really need to there are available ways:\n\n- `set :rvm1_ruby_version, \"2.0.0\"` - to avoid autodetection and use specific version\n- `fetch(:default_env).merge!( rvm_path: \"/opt/rvm\" )` - to force specific path to rvm installation\n\n## How it works\n\nThis gem adds a new task `rvm1:hook` before `deploy:starting`.\nIt uses the [script/rvm-auto.sh](script/rvm-auto.sh) for capistrano when it wants to run\n`rake`, `gem`, `bundle`, or `ruby`.\n\n## Check your configuration\n\nIf you want to check your configuration you can use the `rvm1:check` task to\nget information about the RVM version and ruby which would be used for\ndeployment.\n\n    $ cap production rvm1:check\n\n## Custom tasks which rely on RVM/Ruby\n\nWhen building custom tasks which need the current ruby version and gemset, all you\nhave to do is run the `rvm1:hook` task before your own task. This will handle\nthe execution of the ruby-related commands.\nThis is only necessary if your task is *not* *after* the `deploy:starting` task.\n\n    before :my_custom_task, 'rvm1:hook'\n\n# Custom Roles: :rvm1_roles\n\nIf you want to restrict RVM usage to a subset of roles, you may set `:rvm_roles`:\n\n    set :rvm1_roles, [:rvm]\n\nThis can be used to restrict RVM use to only one stage which uses given roles.\n\n# Custom Path to rvm-auto.sh\n\nBy default the `rvm-auto.sh` script will be saved under `/tmp/\u003capplication\u003e-\u003cssh-user\u003e`. To override it, use:\n\n    set :rvm1_auto_script_path, '/tmp/another/dir'\n\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Test your changes (`tf --text test/*.sh`)\n4. Commit your changes (`git commit -am 'Add some feature'`)\n5. Push to the branch (`git push origin my-new-feature`)\n6. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frvm%2Frvm1-capistrano3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frvm%2Frvm1-capistrano3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frvm%2Frvm1-capistrano3/lists"}