Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control scripts don't load bundler #8

Open
hobeone opened this issue Mar 3, 2013 · 1 comment
Open

Control scripts don't load bundler #8

hobeone opened this issue Mar 3, 2013 · 1 comment

Comments

@hobeone
Copy link

hobeone commented Mar 3, 2013

The generated _ctl scripts don't require 'bundler/setup' and so don't see gem files that bundler has downloaded that are not part of the main gem install.

I ran into this after setting up my Gemfile to use the git head version of daemons-rails (which rvm and bundler installed to /usr/local/rvm/gems/ruby-head@rails4/bundler/gems/daemons-rails-0bf7123eb5e6) rubygems doesn't pick that up if you don't include bundler.

The simple fix was to just add require 'bundler/setup' right after require 'rubygems'

@mirasrael
Copy link
Owner

Hello, @hobeone.
Thanks for your feedback! Initially I not planned to add bundler loading when running control script, because it may significantly (about 2-3 seconds) increase control script startup time, especially for Gemfile with alot of gems (for example, rake also doesn't loads bundler).
But after this issue, I'm start thinking what it may be no so big deal to add bundler/setup into script, because in 99% cases in my expirience I'm running this with bundle exec. So, if you will make pull request I accept it.

P.S.: You always have option to run control script with bundle exec or change generated ctrl file (its really rare when you need to regenerate it).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants