Closed flavorjones closed 8 years ago
+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
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. :)
ok, thank you.
I think it works on my system (Win7 x64, Ruby 2.2.1)
that is so annoying. any timelines/plans to fix that? maybe there are some way/hack to alleviate the problem?
I think Nokogori team should release new version including #1266, if MinGW Ruby 2.2 supporting takes long time.
@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?
In order for me to get it to work, I had to download the following packages from XMLSoft
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
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.
@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.
I wonder what's preventing Nokogiri to be built for Ruby 2.2 on Windows? What's status, what are blockers?
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 https://github.com/sparklemotion/nokogiri/issues/1256#issuecomment-101332895 .
Rails 5 requires Ruby 2.2.2, so we cannot run Rails 5 on Windows without this issue fixing. https://github.com/rails/rails/pull/19753
+1
Any updates on Ruby v2.2 support for Windows?
Same here. Is there anything we can do to help?
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
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?
@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.
This issue should remain open ?
I guess so, there isn't a solution for Ruby 2.2 yet.
So there is no way for windows developers for Ruby 2.2 ? I am using Windows 8
Not that I'm aware of...
I think the only solution for developers to be up to date with Ruby development is if you use Vagrant =)
We are having same issue, is this gonna be fixed soon?
The previous version Ruby 2.1 is working well. But does not support some features Depending on your version of ruby, you may need to install ruby rdoc/ri data:
<= 1.8.6 : unsupported = 1.8.7 : gem install rdoc-data; rdoc-data --install = 1.9.1 : gem install rdoc-data; rdoc-data --install
= 1.9.2 : nothing to do! Yay!
@knu has already mentioned that there are possible fixes in place. Thoughts?
The only blocker is finding the time to build the release, which is a bit time-consuming. I hope to do this in the next day or so.
I can't wait until you release the next build for windows ruby 2.2 - My rails console is crying without it.
For you rails Windows devs keep in mind that sqlite also doesn't yet support Ruby 2.2 but does support 2.1: https://groups.google.com/forum/#!topic/sqlite3-ruby/cNqvONJmocU. So be prepared to get another DB running as well.
jmthomas c:>ruby -v ruby 2.2.2p95 (2015-04-13 revision 50295) [x64-mingw32] c:>irb irb(main):001:0> require 'sqlite3' => true
Any update on potential windows 2.2 build?
@richww If you want to help, you could try this: https://github.com/sparklemotion/nokogiri/pull/1302
+1, I really need this.
when are you gonna release 1.6.7? I really need this fix.
+1, need this as well
You can build your own nokogiri gems for Rubyinstaller x86/x64 on Windows-x64 by using https://github.com/sparklemotion/nokogiri/pull/1302 as long as 1.6.7 isn't released. Install boot2docker for Windows and do this:
git clone https://github.com/larskanis/nokogiri
cd nokogiri
git checkout make-use-of-rake-compiler-dock
bundle
rake gem:windows
It then takes a while to download and build everything, but in the end there should be some gems in the pkg
directory for install.
Please leave a comment, if it works for you!
+1
+1
@larskanis It can't find docker even it was installed and running :(
WARNING: cross compilation not available: No MinGW tools or unknown setup platform?
rake-compiler-dock bash -c "bundle && rake cross native gem MAKE='nice make -jnproc
' RUBY_CC_VERSION=1.9.3:2.0.0:2.1.6:2.2.2"
Get http://127.0.0.1:2375/v1.19/version: dial tcp 127.0.0.1:2375: ConnectEx tcp: No connection could be made because the target machine actively refuse
d it.. Are you trying to connect to a TLS-enabled daemon without TLS?
rake aborted!
RakeCompilerDock::DockerIsNotAvailable: Docker is not available
C:/virvit/2/nokogiri/Rakefile:358:in `block in <top (required)>'
Tasks: TOP => gem:windows
(See full trace by running task with --trace)
Docker is not available. Please download and install boot2docker: https://github.com/boot2docker/windows-installer/releases
Then execute 'boot2docker start' and follow the instuctions
@virvit you must call "boot2docker start"and set the environment variables, that it prints, before calling "rake gem:windows".
Hi larskanis,
I have an error similar to virvit's and my variables are set correctly when I do "boot2docker".
My error :
WARNING: cross compilation not available: No MinGW tools or unknown setup platform?
rake-compiler-dock bash -c "bundle && rake cross native gem MAKE='nice make -j'nproc' RUBY_CC_VERSION=1.9.3:2.0.0:2.1.6:2.2.2"
An error occurred trying to connect : Get https://192.168.59.103:2376/v1.19/version: x509: certificate is valid for 127.0.0.1, 10.0.2.15, not 192.168.103
rake aborted !
RakeCompilerDock::DockerIsNotAvailable: Docker is not available
C:/wwww/2/nokogiri/Rakefile:358:in `block in ' <top
Docker is not available. Please download and install boot2docker: https://github.com/boot2docker/windows-installer/releases
Then execute 'boot2docker start' and follow the instuctions
As far as I understand, the IP is not correct. But I do not know where I can change it. However the instructions of boot2docker ask me to set DOCKER_HOST=tcp://192.168.59.103:2376 If I change 192.168.59.103:2376 by 127.0.0.1:2376, I obtain exactly the same message as virvit.
Do you have any idea of what is happening ?
I've found that you need to put 192.168.59.103 boot2docker into hosts file + set ENV variables. Then it works.
It do not undertand which hosts file you are refering to.
:+1:
windows/system32/drivers/etc/hosts
The commands of larskanis finally worked. I needed to change the require path for nokogiri specification to lib/nokogiri.
However, I am still stuck with rails, getting loofah cannot load such file -- nokogiri.
Thanks to all ^^
deleted my comments as it is quite likely it is a virtual box issue. ;) VERY irritating way to discover a known problem. Got the so's and the gem; gem installed with no issues. Resolved all problems and rails is loading. New problems include bcrypt && sqlite3 (both of which have the same issue i.e. require cross compilation); sqlite3 you can dodge by using different db, bcrypt? looks like a cross-compile will be necessary...
If one of you guys manage to make a build, do you think you could help @flavorjones prepare a release through a pull request (if that even works)? You would have my eternal gratitude ^^,
The only blocker is finding the time to build the release, which is a bit time-consuming. I hope to do this in the next day or so.
14 days ago... Usual thing in open-source but it's sad anyway.
Currently (1.6.6.2) we only cross-compile for 1.9.3, 2.0.0 and 2.1.3.