Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joshbuddy/noexec
NO MORE BUNDLE EXEC
https://github.com/joshbuddy/noexec
Last synced: 3 months ago
JSON representation
NO MORE BUNDLE EXEC
- Host: GitHub
- URL: https://github.com/joshbuddy/noexec
- Owner: joshbuddy
- Created: 2012-03-28T02:49:30.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-04-02T21:59:02.000Z (over 12 years ago)
- Last Synced: 2024-05-11T18:44:06.374Z (6 months ago)
- Language: Ruby
- Homepage:
- Size: 135 KB
- Stars: 109
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# This project has been deprecated.
So young. So innocent. This approach has been combined with https://github.com/mpapis/rubygems-bundler for great justice! Go there instead, and for the love of God, don't use this anymore.
# Noexec
Let's stop using bundle exec, kthx.
## Installation
gem install noexec
Then, in your .profile (or somewhere you can set env variables)
RUBYOPT="-r`noexec`"
And you're done!
Alternatively you can use rubygems-bundler to generate wrappers aware of noexec, install:
gem install rubygems-bundler
change a line in ~/.gemrc to:
custom_shebang: $env ruby_noexec_wrapper
and run (once):
gem regenerate_binstubs
## Configuration
Though you can let noexec do it's own thing and rely on looking up your binary via your Gemfile, you can also specify which binaries you want included or excluded. Create a .noexec.yaml file along side any Gemfiles you want to use. Then, to enable (or disable) the usage of your particular binary into your bundle, add an include or exclude section. For example:
### .noexec.yaml
exclude: [rake]
Or,
include: [irb, ruby]
## Problems?
Things not going the way you'd like? Try your command again with NOEXEC_DEBUG=1 set and create a ticket. I'll fix it right away!
## How does this work?
It adds a script to every execution of ruby via the RUBYOPT environment variable. Then, when you run ruby, it takes a look at your working directory, and every directory above it until it can find a `Gemfile`. If the executable you're running is present in your Gemfile, it switches to using that `Gemfile` instead (via `Bundle.setup`).
Thank you Carl!!!!