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

Support Ruby 2.2 on Windows #1256

Closed
flavorjones opened this issue Mar 2, 2015 · 210 comments
Closed

Support Ruby 2.2 on Windows #1256

flavorjones opened this issue Mar 2, 2015 · 210 comments
Milestone

Comments

@flavorjones
Copy link
Member

@flavorjones flavorjones commented Mar 2, 2015

Currently (1.6.6.2) we only cross-compile for 1.9.3, 2.0.0 and 2.1.3.

@flavorjones flavorjones modified the milestone: 1.6.7 Mar 2, 2015
@belgoros
Copy link

@belgoros belgoros commented Mar 17, 2015

+1, have the same problem.
I have a load error with the following nokogiri versions installed:

gem list nokogiri
nokogiri (1.6.6.2 x64-mingw32, 1.6.5 x64-mingw32)

Tried to load it irb:

C:\Users\XXXXXX\Documents\projects\ruby_drafts\lib>irb
irb(main):001:0> require 'nokogiri'
LoadError: cannot load such file -- nokogiri/nokogiri
        from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2-x64-mingw32/lib/nokogiri.rb:29:in `rescue
 in <top (required)>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/nokogiri-1.6.6.2-x64-mingw32/lib/nokogiri.rb:25:in `<top (
required)>'
        from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `require'
        from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
        from C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:39:in `require'
        from (irb):1
        from C:/Ruby22-x64/bin/irb:11:in `<main>'
irb(main):002:0>

OS: Windows 7 Pro
Ruby: ruby 2.2.1p85 (2015-02-26 revision 49769) [x64-mingw32]

Any idea ? Thank you

@flavorjones
Copy link
Member Author

@flavorjones flavorjones commented Mar 17, 2015

Hello,

Thanks for asking this question. To be clear, we do not yet support window 2.2, as mentioned on the mailing list and in this issue. "+1"s are not necessary. :)

@belgoros
Copy link

@belgoros belgoros commented Mar 17, 2015

ok, thank you.

@richpeck
Copy link

@richpeck richpeck commented Mar 22, 2015

untitled

I think it works on my system (Win7 x64, Ruby 2.2.1)

@altmind
Copy link

@altmind altmind commented Mar 27, 2015

that is so annoying. any timelines/plans to fix that? maybe there are some way/hack to alleviate the problem?

@marutosi
Copy link
Contributor

@marutosi marutosi commented Mar 27, 2015

I think Nokogori team should release new version including #1266,
if MinGW Ruby 2.2 supporting takes long time.

@guppygames
Copy link

@guppygames guppygames commented Apr 6, 2015

@richpeck: I tried your suggestion to compile nokogiri, but I got error iconv.h not found in mkmf.log, did exact setup as your example command. Any thoughts?

@billmurrin
Copy link

@billmurrin billmurrin commented Apr 13, 2015

In order for me to get it to work, I had to download the following packages from XMLSoft

  • iconv-1.9.2.win32.zip
  • libxml2-2.7.8.win32.zip
  • libxslt-1.1.26.win32.zip

I extracted the packages and copied the binaries into my Ruby bin directory (So I didn't have to edit my PATH)

After that, I ran the following to install the nokogiri gem successfully

gem install nokogiri -- --use-system-libraries --with-iconv-config=C:/Ruby22/bin --with-xml2-config=C:/Ruby22/bin --with-xslt-config=C:/Ruby22/bin

Lastly, I had to edit the file "\Ruby22\lib\ruby\gems\2.2.0\specifications\nokogiri-1.6.6.2-x86-mingw32.gemspec" and change:

  s.require_paths = ["lib/"]

to

  s.require_paths = ["lib/nokogiri"]

I am new to Rails and this isn't going quite as "easy" as the tutorials, but I guess I have been through worse... :)

UPDATE: This didn't quite work as it seemed that nearly every library was generating an error after I tried to start

rails server
@ailjushkin
Copy link

@ailjushkin ailjushkin commented Apr 29, 2015

Windows brings quite an installation hell dealing with ported linux tools... Concurrency is bad thing sometimes, good instruments being developed within one environment become non-maintainable when ported to another one... Thank you for all your work, guys,

I'm also waiting for updates by this problem. Thanks.

@amnonkhen
Copy link

@amnonkhen amnonkhen commented May 4, 2015

@billmurrin Thanks for the detailed instructions.
I still cannot get nokogiri to run on Windows with Ruby 2.2 (I tried 2.2.2).
When you say

... copied the binaries into my Ruby bin directory ...

do you mean the dll and exe files?

Could you get a simple Ruby file with the following require statement to work?

require 'nokogiri'

Update: I got nokogiri working with Ruby 2.1.6.

@davispuh
Copy link

@davispuh davispuh commented May 12, 2015

I wonder what's preventing Nokogiri to be built for Ruby 2.2 on Windows? What's status, what are blockers?

@amnonkhen
Copy link

@amnonkhen amnonkhen commented May 13, 2015

It is indeed strange.
I downgraded to Ruby 2.1 and it worked.
I could live with this downgrade, since all I needed was a scraping task
with Mechanize & Nokogiri.
Amnon

On Tue, May 12, 2015 at 7:10 PM, Dāvis notifications@github.com wrote:

I wonder what's preventing Nokogiri to be built for Ruby 2.2 on Windows?
What's status, what are blockers?


Reply to this email directly or view it on GitHub
#1256 (comment)
.

@marutosi
Copy link
Contributor

@marutosi marutosi commented May 13, 2015

Rails 5 requires Ruby 2.2.2, so we cannot run Rails 5 on Windows without this issue fixing.
rails/rails#19753

@toncid
Copy link

@toncid toncid commented May 29, 2015

+1

Any updates on Ruby v2.2 support for Windows?

@ccoenen
Copy link

@ccoenen ccoenen commented May 31, 2015

Same here. Is there anything we can do to help?

@knu
Copy link
Member

@knu knu commented Jun 2, 2015

Considering a cross-build issue has been addressed on the Ruby side and there's a PR for the build environment that works, I think all we need to do is release a new version. /cc @flavorjones

@adrianwtx90
Copy link

@adrianwtx90 adrianwtx90 commented Jun 2, 2015

I have the same error and just wanting to pick up Ruby on Rails.

Would it be better for me to remove everything and get 2.0.0 instead?

@ccoenen
Copy link

@ccoenen ccoenen commented Jun 2, 2015

@adrianwtx90 for now, ruby 2.1 or ruby 2.0 would solve your problem. Other people have reported that nokogiri worked well on windows with ruby 2.1.

If you have the choice of 32 bit vs. 64 bit, i'd recommend 32 bit on windows. There are some gems with problems with 64 bit builds (net-ssh, for example; nokogiri in earlier versions), so you'd likely just run into the next problem.

@Startouf
Copy link

@Startouf Startouf commented Jun 7, 2015

This issue should remain open ?

@ailjushkin
Copy link

@ailjushkin ailjushkin commented Oct 28, 2015

Are you sure that it is nokogiri issue?

ср, 28 окт. 2015, 13:44, Toshi MARUYAMA notifications@github.com:

What progress?
Posts of Redmine cannot run on Windows Ruby 2.2 are very annoying.
http://www.redmine.org/boards/2/topics/48548


Reply to this email directly or view it on GitHub
#1256 (comment)
.

@flavorjones
Copy link
Member Author

@flavorjones flavorjones commented Oct 29, 2015

@marutosi Thanks for your patience. I understand you'd like to get this fixed. Have you tried the release candidates? Do they work for you?

@marutosi
Copy link
Contributor

@marutosi marutosi commented Oct 29, 2015

Are you sure that it is nokogiri issue?

http://www.redmine.org/issues/19419#note-5
rubygems/bundler#3484

@marutosi
Copy link
Contributor

@marutosi marutosi commented Oct 29, 2015

I understand you'd like to get this fixed.

I am Redmine contributor.

Have you tried the release candidates?

I don't have Windows environment I can use now.

@marutosi
Copy link
Contributor

@marutosi marutosi commented Oct 29, 2015

@marutosi
Copy link
Contributor

@marutosi marutosi commented Oct 29, 2015

Rails5 uses "gem 'nokogiri', '>= 1.6.7.rc3'" for Windows.
rails/rails@bbfd176
rails/rails#21602

@marutosi
Copy link
Contributor

@marutosi marutosi commented Oct 29, 2015

I have requested to Rails4 uses "gem 'nokogiri', '>= 1.6.7.rc3'" for Windows.
rails/rails#21602 (comment)

@rafaelfranca
Copy link
Contributor

@rafaelfranca rafaelfranca commented Oct 29, 2015

@marutosi Rails is only using the releases candidates in its own test suite. The applications are still using the last released version that it is 1.6.6.

@marutosi
Copy link
Contributor

@marutosi marutosi commented Oct 29, 2015

Have you tried the release candidates? Do they work for you?

Appveyor tests passes on Windows Ruby 2.2.
https://ci.appveyor.com/project/marutosi/redmine/build/1.0.4

@marutosi
Copy link
Contributor

@marutosi marutosi commented Oct 29, 2015

@flavorjones
Copy link
Member Author

@flavorjones flavorjones commented Oct 29, 2015

Great, thank you.
On Oct 29, 2015 4:51 AM, "Toshi MARUYAMA" notifications@github.com wrote:

This is proof revision.
marutosi/redmine@76d887d
https://github.com/marutosi/redmine/commit/76d887d9a8adce96514e065fcae2a0dbc154eb8a


Reply to this email directly or view it on GitHub
#1256 (comment)
.

@martinsefcik
Copy link

@martinsefcik martinsefcik commented Nov 17, 2015

Is there any blocker for 1.6.7 ?

@flavorjones
Copy link
Member Author

@flavorjones flavorjones commented Nov 17, 2015

@martinsefcik Yes, we still have some items to take care of before shipping a final. Are you offering assistance?

@martinsefcik
Copy link

@martinsefcik martinsefcik commented Nov 17, 2015

What kind of items ?
But I'm not sure I can help. I'm still relatively new to Ruby.

@flavorjones
Copy link
Member Author

@flavorjones flavorjones commented Nov 22, 2015

1.6.7.rc4 just shipped, which I'd like someone to try and confirm that it works for them. Unless something comes up, this will ship as 1.6.7 final in the next few days.

@DSAMPAT
Copy link

@DSAMPAT DSAMPAT commented Nov 23, 2015

All good. No issues. Unless you want us to test something specific.

nokogiri (1.6.7.rc4-x86-mingw32)
  mini_portile2 (~> 2.0.0.rc2)
@fera2k
Copy link

@fera2k fera2k commented Nov 23, 2015

I've tested here on Windows 10 and CentOS Linux, both using Ruby 2.2.3.
No failures so far! Good job!

@flavorjones
Copy link
Member Author

@flavorjones flavorjones commented Nov 29, 2015

OK, let's ship this thing. No compelling blockers having been raised, I'm going to cut 1.6.7 today.

Thanks, everybody, for your patience and help.

Will update this ticket when I ship it.

@flavorjones
Copy link
Member Author

@flavorjones flavorjones commented Nov 30, 2015

v1.6.7 has been shipped.

@DSAMPAT
Copy link

@DSAMPAT DSAMPAT commented Nov 30, 2015

All good. No issues.

nokogiri (1.6.7-x86-mingw32)
  mini_portile2 (~> 2.0.0.rc2)
jbbarth pushed a commit to redmine/redmine that referenced this issue Nov 30, 2015
Nokogiri 1.6.7 has released.
sparklemotion/nokogiri#1256 (comment)

git-svn-id: http://svn.redmine.org/redmine/trunk@14904 e93f8b46-1217-0410-a6f0-8f06a7374b81
@ccoenen
Copy link

@ccoenen ccoenen commented Nov 30, 2015

🍀 :-D Thanks!

@toncid
Copy link

@toncid toncid commented Nov 30, 2015

Thanks! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.