Using :path and gems for the same package

25 views
Skip to first unread message

Linus Gasser

unread,
May 13, 2015, 2:20:15 PM5/13/15
to ruby-b...@googlegroups.com
Hello,

I'd like to do something like:

group :development do
  gem 'qooxview', path: '../QooxView'
end

group :production do
  gem 'qooxview'
end

When in development, I'd call

bundle install --without production

and be happy that I don't have to update my gems during development. Once I'm ready to make a new version, I'd update all gems and call

bundle install --without development
bundle package

update git and deploy. Unfortunately I get an error like

You cannot specify the same gem twice coming from different sources.
You specified that qooxview (>= 0) should come from source at ../QooxView and 

Is it possible to have a :path-gem for development and a 'real' gem for deployment? Or is there some other way without having two Gemspecs?

Thanks,

Linus

Tim Uckun

unread,
May 15, 2015, 7:59:25 AM5/15/15
to ruby-b...@googlegroups.com
What you need to do is set a bundle config (see http://bundler.io/v1.3/man/bundle-config.1.html)

You set a bundle config like they show in the example and then set a git branch in your gemfile.  From then on if you are on your local machine it will pull the branch from your local drive but if you are in production it will use the remote git repo.

--
You received this message because you are subscribed to the Google Groups "ruby-bundler" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-bundler...@googlegroups.com.
To post to this group, send email to ruby-b...@googlegroups.com.
Visit this group at http://groups.google.com/group/ruby-bundler.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages