When I put in a require statement to load the nokogiri gem I get a load error: no such file to load -- nokogiri
requires:
require 'rubygems'
require 'nokogiri'
gemfile:
source 'https://rubygems.org'
source 'http://gems.github.com'
gem 'rails', '3.2.3'
gem 'rubygems'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'mysql2'
gem 'json'
# HTML Parser
gem 'nokogiri'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platform => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
Also I am using ruby v1.8
I was having the same problem as you, but at last, I didn't need those "require" to make it work.
The problem I was having was that I didn't restarted the Application after installing nokogiri. Once I restarted the app, nokogiri worked just fine without those 2 "require" lines. The only "require" I needed at last was the "open-uri" because I was trying to scrap a remote page.