nobody
nobody

Reputation: 8263

Gemfile Dependencies for Different Environments

So I have particular gems that I want to run on Mac OSX, some that I want to run on Linux and some that I want to run on Windows for my different development environments due to specific dependencies with those machines but I'm not sure how to do this in a gemfile.

Is there a way to set out a specific group (ie. :group => Linux, :group => macosx, etc.) in a Gemfile for different environments?

Thanks!

Upvotes: 2

Views: 303

Answers (2)

nobody
nobody

Reputation: 8263

I ended up just installing all the gems, rather than just the gems I needed for each individual environment. I guess potentially you could set the gems up in different :groups in the Gemfile and then build using Bundler in each environment with --without {xyz env Gem's} but that was more hassle than it was worth. I think having the added gems bloated my application a bit, but at this point it is just nice to have it working on all my different environments.

Upvotes: 1

John
John

Reputation: 1540

I have not personally done this but there is information on doing it:

Google, Similar on SO, SO again

Hope these help.

Upvotes: 0

Related Questions