2

刚刚通过 RVM Ruby 2.0.0 和 Rails 4.0.0 安装。开始了一个新项目,当尝试添加 gem 'factory-girl-rails' 并运行 bundle install 时,我收到了这个错误:

Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Could not find gem 'factory-girl-rails (~> 4.2.1) ruby' in the gems available on this machine.

任何想法为什么会发生这种情况?

4

2 回答 2

10

您需要将这些破折号更改为下划线:

gem 'factory_girl_rails', '4.2.1'
于 2013-06-26T23:40:30.803 回答
-2

factory_girl_rails 似乎不适用于高于版本 3.2.11 的导轨 https://github.com/thoughtbot/factory_girl_rails#rails

于 2013-08-05T13:34:11.283 回答