nokogiri Questions

3

Solved

I am building a linux docker image on an M1 mac (FROM ruby:3.0.2-alpine3.12 if it matters). When I attempt to perform a bundle exec in my container, ruby complains that it is unable to load nokogir...
Glossy asked 2/2, 2022 at 22:54

5

Solved

I've faced with a problem how to find first level children from the current element ? For example i have html : <table> <tr>abc</tr> <tr>def</tr> <table> ...
Spatula asked 27/10, 2011 at 18:35

4

Solved

I could use some help here. I'm setting up a new 2020 Macbook Pro M1. I've completed all the regular steps to install ruby/rails on a Mac, however I'm unable to complete rails new. Upon hitting the...
Lowlife asked 2/11, 2021 at 8:13

5

Solved

I encountered this issue when I run bundle install with Ruby version 2.4.4 and macOS Mojave: Fetching nokogiri 1.8.5 Installing nokogiri 1.8.5 with native extensions Gem::Ext::BuildError: ERROR: F...
Bandeau asked 20/2, 2019 at 12:38

7

I've tried using the Sanitize gem to clean a string which contains the HTML of a website. It only removed the <script> tags, not the JavaScript inside the script tags. What can I use to rem...
Duplicate asked 28/11, 2011 at 5:18

2

Solved

I have a Rails application that uses delayed_job in a reporting feature to run some very large reports. One of these generates a massive XML file and it can take literally days in the bad, old way ...
Shaw asked 9/2, 2011 at 1:52

9

Solved

I'm having troubles installing Nokogiri (1.6.8.1) on Mac OS Sierra 10.12. I tried using brew install libxml2 libxslt and then referencing the install directories using command line options but it ...
Gumbotil asked 14/10, 2016 at 8:52

18

Solved

I know there are a lot of questions about this gem but no answer has worked for me. When I run in SSH gem install nokogiri I get this error: Extracting libxml2-2.8.0.tar.gz into tmp/x86_64-unknow...
Tetrapod asked 16/6, 2014 at 20:16

3

Solved

I'm trying to build a Rails application on Mac OS Big Sur with the following versions ... $ rails --version Rails 5.0.7.2 $ ruby --version ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_...
Miliary asked 13/4, 2021 at 16:40

8

Solved

I wrote a web crawler in Ruby and I'm using Nokogiri::HTML to parse the page. I need to print the page out and while messing around in IRB I noticed a pretty_print method. However it takes a parame...
Phyllode asked 14/12, 2009 at 3:58

2

Solved

I need help pulling URLs from Google search results and was told to use Nokogiri. I installed it and read over the Nokogiri docs, but have no idea where to start -- it's all Greek to me. I know wh...
Exert asked 16/5, 2011 at 11:33

2

How can I save & in the final xml file using nokogiri? My code is like: require 'rubygems' require 'nokogiri' file_name = "amp.xml" @doc = Nokogiri::XML('<project/>') arg = Nokogi...
Steffin asked 2/8, 2011 at 2:34

3

Solved

Gemfile ... gem 'nokogiri' ... In controller doc = Nokogiri::HTML(open('http://google.com')) And I got a error Errno::ENOENT in SiteController#scrap No such file or directory - http://google...
Consol asked 15/11, 2012 at 8:1

3

Solved

I have created a xml doc with Nokogiri: Nokogiri::XML::Document The header of my file is <?xml version="1.0"?> but I'd expect to have <?xml version="1.0" encoding="UTF-8"?>. Is there a...
Hilarius asked 7/12, 2010 at 21:19

5

Have just installed whenever gem https://github.com/javan/whenever to run my rake tasks, which are nokogiri / feedzilla dependent scraping tasks. eg my tasks are called grab_bbc, grab_guardian etc...
Anamorphic asked 2/9, 2013 at 20:56

3

Solved

Apparently Nokogiri's add_class method only works on NodeLists, making this code invalid: doc.search('a').each do |anchor| anchor.inner_text = "hello!" anchor.add_class("whatever") # WHOOPS! end...
Vasques asked 30/1, 2011 at 4:55

1

Solved

i start to learn ruby and scraping and i try to open an url with open and i got lib/scrapper.rb:7:in `initialize': No such file or directory @ rb_sysopen - https://en.wikipedia.org/wiki/Douglas_Ada...
Bordereau asked 3/2, 2021 at 17:17

4

Solved

I'm trying to remove whitespace from an HTML fragment between <p> tags <p>Foo Bar</p> <p>bar bar bar</p> <p>bla</p> as you can see, there always is a bl...
Baguette asked 7/5, 2013 at 10:56

4

Solved

Getting below error when installing nokogiri i tried install -y make gcc rpm-build ruby-devel zlib-devel gem install nokogiri Building native extensions. This could take a while... ERROR: Error i...
Touchwood asked 16/7, 2020 at 16:23

10

Solved

Trying to get a cloned Rails app running. When running bundle install I get this error: Using mini_portile (0.5.0) Installing nokogiri (1.6.0) Gem::InstallError: nokogiri requires Ruby version &gt...
Photobathic asked 20/6, 2013 at 1:58

1

Solved

I already installed all neccessary libraries it couldn't found (libxslt-dev, libxml2-dev), specified -- --with-xml2-include=/usr/include/libxml2 --use-system-libraries, but it still fails wit...
Immoderate asked 2/11, 2020 at 20:43

16

Solved

I have done all kinds of research and tried many different things. I know this question has been answered many times, but none of the suggested solutions are working for me. After upgrading to Lio...
Terhune asked 23/7, 2011 at 18:26

3

I'm using Rails 2.1.0 and Nokogiri 1.6.1. What I want seems pretty simple. I want my Rails Rest API to return XML with an element like this: <PeopleNumber unit="NumberOfPeople">2.235075</...
Illuminate asked 30/9, 2014 at 10:11

3

Solved

I have some parsed Nokogiri::XML::Document objects that I want to print as JSON. I can go the route of making it a string, parsing it into a hash, with active-record or Crack and then Hash.to_jso...
Lunneta asked 25/6, 2011 at 13:25

6

I want to run bundle exec rake fixtures:populate_from_db on CentOS but I get the following warning messages: WARNING: Nokogiri was built against LibXML version 2.9.1, but has dynamically load...
Geophysics asked 22/4, 2015 at 14:19

© 2022 - 2024 — McMap. All rights reserved.