tosback2 icon indicating copy to clipboard operation
tosback2 copied to clipboard

Conflicting requirements for mime-types gem

Open irons opened this issue 11 years ago • 3 comments

I installed master/45995736 on OS X 10.8.5 today. I'm using ruby 1.9.3-p429 via rbenv, and when I try to run the crawler from the "rubycode" directory, I get a gem specification failure:

$ ruby main.rb ../rules/dropbox.com.xml 
/Users/myuser/.rbenv/versions/1.9.3-p429/lib/ruby/1.9.1/rubygems/specification.rb:1637:in `raise_if_conflicts': Unable to activate mail-2.5.4, because mime-types-2.1 conflicts with mime-types (~> 1.16) (Gem::LoadError)
    from /Users/myuser/.rbenv/versions/1.9.3-p429/lib/ruby/1.9.1/rubygems/specification.rb:746:in `activate'
    from /Users/myuser/.rbenv/versions/1.9.3-p429/lib/ruby/1.9.1/rubygems.rb:212:in `rescue in try_activate'
    from /Users/myuser/.rbenv/versions/1.9.3-p429/lib/ruby/1.9.1/rubygems.rb:209:in `try_activate'
    from /Users/myuser/.rbenv/versions/1.9.3-p429/lib/ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require'
    from /Users/myuser/.rbenv/versions/1.9.3-p429/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in `require'

The same error persists in a clean install of 1.9.3-p429, plus the mechanize, nokogiri, sanitize, and mail gems. gem search mime-types indicates I have versions 2.1 and 1.25.1 installed, which should satisfy the requirement for ~> 1.16, but appears not to. I can't uninstall mime-types 2.1 because mechanize requires ~> mime-types 2.0.

I'm curious to know how other people are bypassing this problem.

irons avatar Jan 31 '14 23:01 irons

Same outcome using ruby 2.0.0-p195.

irons avatar Feb 02 '14 14:02 irons

Hey irons! I recently switched from macports to homebrew, messed up several of my dependencies, but got it working again! Here are my working versions of the gems you mentioned: mail (2.5.4, 2.4.4) mechanize (2.5.1) mime-types (1.23, 1.21, 1.19) nokogiri (1.5.10, 1.5.6) sanitize (2.0.3)

Maybe you've got a newer version of mechanize? Hope this helps! :) Jimm

JimmStout avatar Feb 11 '14 21:02 JimmStout

Here's my list, latest versions as of ten days ago:

mail (2.5.4) mechanize (2.7.3) mime-types (2.1, 1.25.1) nokogiri (1.6.1) sanitize (2.1.0)

The only thing I built from macports was nokogiri's libxml2 dependency (@2.9.1). I'll take another crack at it tonight.

irons avatar Feb 11 '14 23:02 irons