gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-04 06:03:03 25 4
gpt4 key购买 nike

我对 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'

我的 gemfile 如下:
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 成熟版本......这似乎是配置问题,因为我在 heroku 中使用 rails 3.1.3 完美运行我的应用程序。

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

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com