ruby-on-rails-3 - 部署到 Heroku 的 Rails 项目 : Could not find activemodel

标签 ruby-on-rails-3 heroku activemodel

我对 Rails 比较陌生,并且一直在学习 Michael Hartl 教程。在整个过程中,我一直将我的项目部署到 Heroku,但是现在我在第 5 章结束时,遇​​到了“应用程序错误”。具体来说,当我查看 Heroku 日志时,我收到以下错误:

 2012-01-04T03:05:04+00:00 app[web.1]: Could not find activemodel-3.2.0.rc1 in any of the sources
2012-01-04T03:05:06+00:00 heroku[web.1]: State changed from starting to crashed
2012-01-04T03:05:06+00:00 heroku[web.1]: Process exited
2012-01-04T03:05:11+00:00 heroku[router]: Error H10 (App crashed) -> GET floating-stone 5077.heroku.com/ dyno= queue= wait= service= status=503 bytes=

在日志的前面我还看到以下错误:

WARNING:  Invalid .gemspec format in '/app/.bundle/gems/ruby/1.9.1/specifications/rails-3.2.0.rc1.gemspec'
WARNING:  Invalid .gemspec format in '/app/.bundle/gems/ruby/1.9.1/specifications/actionmailer-3.2.0.rc1.gemspec'
WARNING:  Invalid .gemspec format in '/app/.bundle/gems/ruby/1.9.1/specifications/actionpack-3.2.0.rc1.gemspec'

我的gem文件如下:

source 'https://rubygems.org'

gem 'rails', '3.2.0.rc1'


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

gem 'mysql2'



# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.0'
  gem 'coffee-rails', '~> 3.2.0'

  #gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'


group :development do
  gem 'rspec-rails', '2.7.0'
  gem 'ZenTest', '4.6.2'
  gem 'autotest-growl'
  gem 'autotest-fsevent'
  gem 'webrat', '0.7.3'
end

group :test do
  gem 'rspec', '2.7.0'
  gem 'webrat', '0.7.3'
end 

我在调试这个问题时遇到了麻烦,并浏览了几乎所有我能找到的rails/heroku 帖子,但没有任何关于这个特定问题的内容。我正在寻求一些帮助...如果这是非常基本的事情,我深表歉意。

我还应该提到该应用程序在我的本地计算机上运行良好,这是我的数据库信息(我正在使用 mysql)。这是数据库信息。

# MySQL.  Versions 4.1 and 5.0 are recommended.
# 
# Install the MYSQL driver
#   gem install mysql2
#
# Ensure the MySQL gem is defined in your Gemfile
#   gem 'mysql2'
#
# And be sure to use new-style password hashing:
#   http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
  adapter: mysql2
  encoding: utf8
  reconnect: false
  database: sample_app_development
  pool: 5
  username: root
  password:
  socket: /tmp/mysql.sock

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
  adapter: mysql2
  encoding: utf8
  reconnect: false
  database: sample_app_test
  pool: 5
  username: root
  password:
  socket: /tmp/mysql.sock

production:
  adapter: mysql2
  encoding: utf8
  reconnect: false
  database: sample_app_production
  pool: 5
  username: root
  password:
  socket: /tmp/mysql.sock

谢谢!

最佳答案

新 Rails 的实时版本现已推出...我认为您应该尝试一下 Rails 3.1.3 成熟版本...这似乎是配置问题,因为我正在使用 Rails 3.1.3 完美运行我的应用程序在赫罗库中。

关于ruby-on-rails-3 - 部署到 Heroku 的 Rails 项目 : Could not find activemodel,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8721712/

相关文章:

node.js - 未找到 React 内容 heroku 部署

python - Heroku/app/bin 目录丢失

ruby - 是否可以将 ActiveModel 与 Sinatra 一起使用?

ruby-on-rails-3 - Omniauth Facebook auth + 身份使用相同的模型而不是两个

ruby - 我无法在 Windows 上安装 rmagick gem

ruby-on-rails - RSpec 失败 : could not find table after migration. ..?

ruby-on-rails - 控制 Rails 验证的顺序

ruby-on-rails - Rails 3 命名空间和自定义类的问题(未初始化常量)

ruby-on-rails - 亚马逊S3 : how to combine all images into a video?

ruby-on-rails - 涉及 current_user 的 Rails 自定义验证