{"id":17343684,"url":"https://github.com/gma/bundler-exec","last_synced_at":"2025-05-07T04:10:48.302Z","repository":{"id":791186,"uuid":"488466","full_name":"gma/bundler-exec","owner":"gma","description":"Automatically run Ruby scripts with \"bundle exec\"","archived":false,"fork":false,"pushed_at":"2022-01-12T22:23:42.000Z","size":30,"stargazers_count":159,"open_issues_count":1,"forks_count":37,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-31T06:11:20.374Z","etag":null,"topics":["bundler","gem","ruby"],"latest_commit_sha":null,"homepage":"http://effectif.com/ruby/automating-bundle-exec","language":"Shell","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/gma.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":"2010-01-26T00:08:53.000Z","updated_at":"2024-08-12T19:19:16.000Z","dependencies_parsed_at":"2022-07-18T13:00:59.008Z","dependency_job_id":null,"html_url":"https://github.com/gma/bundler-exec","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gma%2Fbundler-exec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gma%2Fbundler-exec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gma%2Fbundler-exec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gma%2Fbundler-exec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gma","download_url":"https://codeload.github.com/gma/bundler-exec/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252810273,"owners_count":21807759,"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","gem","ruby"],"created_at":"2024-10-15T16:10:02.854Z","updated_at":"2025-05-07T04:10:48.280Z","avatar_url":"https://github.com/gma.png","language":"Shell","readme":"bundler-exec\n===========\n\nbundler is a great way to manage the gem dependencies in your Ruby project.\n\nOne of bundler's nifty features is the `bundle exec` command which allows\nyou to run an executable (such as rake) in the context of your bundled gem\ndependencies. In other words, you'll only be able to access the gems that\nyou've told bundler that you want to use.\n\nTo run a command in this way you need to prefix it with 'bundle exec', like\nso:\n\n    $ bundle exec rake my:task\n\nIt's something that you really ought to be doing whenever you run a ruby\nscript within a bundled project, but, alas, it can become a chore.\n\nEnter bundler-exec, which takes care of automatically pre-pending \"bundle\nexec\" to the beginning of common Ruby commands.\n\n## Installation\n\n 1. Copy bundler-exec.sh to ~/.bundler-exec.sh.\n 2. Source it from your ~/.bashrc file.\n\nFor example:\n\n    $ curl -L https://raw.githubusercontent.com/gma/bundler-exec/main/bundler-exec.sh \u003e ~/.bundler-exec.sh\n    $ echo \"[ -f ~/.bundler-exec.sh ] \u0026\u0026 source ~/.bundler-exec.sh\" \u003e\u003e ~/.bashrc\n\nEr, that's it...\n\nYou can get bundler by installing the gem:\n\n    $ gem install bundler\n\nSee http://github.com/carlhuda/bundler for more about bundler.\n\n## Usage\n\nTo check that bundler-exec has been installed properly, use the `type`\nshell built-in command to see what it will do when you run `ruby`. It\nshould tell you it's an alias, like this:\n\n    $ type ruby\n    ruby is aliased to `run-with-bundler ruby'\n\nIf so, whenever you run `ruby` (or any of the other commands listed in\nthe `BUNDLED_COMMANDS` variable) you'll actually be running it with\n`bundle exec`.\n\nIf you want to run one of these commands without `bundler exec` you can\nuse `which` to find the full path to executable and then run it, like\nthis:\n\n    $ $(which ruby) -e 'puts \"hello\"'\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgma%2Fbundler-exec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgma%2Fbundler-exec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgma%2Fbundler-exec/lists"}