Can I use nokogiri with ActiveScriptRuby (mswin)?

21 views
Skip to first unread message

komuro_...@comsq.com

unread,
Nov 8, 2017, 1:39:49 PM11/8/17
to nokogiri-talk
I am using ActiveScript Ruby on Windows 8.1 (x64).

  Ruby-2.4.0 (x64-mswin64_100)

I'd like to use nokogiri, but when I tried to install it, I got an error.
Has anyone solved it?

The following is the execution result.
ここにコードを入力...>gem list --remote nokogiri
 nokogiri (1.8.1 ruby java x64-mingw32 x86-mingw32, 1.6.1 x86-mswin32-60, 1.4.4.1 x86-mswin32)

>gem install -l nokogiri-1.6.1-x86-mswin32-60.gem
 Successfully installed nokogiri-1.6.1-x86-mswin32-60
 Parsing documentation for nokogiri-1.6.1-x86-mswin32-60
 Done installing documentation for nokogiri after 3 seconds
 1 gem installed

>ruby -e "require 'nokogiri'"
 C:/Program Files/Ruby-2.4-x64/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- nokogiri/2.4/nokogiri (LoadError)
   from C:/Program Files/Ruby-2.4-x64/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
   from C:/Program Files/Ruby-2.4-x64/lib/ruby/gems/2.4.0/gems/nokogiri-1.6.1-x86-mswin32-60/lib/nokogiri/nokogiri.rb:1:in `<top (required)>'
   from C:/Program Files/Ruby-2.4-x64/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
   from C:/Program Files/Ruby-2.4-x64/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
   from C:/Program Files/Ruby-2.4-x64/lib/ruby/gems/2.4.0/gems/nokogiri-1.6.1-x86-mswin32-60/lib/nokogiri.rb:28:in `<top (required)>'
   from C:/Program Files/Ruby-2.4-x64/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:133:in `require'
   from C:/Program Files/Ruby-2.4-x64/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:133:in `rescue in require'
   from C:/Program Files/Ruby-2.4-x64/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:40:in `require'
   from -e:1:in `<main>'


Also, looking at rubygems.org, since 1.6.1 (December 14, 2013), the mswin version has not been released.
Will not mswin version be released in the future?



Takeshi
Message has been deleted

Lars Kanis

unread,
Nov 8, 2017, 3:29:02 PM11/8/17
to nokogi...@googlegroups.com
On Nov 8, 2017 7:39 PM, <komuro_...@comsq.com> wrote:
I am using ActiveScript Ruby on Windows 8.1 (x64).

  Ruby-2.4.0 (x64-mswin64_100)


Also, looking at rubygems.org, since 1.6.1 (December 14, 2013), the mswin version has not been released.
Will not mswin version be released in the future?

You're installing a 32 bit version of nokogiri on a 64bit ruby version. This doesn't work, but unfortunately there is no simple solution anyway.

MSVC versions of ruby (x64-mswin64, x86-mswin) are generally not well supported by the ruby community. The most used ruby package is https://rubyinstaller.org , which is officially supported by nokogiri. It is however based on MINGW (x64-mingw32, x86-mingw32). The mswin versions of the nokogiri gem are for historical reasons, only.

Although MSVC and MINGW are mostly binary compatible, the ruby core DLLs (x64-msvcrt-ruby24.dll) have different names. Precompiled gems will therefore not work (at least not out of the box).

Alternatively it's possible to install nokogiri from source gem, but this will also not work out of the box, but could become an longer advantage.

I wonder, if it's possible to built a MINGW version of ActiveRuby? Possibly this could be an add-on to RubyInstaller.

--
Regards,
Lars

komuro_...@comsq.com

unread,
Nov 8, 2017, 7:57:30 PM11/8/17
to nokogiri-talk
Hi Lars.

Thanks for your help!
It was good to know the current situation.

Takeshi



2017年11月9日木曜日 5時29分02秒 UTC+9 Lars Kanis:
Reply all
Reply to author
Forward
0 new messages