Quantcast

can't cleanly install RBL: "same gem twice with different version requirements"

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

can't cleanly install RBL: "same gem twice with different version requirements"

Inger
Administrator
Using all currently supported RBL+RM versions, bundler throws this error:
You cannot specify the same gem twice with different version requirements. You specified: test-unit (>= 0) and test-unit (= 1.2.3)
 - breaking the -otherwise nice and friendly- install description.
Should not this be reported as a bug?

Everyone seems to stumble into this when first installing RBL, then works around in different ways
http://forum.redminebacklogs.net/template/NamlServlet.jtp?macro=search_page&node=2570580&query=%22You+cannot+specify+the+same+gem+twice+with+different+version+requirements%22&sort=date

For the sake of new users (including my IT support whom I'm trying to push for a company wide upgrade but these kind of issues show as a bad sign) - I think we should remove this little annoying obstacle.

So what could be the solution? simply get rid of version constraint in plugins/redmine_backlogs/Gemfile (as most people do locally) and commit back?

BTW, I don't fully understand the error, given that
* RM actually is less picky: it just wants 'test-unit' with no version (whereas RBL wants 1.2.3)
* I thought the  bundle '--without test' option should avoid looking at the test group.. but I'm not a bundle expert

Thanks for any clarification.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: can't cleanly install RBL: "same gem twice with different version requirements"

vanuan

This problem was discussed zillions of times. Both here and on github. It makes me sad. Try to use search.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: can't cleanly install RBL: "same gem twice with different version requirements"

vanuan
In reply to this post by Inger

The proper solution would be to completely drop rails 2 support and update all gems (and code) to the recent versions.

I've spend long hours to update rbl to rails 3 without dropping rails 2. Probably the time has come to drop it. But somebody here wants Chiliproject support. Without rails 2 it would be impossible. So I don't know if it is worth it.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: can't cleanly install RBL: "same gem twice with different version requirements"

Inger
Administrator
In reply to this post by vanuan
vanuan wrote
This problem was discussed zillions of times. Both here and on github. It makes me sad.
Yes, it's brought up all the time, but still no clean solution was agreed on.. always just a hacky workaround. While I'd be ok with it, it gives new users grief, including my it support who is giving me grief.

This makes me sad too, what's more: I'd love to see this fixed finally. At the minimum, i'd like to give users a clear install instructions on how to deal with this, rather than forcing them to browse through countless open ended discussions on forums and github, or let them create more misplaced bugs or posts.

Looking at bugs like this, it's not obvious for new users what to do:
 * https://github.com/backlogs/redmine_backlogs/pull/669 - seems fixing the problem, but it's still there now. Should that be reopened then?
 * https://github.com/backlogs/redmine_backlogs/issues/696 - this suggests that the  ./redmine20_install or --without test helps, but it does not
* etc...

vanuan wrote
The proper solution would be to completely drop rails 2 support and update all gems (and code) to the recent versions... somebody here wants Chiliproject support. Without rails 2 it would be impossible. So I don't know if it is worth it.
That's good to know, thanks. However, the main page explicitly says Chilliproject (or Rails 2) is not supported. It does not sound great to annoy users who are complying with the standard install requirements, and favour ones who do not. If anything, workaround instructions should be provided for them (if they exist).
I'm not saying we should not support CP or other setups, but first there should be a standard simple setup that Just Works, provided the exact steps are followed. So it's a matter of priorities.

vanuan wrote
 Try to use search.
I did use search, notice the url in my post (that was just illustration i did many more searches - through several months).
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: can't cleanly install RBL: "same gem twice with different version requirements"

patrick
It might be an alternative solution to give userexperience priority over setting up the test framework.
Proposition:
 - have backlogs Gemfile no version requirement on the test-unit, so users can install as they like
 - use redmine_install -i to patch in the correct version for travis/local testing. Document that.

I'll prepare a patch.

> * etc...
It is not easy to reproduce any bug without root access to your machine. In spare time. Please be patient. And please keep reporting stuff, that is most often the only way to see that something is indeed not fixed.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: can't cleanly install RBL: "same gem twice with different version requirements"

patrick
pushed an attempt to master.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: can't cleanly install RBL: "same gem twice with different version requirements"

Inger
Administrator
It might be an alternative solution to give userexperience priority over setting up the test framework.
Exactly, this seems like the right approach to me. A first time user is much more vulnerable (and while most of them polite, it's better not to waste support hours).

pushed an attempt to master.
Great, thanks for your prompt action!

I see your solution seems to work - just some questions:
1) you mention in the comment that "users can install bl on existing systems, and do not have to deal with bundler behavior"... Aha, so this hasn't been happening everywhery.. Reading some more history, it seems '--without test' works for some users, but not for others.  Could this depend on the bundler version? I just tried with bundler 1.1, 1.1.4, 1.2.3 on Linux/RVM all producing this.. May I ask what version/platform are you on?

2) Instead of dynamically creating a new Gemfile.rb_testenv and instance_evaling, would it be safer/simpler to just extend the 'if' condition in the Gemfile?

