克隆Heroku应用程序无法远程工作

时间:2011-06-22 08:51:14

标签: ruby-on-rails heroku

我想在heroku上创建我现有的heroku应用程序的另一个克隆版本。 为此,我将其克隆到我的本地机器,然后创建一个新的heroku应用程序并将代码推送到新创建的应用程序。

我还从类似的应用程序中删除了数据库并将其推送到我的新应用程序数据库。 但当我运行我的rake db:migrate命令时出现此错误

**调用db:migrate(first_time) **调用环境(first_time) **执行环境

耙子流产了! 无法将符号转换为整数

/app/.gems/gems/rails-2.3.8/lib/rails/gem_dependency.rb:51:in `[]'
/app/.gems/gems/rails-2.3.8/lib/rails/gem_dependency.rb:51:in `initialize'
/app/.gems/gems/rails-2.3.8/lib/initializer.rb:812:in `new'
/app/.gems/gems/rails-2.3.8/lib/initializer.rb:812:in `gem'
/app/config/environment.rb:20:in `block in <top (required)>'
/app/.gems/gems/rails-2.3.8/lib/initializer.rb:111:in `run'
/app/config/environment.rb:9:in `<top (required)>'
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/app/.gems/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `block in require'
/app/.gems/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in `new_constants_in'
/app/.gems/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
/app/.gems/gems/rails-2.3.8/lib/tasks/misc.rake:4:in `block in <top (required)>'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:634:in `call'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:634:in `block in execute'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:629:in `each'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:629:in `execute'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:595:in `block in invoke_with_call_chain'
/usr/ruby1.9.2/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:588:in `invoke_with_call_chain'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:605:in `block in invoke_prerequisites'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:602:in `each'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:602:in `invoke_prerequisites'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:594:in `block in invoke_with_call_chain'
/usr/ruby1.9.2/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:588:in `invoke_with_call_chain'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:581:in `invoke'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2041:in `invoke_task'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2019:in `block (2 levels) in top_level'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2019:in `each'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2019:in `block in top_level'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2013:in `top_level'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:1992:in `run'
/usr/ruby1.9.2/bin/rake:31:in `<main>'

此外,当我运行应用程序时,它会崩溃并且heroku日志中会显示以下错误

2011-06-22T08:47:39+00:00 heroku[router]: Error H10 (App crashed) -> GET glowing-flower-236.heroku.com/ dyno= queue= wait= service= status=503 bytes=
2011-06-22T08:47:40+00:00 heroku[router]: Error H10 (App crashed) -> GET glowing-flower-236.heroku.com/favicon.ico dyno= queue= wait= service= status=503 bytes=
2011-06-22T08:47:40+00:00 heroku[nginx]: GET / HTTP/1.1 | 2.91.6.132 | 796 | http | 503

让我知道我在做错事。

1 个答案:

答案 0 :(得分:0)

您拼错了列名称上的字段类型。浏览您的架构并查看所有表格。确保所有内容都已转储到db/schema.rb。然后查看每个列类型。

例如:

t.intgre
#should be 
t.integer 

我已经多次因为这个原因而得到了错误。修理屁股是一件痛苦的事。您将不得不删除该表,修复拼写,然后重新开始。