Forum: Ruby Avoid dependency from a gem on the commandline

4828d528e2e46f7c8160c336eb332836?d=identicon&s=25 Robert Heiler (shevegen)
on 2014-02-11 10:40
Hi

Right now gem will refuse to install a program if a dependency is not
met.

Is there a way to ignore that and still attempt an installation?

Specifically this is a gem that I myself wrote anyway and I now that the
project will still work partially, yet I can't seem to get gem to try to
download anyway. I need like an option 'still attempt to install it'.
E088bb5c80fd3c4fd02c2020cdacbaf0?d=identicon&s=25 Jesús Gabriel y Galán (Guest)
on 2014-02-11 10:52
(Received via mailing list)
On Tue, Feb 11, 2014 at 10:40 AM, Marc Heiler <lists@ruby-forum.com>
wrote:
>
> --
> Posted via http://www.ruby-forum.com/.

Have you tried this (from 'gem help install'):

    -f, --[no-]force                 Force gem to install, bypassing
dependency
                                     checks

Jesus.
4828d528e2e46f7c8160c336eb332836?d=identicon&s=25 Robert Heiler (shevegen)
on 2014-02-11 13:03
Thanks! That seems to work.
4828d528e2e46f7c8160c336eb332836?d=identicon&s=25 Robert Heiler (shevegen)
on 2014-02-11 13:08
Hmm... while installing works, running actually fails.

require 'diamond_shell'


"Gem::LoadError: Could not find chemistry (>= 1.0.0) amongst "

This is a problem. I know that chemistry is not mandatory at all, yet it
seems as if gem will try to always ensure that it is available. And if
it is not available, it will refuse to run.

At home on my linux machine it works just fine for me. I don't use gem
directly though, I use setup.rb.

I am here on a windows machine right now and it is bad that gem refuses
to continue ... I wrote the project myself, I know that chemistry is not
mandatory for all components.

Unfortunately I also can not modify rubygems or ruby on that windows
machine here, so I guess I am stuck. :(
6e366eb5a71be2bad7f383d42aeb4788?d=identicon&s=25 Justin Collins (Guest)
on 2014-02-12 03:19
(Received via mailing list)
On 02/11/2014 04:08 AM, Marc Heiler wrote:
>
> At home on my linux machine it works just fine for me. I don't use gem
> directly though, I use setup.rb.
>
> I am here on a windows machine right now and it is bad that gem refuses
> to continue ... I wrote the project myself, I know that chemistry is not
> mandatory for all components.
>
> Unfortunately I also can not modify rubygems or ruby on that windows
> machine here, so I guess I am stuck. :(
>

I'm not really a fan of this behavior, either, but it is what it is.

I don't think you need to modify rubygems or ruby, just modify the gem
itself and remove the 'chemistry' dependency.

-Justin
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.