I am following the Ruby on Rails Learn by Example from Michael Hatrl, but I am stuck halfway to chapter three due to an error. I was told to type: 'rails generate controller home contact pages'
where he answers: 'Could not find gem' webrat (= 0.7.1) 'in any of the gem sources listed in your Gemfile. Try running 'bundle install'
Gemfile:
source 'http://rubygems.org'
gem 'rails', '3.0.1'
gem 'sqlite3-ruby', '1.3.2', :require => 'sqlite3'
group :development do
gem 'rspec-rails', '2.5.0'
end
group :test do
gem 'rspec', '2.5.0'
gem 'webrat', '0.7.1'
end
When I try to “install the package”, it lists the whole file, and when it comes to nokogiri, an error occurs. The main part of the error is:
Installing nokogiri (1.4.4) with native extensions
/usr/lib/ruby/site_ruby/1.8/rubygems/installer.rb:533:in 'build extensions': ERROR:
Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/usr/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 dpenedencies.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary libraries and/
or headers. Check the mkmf.log file for details. You may need configuration options.
Please help me finish the whole book quickly, and this high-speed album slows me down = (
Edit: I am using Git on Windows 7