2

We have an option to force the gem installation

gem install -f <gemname>
-f, -​-[no-]force - Force gem to install, bypassing dependency checks

Do we have a similar option in Gemfile.

We are trying to install https://rubygems.org/gems/oci/ which has has a dependency on ruby 2.2.0 . But we are stuck with 2.1.6 in our tech stack. Oracle team has recommend us to force install it, and we have tried it and it works fine. But we need some way to mention it in Gemfile so that the bundler can take this up.

  • As far as I know... No, that would be a complete contradiction. The *whole point* of a `Gemfile` (and `Gemfile.lock`) is to specify a full list of dependencies and bundle them all together. – Tom Lord Oct 04 '17 at 11:20
  • 1
    Perhaps what I should be asking is, *why do you want to do this*? What are you trying to achieve? You'd like to install *some* gems for an application, without their dependencies -- why? – Tom Lord Oct 04 '17 at 11:50
  • which gem is creating you this issue? Can you put the full error backtrace in the question? – mabe02 Oct 04 '17 at 14:02
  • We are trying to install https://rubygems.org/gems/oci/ . It has a dependency on ruby version 2.2.0, however in our stack we are using 2.1.6 and it involves a lot of work to upgrade to 2.2.0 . Oracle team has recommended us to use use force option to install it. gem install -f oci is working fine and we have tested the gem also. – Tarun Goyal Oct 04 '17 at 18:35

0 Answers0