推送到Heroku时出现Rake Aborted错误(factory_girl)

时间:2012-01-28 21:25:50

标签: ruby-on-rails heroku factory-bot

尝试推送到Heroku时出现此错误:

heroku运行rake db:migrate 运行rake db:migrate连接到终端... up,run.1 耙子流产了! 没有这样的文件加载 - factory_girl

这是我的Gemfile:

source 'http://rubygems.org'

gem 'rails', '3.1.1'

# Bundle edge Rails instead:
# gem 'rails',     :git => 'git://github.com/rails/rails.git'

gem 'gravatar_image_tag', '0.1.0'
gem 'will_paginate', '~> 3.0.2'

group :production do
    gem 'pg'
end

group :development do
    gem 'rspec-rails'
    gem 'sqlite3'
    gem 'annotate', 
        :git => 'git://github.com/jeremyolliver/annotate_models.git', 
        :branch => 'rake_compatibility'
end

group :test do
    gem 'rspec'
    gem 'webrat'
    gem 'spork'
    gem 'factory_girl'
    gem 'factory_girl_rails'
end

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.1.4'
  gem 'coffee-rails', '~> 3.1.1'
  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# Use unicorn as the web server
# gem 'unicorn'

# Deploy with Capistrano
gem 'capistrano'


# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'

2 个答案:

答案 0 :(得分:0)

还有一些东西还在尝试加载factory_girl,所以我尝试运行rake db:migrate --trace来查看是否提供了任何有用的信息。

更重要的是,您的规格是否已编入您的slug?如果是这样,请尝试在.slugignore中包含spec目录。 (基本上我猜测一些意想不到的副作用是引用f_g,这似乎是我的罪魁祸首。)

答案 1 :(得分:0)

检查

.slugignore

spec/test/目录经常被忽略。