简体   繁体   中英

Run gem directly from git repo with bundler

I am developing a gem to use in my rails app.
The gem is located at /home/me/my_gem .

If I use gem 'my_gem', :git => '/home/me/my_gem' bundler takes it and installs it into ~/.bundler/... but I want the gem to be used directly from /home/me/my_gem so I don't have to run bundle install every time I do a change to the gem.

You need use the :path options

gem 'my_gem', :path => '/home/me/my_gem'

After that you even not need run a bundle install. Each time is your directory code used.

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