Displaying 20 results from an estimated 1000 matches similar to: "strange problem:no such file to load -- nokogiri on rails3"
2010 Oct 31
0
Loading xml document using Nokogiri and retrieving CDATA element
This is an extension of my last post (problems with REXML) which has me
looking to Nokogiri again. The reason I am not using Nokogiri is I can not
seem to find a way to get CDATA out of a Nokogiri document.
First, can you tell me if I am loading my document correctly, because when I
call my_document.to_xml, I only get one line back:
(rdb:1) test_file = Nokogiri::XML(mismo_xml_file)
2013 Sep 02
2
Why the string interpolation is not working inside the Nokogiri method `#search` ?
Why the string interpolation is not working inside the Nokogiri method
`#search` ?
require ''nokogiri''
doc = Nokogiri::HTML::Document.parse <<-eotl
<div>
<p>foo</p>
<p>foo</p>
<p>bar</p>
</div>
eotl
doc.class # => Nokogiri::HTML::Document
class Person
attr_accessor :name
end
ram = Person.new
2013 Jun 04
3
Nokogiri::XML methods example
Hi,
I am not able to find out a simple example to find out the how the
method works:
> Nokogiri::XML::EntityReference::new
(http://nokogiri.org/Nokogiri/XML/EntityReference.html#method-c-new)
> Nokogiri::XML::Document#canonicalize
(http://nokogiri.org/Nokogiri/XML/Document.html#method-i-canonicalize)
Thanks
--
Posted via http://www.ruby-forum.com/.
--
You received this message
2009 Nov 11
2
nokogiri: parsing tags
Hello,
I''m trying to use nokogiri gem to parse individual xhtml tags (not the
whole html document) and preform some processing on them.
Heres an example of a string that I want to process:
str = ''<img
src="http://www.canadascapital.gc.ca/data/2/rec_imgs/5005_Pepsi_H1NB.gif"/>
some text<a href="#">test</a> ....''
The following code
2013 Jun 18
2
`require': cannot load such file -- nokogiri (LoadError) in rubyXL
Hi All
Getting the below error when running the source code
My requirement is : I want read / write the excel sheet ( both xls / xlsx )
from Ruby , if you have any other solution also share with me ..
*Source Code :*
*
*
*
bash-3.2$ cat rubyXL.rb
require ''rubyXL''
workbook = RubyXL::Parser.parse("test.xlsx")
workbook = RubyXL::Workbook.new
sheet_Name =
2009 Oct 21
4
XML file using Nokogiri gem
Hello friends,
Can you guys give me some idea about how to Create XML file using
Nokogiri gem.
--
Posted via http://www.ruby-forum.com/.
2013 Jun 29
2
how to remove nokogiri warning message
hi
I always get this message today
WARNING: Nokogiri was built against LibXML version 2.8.0, but has
dynamically loaded 2.9.0
I googled by all solution is for mac, I am use linux(openSUSE 12.3)
any one can help?
thanks in advance
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop
2009 Oct 13
9
Nokogiri: to_s WITHOUT html surrounding's tags?
Hi all
n = Nokogiri::HTML("<h1>H1</h1>")
n.to_s
# => <!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"
\"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body><h1>H1</h1></body></html>
Is there a method that only outputs the stuff I''ve read, and not the
whole valid XHTML stuff?
2011 Feb 20
7
Using Nokogiri to insert a <span> tag into existing text
All,
I''m using Nokogiri to handle the following problem:
I have a piece of HTML, and for certain text nodes, I need to insert
<span> tags into the text of these nodes at a certain place.
What I am doing is finding the place where I want to insert the <span>,
let''s say index X of the text node''s text, and doing the following:
1) Setting the node''s
2011 Dec 05
12
Using nokogiri
HI,
I want to grab some information about university names, and I found
this term called "web scraping"
I search about it in google, and there are tools in ruby.
One of them is nokogiri but I''m a bit confused because it seems that
it only gets information that its already in an html or xml
I found a webpage that have a list of university names as a
<select>
2009 Oct 13
1
loofah 0.3.1 Released
loofah version 0.3.1 has been released!
* <http://loofah.rubyforge.org>
* <http://rubyforge.org/projects/loofah>
* <http://github.com/flavorjones/loofah>
Loofah is an HTML sanitizer. It will always fix broken markup, but
can also sanitize unsafe tags in a few different ways, and transform
the markup for storage or display.
It''s built on top of Nokogiri and libxml2, so
2003 Nov 04
2
4-STABLE b0rked in share/locale/zh_CN.GBK
Murray,
Your commits earlier this evening to zh_CN.GB18030 fixed that -STABLE
breakage, but zh_CN.GBK appears still to be missing, which causes
'make installworld' to fail. Can you please fix this as well?
install -m 644 -o root -g wheel uk_UA.KOI8-U.out /usr/share/locale/uk_UA.KOI8-U/LC_CTYPE
install -m 644 -o root -g wheel zh_CN.eucCN.out /usr/share/locale/zh_CN.eucCN/LC_CTYPE
2009 Jan 24
4
nokogiri selector help
hiya,
i want the selector that would return a <tr> of a table if any td
contains some text, so i can use it in click_link_within
e.g. When I click the "show" link within the row containing
"user at example.com"
When /^I click the "(.+)" link within the row containing "(.+)"$/ do |
link, text|
selector = ??
click_link_within selector, link
2011 Oct 10
1
current directory setting at startup?
Platform X86, Ubuntu 11.04 32-bit, wine 1.3.15
Hello,
When I try to launch a game in wine, the game requires the directory where the .exe file is located to be the current directory at startup time. If I start the game by clicking on it in Nautilus, this seems to be handled automatically. But when I try to start the game by invoking it from an icon defined in Main Menu, it stops because it can
2014 May 18
0
Problem on reading a web page (no matter using Net:HTTP or nokogiri)
Currently I am trying to get some reference data from
bet.hkjc.com/football/index.aspx?lang=ch&pageno=1
However, I could not read the content (page source) properly even though
I used force_encoding or String.encode! after getting the response.body
Same coding is working fine for other site, but just this site has some
tricky things made ruby cannot read the page content correctly.
Do
2011 Apr 04
0
issue installing gem Capybara on Debian5 w ruby 1.9.2 ( Rails 3.0.5) => installing native extension
On this server I already installed it in the gemsets for Ruby 1.8.7
and Rails 2.3.11 without any problem ...
but trying (many times .. ) to install in Ruby 1.9.2 (Rails 3.0.5)
raises an error ... It''s not related to the gem itself as the gem
doesn(t build any native extension .. but to one dependency...
I don''t know where to start looking for ...
here is the log message :
2010 Nov 20
4
How to get rspec running?
I''m quite new to RoR and recently worked through Michael Hartl''s Rail
Tutorial. Now that I had started my first own project and began with the
implementation of a first model and it''s controller. The tests I wanted
to implement just after that. However, I run into some error messages
when I want to start rspec (see below).
The Gemfile is the same as in the Tutorial
2009 Sep 17
1
Load Error Using Mechanize Gem
Hi,
I''m getting a "Could not open any of [xml2, xslt, exslt] (LoadError)" error when trying to run a simple Ruby program taken from the EXAMPLES.rdoc file of the Mechanize gem.
The error is in this line of the Nokogiri module of libxml.rb: ffi_lib ''xml2'', ''xslt'', ''exslt''
Not sure if there are missing gems, and if so,
2011 Nov 27
2
problem scraping using nokogiri - getting wrong characters
Hi all,
I am scraping a table off of another site and inserting it onto my
site. you can see an example on the initial page at: http://mthosts.heroku.com.
I''m referring to the green box with the snowbird weather and snowfall
information.
this box has been scraped off of the snowbird site at:
http://www.snowbird.com/ski_board/snowreport.php
The problem is that on the snowbird site it
2012 Sep 04
0
get only little part of html with htmlParse
Here is my code.
there are three method to get text to be parded by htmlParse function.
1.file on mycomputer
options(encoding="gbk")
library(XML)
xmltext1 <- htmlParse("/home/tiger/Desktop/27174.htm" )
#/home/tiger/Desktop/27174.htm is the file of http://www.jb51.net/article/27174.htm downloaded on my computer.
2.url
options(encoding="gbk")