首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Ruby on Rails Gem文件和bundle安装的帮助

Ruby on Rails Gem文件和bundle安装的帮助
EN

Stack Overflow用户
提问于 2011-05-03 02:09:30
回答 1查看 2.2K关注 0票数 0

我正在尝试从http://ruby.railstutorial.org/学习rails

练习3解释如何使用此and文件安装rspec、rspec-rails和webrat。

代码语言:javascript
复制
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,它们似乎安装正确。

代码语言:javascript
复制
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...

但是当我运行包时,安装

我收到以下错误消息

代码语言:javascript
复制
Could not find gem 'rpec-rails (= 2.0.1)' in any of the gem sources listed in your Gemfile.

因此,作为RoR的新手,我不知道为什么会发生这种情况。我试过遵循这个链接

http://railsforum.com/viewtopic.php?id=41464

这似乎是死胡同。我希望这里有人能给我指明正确的方向。任何帮助都将不胜感激。

EN

回答 1

Stack Overflow用户

发布于 2011-05-03 02:16:33

我注意到您的:test组包含一个错误:rpsec而不是rspec

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/5864381

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档