Since foreman is set up to work with thor 0.19.x, it won't work by default on a new rails install until this is updated.
https://github.com/ddollar/foreman/blob/master/foreman.gemspec#L20
Just tried it out myself and all tests pass with the newest version of thor:
https://github.com/kurtnovack/foreman/tree/thor-version
thor 0.20.0 also has a bugfix that's been a long time coming (https://github.com/erikhuda/thor/issues/538#issuecomment-326350114); currently foreman is preventing that upgrade. (So we're still stuck on a pre-bug version of thor.)
If you take foreman
out of your Gemfile as the README suggests you won't have dependency resolution problems. I suggest installing it as a system-level tool (gem install foreman
) rather than as a code-level dependency of your app.
@ddollar the issue is that thor has a bug in version 0.19.4, which is fixed in thor 0.20.0.
If you try and run system installed foreman with only system install thor v 0.20.0 foreman won't start.
This is because the gem dependency on thor is '~> 0.19.1'
.
So as the poster was saying, if you can't use thor v0.19.1 ( even as a dependency as foreman ), then you're out of luck. If thor v0.20 works with foreman, then it would be great to change the dependency to allow it.
@eadz I was under the same belief as you, but after reading the feedback from @ddollar in #678 I am kind of understanding his position.
That is: _if you install foreman by doing gem install foreman
instead of trying to get it into your Gemfile_, it will always work. Regardless of whether your project uses thor or not, or even a different version. I tried locally, by doing gem install thor
(to get a conflicting, newer version) but to my surprise, running foreman
still works.
Most helpful comment
@ddollar the issue is that thor has a bug in version 0.19.4, which is fixed in thor 0.20.0.
If you try and run system installed foreman with only system install thor v 0.20.0 foreman won't start.
This is because the gem dependency on thor is
'~> 0.19.1'
.So as the poster was saying, if you can't use thor v0.19.1 ( even as a dependency as foreman ), then you're out of luck. If thor v0.20 works with foreman, then it would be great to change the dependency to allow it.