I just want to install Nokogiri for Ruby on my Windows XP. The process is apparently so obfuscated and divergent that I have about 50 different tabs and windows open trying to install Libxml, devKit, other versions of what I already have, and so on. Does anybody know the secrets of how to install Nokogiri for Ruby on Windows?
Configuration
On my Windows XP, Version 2002 SP3, I have the following directories:
List item
C:\RailsInstaller\Ruby1.9.3
C:\Ruby200
C:\libxml2-2.9.1
C:\DevKit
C:\Python27
C:\Python33
Both ruby's are installed, I have no idea about the DevKit or the libxml. The libxml2-2.9.1 is some kind of python source, so I thought it would be a great idea to install python, which I know nothing about, and try to compile it; hence the two python folders.
I have
libxml-ruby 2.6.0 [rdoc] [www] - depends on hanna_guado.
Ruby Bindings for LibXML2
libxslt-ruby 1.1.0 [rdoc] [www] - depends on libxml-ruby.
Ruby libxslt bindings
installed on ruby, but when I go to do a "gem install nokogiri" it still gives me a
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
C:/Ruby200/bin/ruby.exe extconf.rb checking for libxml/parser.h... no
----- libxml2 is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with
installing dependencies.
I'd strongly recommend looking into the Bitnami one-click Ruby installers. They might work with XP.
Otherwise I'd try running a VM with a small Linux guest system. It would be a lot less pain.
Windows isn't exactly friendly to open-source languages and yours is pretty old. Finding the individual components installed is hard enough without a full installer on a current version of the OS, on an old one it's harder and becomes like herding cats.
OS languages fit Linux nicely, and work pretty well with Mac OS because it's *nix based.
Those are the things I'd try instead of what you are doing.
http://bitnami.com/
Related
I'm trying to determine the fewest packages that I need to install before installing ruby from source. I've dug through ruby source a little and I figured it might be faster to ask here.
Does anyone have a list or know how to dig up this information?
It's all in the READMEs...
For Unix-like platforms including Mac OS, no extra requirement per say besides a C compiler (C89 is the official target, even for Ruby 2.0.0).
For Windows:
Windows XP or later.
Visual C++ 6.0 or later.
Commands:
nmake
cl
lib
dumpbin
This can be surprising, but libraries like libyaml or zlib are not required. Ruby will use its bundled libyaml if need be. If zlib is not installed, then Ruby will work, but require 'zlib' external library will not work.
RTFM for more details.
According to its gentoo ebuild: berkdb, gdbm, ssl socks5, tk, ncurses, readline, yaml, libffi, zlib, libedit.
I'm trying to understand how to install visualruby on a MAC. I work in ubuntu, and I've developed install instructions for Ubuntu and Windows, but I don't know the corresponding instructions for the MAC:
http://visualruby.net/Download
I know that you need to install the Glade Interface Designer. This should install the graphics toolkit, gtk2 as well. Visualruby needs gtk2. After that you can install visualruby:
gem install visualruby
My friend told me that it needs to be run in the X11 terminal. I don't understand any of this. I'd like to develop step-by-step instructions for installing it on the MAC that includes the correct version of Glade/Gtk2. I know that visualruby requires Glade version 2.6 thru 2.8. The latest version of Glade uses Gtk3 which isn't good.
EDIT: Visualruby will also require "gtksourceview2" installed (perhaps via homebrew?)
Step-by-step instructions would be greatly appreciated.
I'm the friend referred to above.
I had the best success with QuartzX11.
I installed glade, gtk+ and gtksourceview via homebrew but perhaps that's not the best way.
I've been working with Haskell lately, and installed gtk2hs (a gtk library for Haskell) a few days ago using MacPorts. For some reason, MacPorts saw fit to install GHC 6.10 over my previous GHC 6.12 install, but I didn't really care.
Now I find myself desiring the improved parallelism support of the latest Haskell Platform, so I installed it today, and it installed successfully - except that when I type in "ghc -v" in Terminal, I am informed that I have GHC 6.10 still.
I have tried using uninstall-hs, and it informs me that I have three Haskells on my system: versions 6.12, 6.12.3, and 7.04. I'm not sure how that 6.12.3 showed up, and what happened to the 6.10? Most importantly, how can I start running version 7.04? Thanks in advance for your help!
You should completely purge your MacPorts install of GHC and your current Platform installation and install the Haskell Platform directly with the OS X installer. After that, future versions of the Haskell Platform can be upgraded to cleanly simply by installing them.
The following command should remove your MacPorts GHC:
$ sudo port uninstall --follow-dependents ghc
You might want to execute something like find /usr /opt/local -name '*ghc*' after uninstalling everything to check that there's no remaining traces.
To really clear out the old install, you've got to go in and delete things by hand.
This will be very useful: Everywhere that GHC/Haskell Platform installs
Might want to look here also: http://www.vex.net/~trebla/haskell/sicp.xhtml
Starting with Snow Leopard (OS X v10.6) Apple bundles 64-bit ruby by default. Unfortunately, there is no 64-bit Tk bundled, so the following ruby code will fail:
require 'tk'
Is it some easy way to enable Tk for Ruby in Snow Leopard and higher? Like installing 32-bit ruby or whatever. I have tried to recompile Ruby with Tk support but it seems not that easy - tutorials found in google refers to some options in Ruby's ./configure script that don't exists in actual Rby code downloaded from official site :(. I will be glad for any hints - i have a Ruby app with Tk GUI and need to enable my users to use it :)
Tk builds fine in 64-bit mode on OSX, but only if you've got sources from the 8.6 series«ZIP»«TGZ» (still in beta for various reasons, but quite usable). You'll want to ensure you configure with --enable-aqua --enable-64bit of course, but I assume that's pretty much obvious.
(Alas, I can't say how to then integrate the build of Tk with your Ruby installation, though there is some documentation online that seems to be somewhat relevant. I emphasize that I've only googled for it though; on this I don't speak from experience.)
Where was a great improvement over Tk documentation recently. Not they has complete instructions on how to enable Tk for Ruby on OSX 10.6+. This requires ActiveTcl 8.5+ binary distribution and compiling ruby from source. The command i used on OSX 10.7 with XCode 4.2 to compile ruby and replace stock ruby installation (dangerous!):
./configure --prefix=/usr --with-arch=x86_64,i386 --enable-pthread --enable-shared --with-gcc=clang
make
sudo make install
I've installed Snow Leopard over Leopard with macports and rubygems already installed. This was regular install, not a clean "archive and erase" install.
It turned out, that SL has 64bit versions of shared libraries and many development utilities do not work. For example, "port" command complains on incompatible tcl library, or ruby cannot load 32bit bundles.
What is the easiest way to solve these issues?
I was googling for the answer for about 4 days already and finally came up with a step-by-step manual on fixing macports and rubygems:
http://oleganza.tumblr.com/post/127709563/snow-leopard-with-legacy-macports-and-rubygems
In short: for proper use of macports and rubygems you would have to:
Install trunk macports from source (or use 1.8 version when it is released)
Add alias for "gem install with 64bit architecture"
Reinstall all ports (not automated yet)
Reinstall all gems (100% automated)
This would take 10-20 minutes of your personal time and another 20
minutes of machine time in order to build and install stuff.
I would be glad to get more answers in order to fix other issues we might meet later.
Since it's really hard to force MacPorts to recompile all ports (in the proper order), I just did:
mv /opt /opt.old
Then install MacPorts 1.8, and bring back any configs you need from /opt.old/local/etc/
Otherwise, you'll get assorted errors complaining about your existing libs' architecture, (e.g. "Command output: ld: warning: in /opt/local/lib/libz.dylib, file is not of required architecture").
This isn't as clean as 'port uninstall installed' but works fast and good enough for me.
Richard Dooling's MacPorts On Snow Leopard explains that to fix the older install of MacPorts, which is broken after the upgrade to Snow Leopard, you should just download and install the new compatible version over the old one and then simply follow the migration instructions - which also say the same.