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

@Sega100500 Sega100500 commented Apr 5, 2016

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 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

@Sega100500 Sega100500 commented Apr 6, 2016

@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 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

@Sega100500 Sega100500 commented Apr 6, 2016

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

@larskanis
Copy link
Member

@larskanis 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 hut8 commented Apr 6, 2016

@larskanis Thanks very much 👍 Perfect timing.

@Sega100500
Copy link
Author

@Sega100500 Sega100500 commented Apr 7, 2016

@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

@okeyparking okeyparking commented Apr 8, 2016

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

@Sega100500 Sega100500 commented Apr 8, 2016

@okeyparking
It work! Many thanks!

@flavorjones
Copy link
Member

@flavorjones flavorjones commented Apr 9, 2016

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

@flavorjones flavorjones closed this Apr 9, 2016
@Zbromination
Copy link

@Zbromination Zbromination commented Apr 21, 2016

@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

@zuckerlinh zuckerlinh commented Apr 22, 2016

Same question as Zbromination, Plz explain

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

@belgoros
Copy link

@belgoros 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 spa46 commented Apr 24, 2016

Yes. It works. Thanks. :)

@ivangabriele
Copy link

@ivangabriele ivangabriele commented Apr 24, 2016

Thanks @larskanis & @javix :)

@BurstNova
Copy link

@BurstNova BurstNova commented Apr 27, 2016

@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

@belgoros belgoros commented Apr 27, 2016

@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.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.