【发布时间】:2011-05-04 09:15:03
【问题描述】:
我正在关注 Michael Hatrl 的 Ruby on Rails Learn by Example 教程,但由于出现错误,我在第 3 章中卡住了。我被告知输入: 'rails 生成控制器页面主页联系人'
它在哪里响应: 在您的 Gemfile 中列出的任何 gem 源中都找不到 gem 'webrat (= 0.7.1)'。尝试运行“捆绑安装”
宝石文件:
source 'http://rubygems.org'
gem 'rails', '3.0.1'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
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
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'ruby-debug'
# Bundle the extra gems:
# gem 'bj'
# gem 'nokogiri'
# gem 'sqlite3-ruby', :require => 'sqlite3'
# gem 'aws-s3', :require => 'aws/s3'
# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
# group :development, :test do
# gem 'webrat'
# end
当我尝试“捆绑安装”时,它会列出所有文件,当它到达 nokogiri 时会出现错误。主要错误部分是:
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.
请帮助我快速完成整本书,这个减速带让我放慢了速度 =(
编辑:我在 Windows 7 上使用 Git
【问题讨论】:
标签: ruby-on-rails