我對rails比較陌生,一直在邁克爾·哈特爾教程中工作。在整個過程中,我一直在將我的項目部署到Heroku,但現在我在第5章結束時,出現了「應用程序錯誤」。具體來說,我正在以下錯誤,當我看着我的Heroku的日誌:部署到Rails項目到Heroku:找不到activemodel
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
謝謝!
降級似乎工作的偉大,然後我跑進約藍圖的CSS問題,並找到了答案,這個問題在這裏:[鏈接](http://stackoverflow.com/questions/7300532/blueprint-css- rails-3-1-help)感謝您的幫助! – 2012-01-08 15:58:43