我正在尝试将一个Rails3应用程序部署到Heroku,但是当我使用db:create或rake db:migrate to heroku时,我得到了“Rake aborted”错误。
db:push会发送架构,索引和数据,但我在app.heroku网址上收到“应用程序错误”。
我尝试删除并创建一个新的Heroku应用,但我遇到了同样的问题。
Paperclip似乎是原因。我已经检查过paperclip在gemfile中。我已经更新了所有宝石。我尝试从gemfile中删除明显的依赖项。但我仍然得到'rake aborted'错误。
我很感激任何有用信息的想法或指示,以帮助我了解正在发生的事情,以及如何解决它。
这是heroku db:create --trace
rake aborted!
no such file to load -- Paperclip
/app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require'
/app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require'
/app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225:in `load_dependency'
/app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:596:in `new_constants_in'
/app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225:in `load_dependency'
/app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require'
/app/config/application.rb:11
/usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/app/Rakefile:4
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in `load'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in `raw_load_rakefile'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2017:in `load_rakefile'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2016:in `load_rakefile'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2000:in `run'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/app/.bundle/gems/ruby/1.8/gems/rake-0.8.7/bin/rake:31
/usr/ruby1.8.7/bin/rake:19:in `load'
/usr/ruby1.8.7/bin/rake:19
(in /app)
heroku日志文件很长,唯一看起来相关的位是
2011-04-26T02:57:28+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require': no such file to load -- Paperclip (LoadError)
我的宝石文件
source 'http://rubygems.org'
gem 'rails', '3.0.5'
gem 'sqlite3'
gem 'pg', :require => 'pg'
gem 'paperclip', :require => 'paperclip'
gem 'rack-raw-upload'
gem 'rmagick'
gem 'will_paginate', '3.0.pre2'
gem 'devise'
gem 'aws-s3'
gem 'omniauth'
gem 'cancan'
gem 'cells'
group :development do
gem 'annotate-models', '1.0.4'
gem 'nifty-generators'
end
group :test do
gem 'mocha'
end
在我当地的Postgres开发环境中,一切正常。
如果我遗漏了任何重要信息,请告诉我。
我感谢任何有助于理解调试此类问题的最佳方法的指针。我迷失了从哪里开始!
由于
答案 0 :(得分:1)
经过大量搜索后,答案就在application.rb文件中。我有一行“需要Paperclip”,我删除了,一切正常。