Open zw963 opened 8 years ago
bundler is independent from rails. require 'bundler/setup'
sets up the load path for the bundle. Here it's done so the _linuxinput gem can be required.
But you are right, that it should probably be somewhere else (i.e. the script using the gem). It's also inconsistent right now. Bundler is included as development dependency but used in runtime code.
bundler is independent from rails. require 'bundler/setup' sets up the load path for the bundle.
As i know, if you use Gemfile, you not need add any bundler/setup
in your's rubycode except
Gemfile.
It's also inconsistent right now. Bundler is included as development dependency but used in runtime code.
I think bundler is only need on development, in this case, you have code first, and need bundler
to install all dependency, when I need one gem and don't care source code, i will install this
will gem install GEMNAME
, in this case, i think the dependency should be resolve by gemspec.
BTW: this issue is because I never use a (non-rails) ruby gems which add bundler as runtime dependency.
Thanks.
I think is gem is general use for all rubyist, not only for rails. rvm is not install bundler automatically, so when run those gem, will cause following error:
remove those line should be save.
When in development, only need use Gemfile, bundler will manage all for us. require bundler/setup manually in code is no need at all.