#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2006
    Location
    Newcastle, Australia
    Posts
    68
    Rep Power
    9

    Nokogiri on XP - NameError


    Hi

    I have just instaled Ruby 1.9.2 using the ruby installer and the devkit version 4.5. All my gems are installing fine except nokogiri which I cannot get to go. This is an example of its error.

    Code:
    C:\Devkit>ruby -rubygems -e "require 'nokogiri'; puts nokogiri.new('**Hello RubyInstaller**').to_html" -e:1:in `<main>': undefined local variable or method `nokogiri' for main:Object (NameError)
    I have tried and install with all various options but I cannot get it to go. Such as.

    Code:
    C:\Devkit>gem install nokogiri -- --platform=ruby --with-xslt-include --with-xml2-include Temporarily enhancing PATH to include DevKit... Successfully installed nokogiri-1.4.3.1-x86-mingw32 1 gem installed Installing ri documentation for nokogiri-1.4.3.1-x86-mingw32... Installing RDoc documentation for nokogiri-1.4.3.1-x86-mingw32...
    Has anyone got it to work, I will change Ruby versions to get it to work. If you have got it to work then please let me know.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2006
    Location
    Newcastle, Australia
    Posts
    68
    Rep Power
    9
    Still not working. I made sure no versions existed removed devkit. restarted done a full clean install of nokogiri and dependencies. But still name error.

    Code:
    C:\Ruby192\bin\ruby.exe -e STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift) "C:/Documents and Settings/Family/RubymineProjects/untitled/Test" C:/Documents and Settings/Family/RubymineProjects/untitled/Test:5:in `<top (required)>': undefined local variable or method `nokogiri' for main:Object (NameError) from -e:1:in `load' from -e:1:in `<main>' Process finished with exit code 1
    Really not sure where this is not working. If you have it working what Ruby version do you have?
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2006
    Location
    Newcastle, Australia
    Posts
    68
    Rep Power
    9
    This is what my log file says
    Code:
    package configuration for libxslt is not found "gcc -o conftest -IC:/Ruby192/include/ruby-1.9.1/i386-mingw32 -IC:/Ruby192/include/ruby-1.9.1/ruby/backward -IC:/Ruby192/include/ruby-1.9.1 -I. -I/opt/local/include/libxml2 -I/usr/local/include/libxml2 -IC:/Ruby192/include/libxml2 -I/opt/local/include -I/usr/local/include -IC:/Ruby192/include -I/usr/include -I/usr/include/libxml2 -O3 -g -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -DXP_WIN -DXP_WIN32 -DUSE_INCLUDED_VASPRINTF -O3 -Wall -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline conftest.c -L. -LC:/Ruby192/lib -L/opt/local/lib -L/usr/local/lib -LC:/Ruby192/lib -L/usr/lib -L. -lmsvcrt-ruby191-static -lshell32 -lws2_32 " checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include <winsock2.h> 4: #include <windows.h> 5: int main() {return 0;} /* end */

IMN logo majestic logo threadwatch logo seochat tools logo