2a) If this test-unit 1.2.3 is really only for chiliproject (as vanuan suggests), just append  "and chiliproject"

  gem "test-unit", "=1.2.3" if RUBY_VERSION >= "1.9" and chiliproject

In this case, the sed magic in redmine_install.sh could be eliminated too (as we would not conflict with RM, only force when on CP).

2b) If we do want to ensure the constraint is applied whenever in testing env (regardless of chiliproject --which is unsupported anyway) -- ie the current, then just pass this hint down in an env var?

 gem "test-unit", "=1.2.3" if RUBY_VERSION >= "1.9" and ENV['IN_RBL_TEST']

Just filed a pull request for this (again only needed if 1.2.3 is needed for anything else than chiliproject).
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: can't cleanly install RBL: "same gem twice with different version requirements"

vanuan
> If this test-unit 1.2.3 is really only for chiliproject (as vanuan suggests), just append  "and chiliproject"

No, test-unit is required for running tests. Since testing of Redmine 1.4.x and Chiliproject is not on travis, I consider this as a sign that support of those is already broken. So it is safe to assume that they're not supported. Given that, we can update all gems (that depend on this specific version of test-unit).
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: can't cleanly install RBL: "same gem twice with different version requirements"

Inger
Administrator
This post was updated on .
vanuan wrote
No, test-unit is required for running tests
I know test-unit is for tests - I meant whether "1.2.3" ie. the forced version is needed only for chiliproject only or anything else. So if I understand correctly, it's not directly required by CP but by some other gems that we're stuck  with due to it..
In this case, we need the context-aware Gemfile logic, as currently done - or may I suggest to use the pull request provided)

> Since testing of Redmine 1.4.x and Chiliproject is not on travis
Yeah, and the website explicitly says these are not supported anyway.
I guess it's more of a question whether we want to support CP in a reasonable timeframe.. If so: the current logic is might be worth keeping (until CP is updated of course) ..
If not, I agree with a full update ASAP..
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: can't cleanly install RBL: "same gem twice with different version requirements"

patrick
In reply to this post by Inger
Inger wrote
Aha, so this hasn't been happening everywhery.. Reading some more history, it seems '--without test' works for some users, but not for others.  Could this depend on the bundler version? I just tried with bundler 1.1, 1.1.4, 1.2.3 on Linux/RVM all producing this.. May I ask what version/platform are you on?
Yes, i did not have these problems, but then, my last manual installation is somewhat of age and i did 'bundler -h'. Can't expect this from everyone. I'm on ubuntu-12.04/rvm, production at 1.9.3/2.1.6 and for testing i run the full travis matrix locally.

Inger wrote
2) Instead of dynamically creating a new Gemfile.rb_testenv and instance_evaling, would it be safer/simpler to just extend the 'if' condition in the Gemfile?
...
Your absolutely right. 2b for now. Thanks.

In any case, we must be careful as to not diverge production and test environments too much. Would spoil the trust.

As of support,
testing of redmine 1.4 is broken, i got nothing on the error and have no time to revive 1.4. Im seeing this now for a while: https://travis-ci.org/backlogs/redmine_backlogs/jobs/3281814
I'd vote to abandon 1.4 and even 2.0 for future releases.

CP i've got zero time to spend - i'd like to get the release stuff into production. Patches are welcome :-)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: can't cleanly install RBL: "same gem twice with different version requirements"

Inger
Administrator
Thanks for merging the fix so quickly, Patrick. Any objection for another release with this? (so that I could point my IT support to an official release). Is it much of an overhead?

patrick wrote
In any case, we must be careful as to not diverge production and test environments too much. Would spoil the trust.
Absolutely, this is just a temporary workaround (exception rather than the rule).

 i'd like to get the release stuff into production
Sounds great.

patrick wrote
As of support, testing of redmine 1.4 is broken
...
CP i've got zero time to spend
Fair enough, as even the CP guys don't seem to be spending much time on it... and if they are, they're working on Rails 3 migration.
RM 1.x  is likely to be abandoned upstream anyway, I guess.

So, if the final solution is to update all gems, thereby braking  already unsupported platforms - so be it.. My 2 cents.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: can't cleanly install RBL: "same gem twice with different version requirements"

patrick
@inger
Feel free to point. Validation results would be greatly welcome
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: can't cleanly install RBL: "same gem twice with different version requirements"

Inger
Administrator
patrick wrote
I did 0.9.35 just now for inger and his test-unit problem :-)
Am very pleased, thanks a lot!
Loading...