syntax.us Let the syntax do the talking
Blog Contact Posts Questions Tags Hire Me

Question:
In Bundler how do I binstub a gem subset?

Sometimes in a Rails app I will run a bundler command like this:
bundle install --binstubs
This command will place executable files (called 'binstubs') in the bin subdirectory.

If any gem in the Gemfile has a corresponding binstub, then that file will get copied into bin.

Sometimes I dont want all the binstubs placed in bin.

Sometimes I want just a subset.

How do I declare that I want only a subset of binstubs placed in bin?

Answer, I should use syntax like this:
bundle binstubs thin
After I run the above shell command, assuming I have gem 'thin' in my Gemfile, I should find one new binstub in my bin directory named thin.

And I can then use this shell command
bin/thin -p 3000
to start to start the thin webserver for my Rails app.


syntax.us Let the syntax do the talking
Blog Contact Posts Questions Tags Hire Me