2

I am currently running one of my Rails applications on version 3.1.3. My gemfile always listed:

gem 'rails', '3.1.3'

This worked just fine. In an effort to move to 3.1.10, I changed my Gemfile to the following:

gem 'rails', '~> 3.1.10'

Surprisingly, things break when I run bundle update rails after that change:

Bundler could not find compatible versions for gem "multi_json":
  In Gemfile:
    twitter (>= 0) ruby depends on
      multi_json (~> 1.3) ruby

    fnordmetric (>= 0) ruby depends on
      multi_json (1.2.0)

Just as a test, I tried changing the gem version to '>= 3.1.0' and that installed without any quims, albeit it went to 3.2, which I'm not ready for just yet on this particular application.

Any suggestions for getting this thing running on 3.1.10 which was released today to address a security vulnerability?

Also an update:

I am having absolutely no trouble stashing Gemfile.lock away and starting from Rails 3.1.4. As soon as I try to go to 3.1.5+, this is where all the trouble begins.

6
  • I am not familiar with this problem in particular, but you could alter the gemspecs for either oauth2 or rails so the multi_json dependency would no longer conflict. This would only work if multi_json didn't changing in an API-breaking way between its two versions...
    – wless1
    Jan 9, 2013 at 0:02
  • How about "oauth2, "0.7.1"? Jan 9, 2013 at 0:04
  • oauth2 0.7.1 and 0.8.0 both list their dep as "multi_json ~> 1.0", so that shouldn't be the issue. Jan 9, 2013 at 0:36
  • yeah, I assume currently it is on oauth2 (0.7.0). I'd suggest doing a full bundle update. Jan 9, 2013 at 1:05
  • It also appears the twitter gem requires multi_json ~> 1.3. I'm not sure how this didn't break when I was running on 3.1.3. But it's painful right now when trying to update to 3.1.10.
    – randombits
    Jan 9, 2013 at 1:44

2 Answers 2

2

Make the change in your Gemfile to

gem 'rails', '3.1.10'

Then try running

bundle update

instead of

bundle install

I can't see your Gemfile but this should will allow the bundler to try and find compatible Gem matches. If you have hard code a Gem revision you might have to relax it and repeat the update. Good luck!

0

Looking at the gems, it appears that oauth2 lists "multi_json ~> 1.0" and ActiveSupport 3.1.10 lists "multi_json < 1.3, >= 1.0" as the dependencies, so that should resolve. I've run into strangeness like this and fixed it by running

gem uninstall <relevant gems>

then running bundle install again. So maybe try

gem uninstall oauth2 multi_json activesupport

then bundle install

Edit

gem uninstall twitter multi_json fnordmetric

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.