{"id":13818273,"url":"https://github.com/capistrano/bundler","last_synced_at":"2025-05-15T11:05:49.099Z","repository":{"id":9976570,"uuid":"12003494","full_name":"capistrano/bundler","owner":"capistrano","description":"Bundler support for Capistrano 3.x","archived":false,"fork":false,"pushed_at":"2024-08-06T14:26:23.000Z","size":96,"stargazers_count":221,"open_issues_count":9,"forks_count":78,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-22T03:33:49.850Z","etag":null,"topics":["bundler","capistrano"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/capistrano.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-08-09T15:01:44.000Z","updated_at":"2025-04-02T07:07:17.000Z","dependencies_parsed_at":"2024-11-05T19:00:53.522Z","dependency_job_id":"6011d2d9-8381-4ee0-86f3-4834add09da3","html_url":"https://github.com/capistrano/bundler","commit_stats":{"total_commits":92,"total_committers":34,"mean_commits":"2.7058823529411766","dds":0.7934782608695652,"last_synced_commit":"0a5b9dda84b53985743aa12210c6c62465f1f98d"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capistrano%2Fbundler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capistrano%2Fbundler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capistrano%2Fbundler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capistrano%2Fbundler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/capistrano","download_url":"https://codeload.github.com/capistrano/bundler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250365302,"owners_count":21418665,"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":["bundler","capistrano"],"created_at":"2024-08-04T07:00:39.457Z","updated_at":"2025-05-15T11:05:49.078Z","avatar_url":"https://github.com/capistrano.png","language":"Ruby","funding_links":[],"categories":["Awesome Capistrano"],"sub_categories":["Gems"],"readme":"# Capistrano::Bundler\n\nBundler specific tasks for Capistrano v3:\n\n```sh\n$ cap production bundler:install\n```\n\nIt also prefixes certain binaries to use `bundle exec`.\n\n## Installation\n\nAdd these lines to your application's Gemfile **[Recommended]**:\n\n```ruby\ngem 'capistrano', '~\u003e 3.6'\ngem 'capistrano-bundler', '~\u003e 2.0'\n```\n\nAnd then execute:\n\n```sh\n$ bundle\n```\n\nOr install it yourself as:\n\n```sh\n$ gem install capistrano-bundler\n```\n\n## Usage\n\nRequire in `Capfile` to use the default task:\n\n```ruby\nrequire 'capistrano/bundler'\n```\n\nThe task will run before `deploy:updated` as part of Capistrano's default deploy, or can be run in isolation with `cap production bundler:install`.\n\nIn order for Bundler to work efficiently on the server, its project configuration directory (`\u003crelease_path\u003e/.bundle/`) should be persistent across releases.\nYou need to add it to the `linked_dirs` Capistrano variable:\n\nCapistrano **3.5**+:\n\n```ruby\n# config/deploy.rb\n\nappend :linked_dirs, '.bundle'\n```\n\nCapistrano \u003c 3.5:\n\n```ruby\n# config/deploy.rb\n\nset :linked_dirs, fetch(:linked_dirs, []) \u003c\u003c '.bundle'\n```\n\nIt will still work fine with non-persistent configuration directory, but then it will have to re-resolve all gems on each deploy.\n\nBy default, the plugin adds `bundle exec` prefix to common executables listed in `bundle_bins` option. This currently applies for `gem`, `rake` and `rails`.\n\nYou can add any custom executable to this list:\n\n```ruby\nset :bundle_bins, fetch(:bundle_bins, []).push('my_new_binary')\n```\n\nConfigurable options:\n\n```ruby\nset :bundle_roles, :all                                         # this is default\nset :bundle_config, { deployment: true }                        # this is default\nset :bundle_servers, -\u003e { release_roles(fetch(:bundle_roles)) } # this is default\nset :bundle_binstubs, -\u003e { shared_path.join('bin') }            # default: nil\nset :bundle_binstubs_command, :install                          # this is default\nset :bundle_gemfile, -\u003e { release_path.join('MyGemfile') }      # default: nil\nset :bundle_path, -\u003e { shared_path.join('bundle') }             # this is default. set it to nil to use bundler's default path\nset :bundle_without, %w{development test}.join(':')             # this is default\nset :bundle_flags, '--quiet'                                    # this is default\nset :bundle_env_variables, {}                                   # this is default\nset :bundle_clean_options, \"\"                                   # this is default. Use \"--dry-run\" if you just want to know what gems would be deleted, without actually deleting them\nset :bundle_check_before_install, true                          # default: true. Set this to false to bypass running `bundle check` before executing `bundle install`\n```\n\nYou can parallelize the installation of gems with bundler's jobs feature.\nChoose a number less or equal than the number of cores your server.\n\n```ruby\nset :bundle_jobs, 8 # default: 4, only available for Bundler \u003e= 1.4\n```\n\nTo generate binstubs on each deploy, set `:bundle_binstubs` path:\n\n```ruby\nset :bundle_binstubs, -\u003e { shared_path.join('bin') }\n```\n\nIn the result this would execute the following bundle commands on all servers\n(actual paths depend on the real deploy directory):\n\n```sh\n$ bundle config --local deployment true\n$ bundle config --local gemfile /my_app/releases/20130623094732/MyGemfile\n$ bundle config --local path /my_app/shared/bundle\n$ bundle config --local without \"development test\"\n$ bundle install --quiet --binstubs /my_app/shared/bin\n```\n\nIf any option is set to `nil` it will be excluded from the final bundle commands.\n\nIf you want to clean up gems after a successful deploy, add `after 'deploy:published', 'bundler:clean'` to config/deploy.rb.\n\nDownsides to cleaning:\n\n* If a rollback requires rebuilding a Gem with a large compiled binary component, such as Nokogiri, the rollback will take a while.\n* In rare cases, if a gem that was used in the previously deployed version was yanked, rollback would entirely fail.\n\nIf you're using Bundler \u003e= 2.1 and you are generating binstubs, you can configure capistrano-bundler to use the newer\n`bundle binstubs` command. This will avoid the deprecation warning that you'd otherwise get when using `bundle install`\nto generate binstubs:\n\n```ruby\nset :bundle_binstubs_command, :binstubs\n```\n\n### Environment Variables\n\nThe `bundle_env_variables` option can be used to specify any environment variables you want present when running the `bundle` command:\n\n```ruby\n# This translates to NOKOGIRI_USE_SYSTEM_LIBRARIES=1 when executed\nset :bundle_env_variables, { nokogiri_use_system_libraries: 1 }\n```\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapistrano%2Fbundler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapistrano%2Fbundler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapistrano%2Fbundler/lists"}