I am developing both an app and a gem for it. The gem will be available from Gemfury when the app will be in production. But while developing, I would like to use the local path of the gem, so that I can modify both the gem and the app and see changes faster. How can I do this?
I know there is bundle config local.GEM GEM_PATH
, but this only works for git sources, not for Gemfury.
I can set an env var and conditionally specify gems in the Gemfile
, but I hope there is a better approach to this.
if ENV['RAILS_ENV'] == 'development'
gem 'your_gem', path: '/path/to/gem'
else
gem 'your_gem'
end
Then, locally, run
RAILS_ENV=development bundle install
It's a hack, for sure, but then again, so is all of this :)
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.