Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
443 views
in Technique[技术] by (71.8m points)

zsh - How to prevent bundler from generating binstubs?

I am using oh-my-zsh with plugins=(git bundler) in my .zshrc. So, I don't need bundler to generate binstubs. But bundler does it anyway.

? bundle
Using rake (0.9.2.2) 
...
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
? ls bin
erubis       haml         nokogiri     rails        rake2thor    rdoc         resque-web   sass         scss         thor         tt
guard        html2haml    rackup       rake         rdiscount    resque       ri           sass-convert thin         tilt

Why did the binstubs get generated -- I didn't pass an option asking for them. At least, I don't think I am:

? which bundle
/Users/david/.rbenv/shims/bundle
? cat /Users/david/.rbenv/shims/bundle
#!/usr/bin/env bash
set -e
export RBENV_ROOT="/Users/david/.rbenv"
exec rbenv exec "${0##*/}" "$@"

I don't have anything in my ~/.bundle/config either.

Please help me put the kabosh on the undesired binstubs!

question from:https://stackoverflow.com/questions/11662586/how-to-prevent-bundler-from-generating-binstubs

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Bundler generates binstubs on a per-application basis. If you ran bundle install --binstubs at some point in the past, Bundler will remember that and generate binstubs anytime you run install again. To disable them, you can either run bundle install --no-binstubs, or run rm -rf .bundle/config. Either way, that will disable binstub generation.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...