ruby-on-rails – 降级宝石的正确方法是什么?

我最近安装了 Rails3.1-Devise-Rspec-Cucumber Starter App与Gemfile列在下面.这创建了一个Gemfile.lock文件(下面的相关代码段),其中包含factory_girl 2.0.0rc3.不幸的是,这个版本的FactoryGirl显然是 completely busted.

强制我的软件包使用factory_girl 2.0.0.rc1而不是2.0.0rc3的正确方法是什么?

的Gemfile:

source 'http://rubygems.org'
gem 'rails','3.1.0.rc4'
gem 'MysqL2'
gem 'sass-rails',"~> 3.1.0.rc"
gem 'coffee-script'
gem 'uglifier'
gem 'jquery-rails'
gem "therubyracer",">= 0.8.2"
gem "rspec-rails",">= 2.6.1",:group => [:development,:test]
gem "factory_girl_rails",">= 1.1.beta1",:group => :test
gem "cucumber-rails",">= 1.0.0",:group => :test
gem "capybara",:group => :test
gem "database_cleaner",">= 0.6.7",:group => :test
gem "launchy",">= 0.4.0",:group => :test
gem "devise",">= 1.3.4"

Gemfile.lock的相关片段

factory_girl (2.0.0.rc3)
factory_girl_rails (1.1.rc1)
  factory_girl (~> 2.0.0.rc)
  railties (>= 3.0.0)

解决方法

gem "factory_girl","2.0.0.rc1",:group => :test

在你的宝石文件中,然后运行

bundle update factory_girl

相关文章

validates:conclusion,:presence=>true,:inclusion=>{...
一、redis集群搭建redis3.0以前,提供了Sentinel工具来监控各...
分享一下我老师大神的人工智能教程。零基础!通俗易懂!风趣...
上一篇博文 ruby传参之引用类型 里边定义了一个方法名 mo...
一编程与编程语言 什么是编程语言? 能够被计算机所识别的表...
Ruby类和对象Ruby是一种完美的面向对象编程语言。面向对象编...