简体   繁体   中英

Is there a way to use Bundler for production gems?

I tried searching for this several times, but if this question has been answered already I didn't find it.

So, let's say I've developed a plain old gem (not a Rails app). I already know how to use Bundler for development, so I have a Gemfile and everything in my repository. However, I want this gem to use Bundler for dependency resolution when I install it, not just when I work on it.

Is there a way to do so, or would I have to resort to running its commands from a git checkout with bundle exec?

Bundler resolves dependencies not only for development. Just run bundle install on production server after deployment and it will install all needed gems there too.

If you need to install gems from several repositories, add row in you Gemfile:

source 'http://you_repository.com

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM