Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.9.3 support is broken due to mime-types dependency #1615

Closed
xaviershay opened this issue Nov 29, 2015 · 7 comments
Closed

1.9.3 support is broken due to mime-types dependency #1615

xaviershay opened this issue Nov 29, 2015 · 7 comments

Comments

@xaviershay
Copy link

mime-types 3.0 removed support for Ruby 1.9.3.

Version 3.0 is a major release that requires Ruby 2.0 compatibility and removes deprecated functions.

ref: https://github.com/mime-types/ruby-mime-types/

Capybara depends on >= 1.16, and claims 1.9 support in the README.

This was previously reported for mime-types 2.0 at #1173, where it was suggested to switch to a ~> dependency instead. Given this is the second time it has broken, thoughts on doing so this time?

I discovered this because simplecov's 1.9 build was failing due to a transitive dependency on mime-types through capybara.

@twalpole
Copy link
Member

I see no reason to limit people running ruby 2.0+ to mime-types < 3 - yes if you're still running 1.9.3 you will need to lock mime-types in your own gem file, but capybara works with 2 or 3

@xaviershay
Copy link
Author

at the very least shouldn't this be called out in the README? It currently claims 1.9 support with no caveats, but it won't work out of the box.

(FWIW I'd be ok with just officially dropping 1.9 support since it was EOLed in February)

@twalpole
Copy link
Member

The fact is that Capybara will work with any available version of mime-types >= 1.16 -- mime-types v3+ won't work with ruby 1.9.3 but that's not a limitation of capybara, its really a limitation of bundler and the gem dependency system that it won't pick a lower acceptable version of mime-types when running with ruby < 2. The error message that is returned is pretty clear - "Gem::InstallError: mime-types-data requires Ruby version >= 2.0" and if a user adds mime-types < 2.0 to their Gemfile capybara will work just fine. If you wan't to submit a PR for documentation that will be considered but this really isn't a Capybara issue ( ie. Capybara works with any version of mime-types >= 1.16 that the ruby you are using will support)

@deivid-rodriguez
Copy link
Contributor

The build should be fixed though (or the failures ignored / 1.9 support dropped).

It could be possible too to specified correct conditional dependencies with a hack like this: astashov/debugger-xml@c67ef5b.

@stby-telstra
Copy link

I'm a newbie trying to build and install the capybara-webkit gem, following the Windows instructions in [https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit].

I'm tripping up on the last step in the instructions with the mime-types error ("mime-types-data requires Ruby version >= 2.0."), because I've followed the instructions pretty closely and used Ruby 1.9.3.

I'd just like to know, where and how do I "lock mime-types in your own gem file", as twalpole has suggested?

Thanks in advance.

PS - this is my list of local gems:


C:\Ruby193\capybara-webkit>gem list --local

*** LOCAL GEMS ***

addressable (2.3.6)
appraisal (0.4.0)
bigdecimal (1.1.0)
bundler (1.11.2)
capybara (2.6.2)
capybara-webkit (1.8.0, 1.0.0)
childprocess (0.5.5)
diff-lcs (1.2.4)
ffi (1.9.8 x86-mingw32)
io-console (0.3)
json (1.8.3, 1.5.5)
launchy (2.4.2)
mime-types (2.6.1)
mini_magick (3.2.1)
mini_portile2 (2.0.0)
minitest (2.5.1)
multi_json (1.11.0)
nokogiri (1.6.7.2 x86-mingw32)
rack (1.6.4)
rack-protection (1.3.2)
rack-test (0.6.3)
rake (0.9.2.2, 0.9.2)
rdoc (3.9.5)
rspec (2.14.1)
rspec-core (2.14.4)
rspec-expectations (2.14.1)
rspec-mocks (2.14.3)
rubyzip (1.1.7)
selenium-webdriver (2.45.0)
sinatra (1.3.5)
subexec (0.0.4)
tilt (1.3.3)
websocket (1.2.1)
xpath (2.0.0)

@gtbono
Copy link

gtbono commented Apr 22, 2016

I'm having the same issue on a Debian Wheezy and Ubuntu 14.04 installation, both with Ruby 1.9.3 installing Rails 4.2.6, did any of you guys got it working?

@twalpole
Copy link
Member

@gtbono If your problem is your project not installing then in your projects Gemfile specify gem 'mime-types', '< 3.0' , if your problem is building capybara-webkit then thats a different project and you would need to ask over on it.

@teamcapybara teamcapybara locked and limited conversation to collaborators Apr 22, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants