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

Fail install on Ruby 2.3 for Windows #1456

Closed
Sega100500 opened this issue Apr 5, 2016 · 17 comments
Closed

Fail install on Ruby 2.3 for Windows #1456

Sega100500 opened this issue Apr 5, 2016 · 17 comments

Comments

@Sega100500
Copy link

gem install rails
on nokogiri install fail with error: 'nokogiri requires Ruby version < 2.3, >= 1.9.2.'

gem install nokogiri -v '1.6.5'
solve problem of installation
but
gem update
again fails

@belgoros
Copy link

belgoros commented Apr 6, 2016

Not sure but it seems that nokogiri and 2.3 is not fully supported yet by Rails on Windows.
Any way, I tried to install the latest version on Windows 64-bits and ruby 2.3:

gem install nokogiri -v 1.6.8.rc3 -N

and it was installed successfully:

Fetching: pkg-config-1.1.7.gem (100%)
Successfully installed pkg-config-1.1.7
Fetching: mini_portile2-2.1.0.gem (100%)
Successfully installed mini_portile2-2.1.0
Fetching: nokogiri-1.6.8.rc3-x64-mingw32.gem (100%)
Nokogiri is built with the packaged libraries: libxml2-2.9.3, libxslt-1.1.28, zlib-1.2.8, libiconv-1.14.
Successfully installed nokogiri-1.6.8.rc3-x64-mingw32
3 gems installed

But when trying to install rails it failed:

gem install rails -N
ERROR:  Error installing rails:
        nokogiri requires Ruby version < 2.3, >= 1.9.2.

@Sega100500
Copy link
Author

@javix

Not sure but it seems that 2.3 is not supported yet on Windows.

Already supported... after long time wait
http://rubyinstaller.org/downloads/

@belgoros
Copy link

belgoros commented Apr 6, 2016

@Sega100500 I meant

that nokogiri and 2.3 is not fully supported

i.e. Nokogiri with Ruby 2.3. You can even try to install rspec-rails on Ruby 2.3 to see the same error of nokogiri Ruby version.

@Sega100500
Copy link
Author

@javix
Ruby 2.3 + nokogiri
On Linux it work, on windows - no

@larskanis
Copy link
Member

larskanis commented Apr 6, 2016

Ruby-2.3 cross build targeting Windows RubyInstaller was added in this commit . Please try the latest pre-release:

gem inst nokogiri --pre

or per Gemfile:

gem 'nokogiri', '1.6.8.rc3'

The installation from source should work as well (with nokogiri-1.6.7):

gem inst nokogiri --platform ruby

@hut8
Copy link

hut8 commented Apr 6, 2016

@larskanis Thanks very much 👍 Perfect timing.

@Sega100500
Copy link
Author

@larskanis
Fine. But how about gem update?
Install nokogiri of specific version - is not problem. Problem is when nokogiri update it fail installation.

@okeyparking
Copy link

A quick workaround is the following (ruby 2.3 win64):

gem install nokogiri -v '1.6.6.4'
gem install rails 
gem install nokogiri -v '1.6.8.rc3'

After that explictly include
gem 'nokogiri', '>=1.6.8.rc3'
in gemfile

gem update works without error
bundle install and bundle update works too

@Sega100500
Copy link
Author

@okeyparking
It work! Many thanks!

@flavorjones
Copy link
Member

As mentioned above, windows is supported in the prerelease and will be in 1.6.8 final.

@Zbromination
Copy link

@okeyparking

I'm totally new to this, could you tell me how to:

After that explictly include
gem 'nokogiri', '>=1.6.8.rc3'
in gemfile

@zuckerlinh
Copy link

Same question as Zbromination, Plz explain

After that explictly include
gem 'nokogiri', '>=1.6.8.rc3'
in gemfile

@belgoros
Copy link

belgoros commented Apr 22, 2016

@okeyparking, @zuckerlinh: Hey, guys, just add gem 'nokogiri', '>=1.6.8.rc3 in your Rails application Gemfile (outside of the development, test, production group) and run bundle update nokogiri.

@spa46
Copy link

spa46 commented Apr 24, 2016

Yes. It works. Thanks. :)

@ivangabriele
Copy link

Thanks @larskanis & @javix :)

@BurstNova
Copy link

@javix @okeyparking @zuckerlinh I'm also totally new to this, and I have to ask how do you open my Rails application Gemfile and add gem 'nokogiri', '>=1.6.8.rc3 in? That's the only thing holding me off right now

@belgoros
Copy link

@BurstNova it would be better not to polute the issue tracker with such kind of questions, try Stackoverflow please.
You can open Gemfile as no matter which file in your file system with your preferred text editor.

@sparklemotion sparklemotion locked and limited conversation to collaborators Apr 27, 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