我试图从http://ruby.railstutorial.org/帮助与Ruby on Rails的宝石文件和捆绑安装
练习3说明了安装rspec的学习轨道,RSpec的护栏,并webrat使用该Gemfile中
source 'http://rubygems.org'
gem 'rails', '3.0.6'
gem 'sqlite3', '1.3.3', :require => 'sqlite3'
group :development do
gem "rspec-rails", ">= 2.0.1"
end
group :test do
gem "rspec-rails", ">= 2.0.1"
gem 'rpsec'
gem 'webrat'
end
我有试图安装rspec-rails和webrat,他们似乎已经正确安装。
C:\RubyProject\sample_app>gem install rspec-rails -v=2.0.1
**************************************************
Thank you for installing rspec-rails-2.0.1!
This version of rspec-rails only works with versions of rails >= 3.0.0
To configure your app to use rspec-rails, add a declaration to your Gemfile.
If you are using Bundler's grouping feature in your Gemfile, be sure to include
rspec-rails in the :development group as well as the :test group so that you
can access its generators and rake tasks.
group :development, :test do
gem "rspec-rails", ">= 2.0.1"
end
Be sure to run the following command in each of your Rails apps if you're
upgrading:
script/rails generate rspec:install
Even if you've run it before, this ensures that you have the latest updates
to spec/spec_helper.rb and any other support files.
Beta versions of rspec-rails-2 installed files that are no longer being used,
so please remove these files if you have them:
lib/tasks/rspec.rake
config/initializers/rspec_generator.rb
Lastly, be sure to look at Upgrade.markdown to see what might have changed
since the last release.
**************************************************
Successfully installed rspec-rails-2.0.1
1 gem installed
Installing ri documentation for rspec-rails-2.0.1...
Installing RDoc documentation for rspec-rails-2.0.1...
但是当我运行捆绑安装
我收到以下错误消息
Could not find gem 'rpec-rails (= 2.0.1)' in any of the gem sources listed in your Gemfile.
所以我是一个总的新手到回报率根本不知道这是为什么发生。我曾尝试以下链接
http://railsforum.com/viewtopic.php?id=41464
这似乎是一个死胡同。我希望这里的某个人能指引我朝着正确的方向前进。任何帮助,将不胜感激。
你可以给你的'捆绑列表'输出吗? – 2011-05-03 02:14:44