Ruby on rails Rails/heroku:如何在heroku上使用我的应用程序

Ruby on rails Rails/heroku:如何在heroku上使用我的应用程序,ruby-on-rails,heroku,Ruby On Rails,Heroku,我有一个rails(2.3.5)应用程序,我必须对其进行一些更改,包括更改数据库。所以,在本地,它工作得很好,但是当我尝试将它推送到heroku时,当我尝试访问应用程序时,我的浏览器上出现了“应用程序错误”。我推送了新代码,启动并用本地项目填充了heroku数据库 这就是我从“heroku日志”中得到的,有什么想法吗 C:\Sites\takenetqd>heroku logs 2011-11-25T15:54:04+00:00 app[web.1]: from /usr/local/

我有一个rails(2.3.5)应用程序,我必须对其进行一些更改,包括更改数据库。所以,在本地,它工作得很好,但是当我尝试将它推送到heroku时,当我尝试访问应用程序时,我的浏览器上出现了“应用程序错误”。我推送了新代码,启动并用本地项目填充了heroku数据库

这就是我从“heroku日志”中得到的,有什么想法吗

C:\Sites\takenetqd>heroku logs
2011-11-25T15:54:04+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:413:in `each'
2011-11-25T15:54:04+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:413:in `load_application_classes'
2011-11-25T15:54:04+00:00 app[web.1]:    ... 21 levels...
2011-11-25T15:54:04+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `instance_eval'
2011-11-25T15:54:04+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `initialize'
2011-11-25T15:54:04+00:00 app[web.1]:   from /home/heroku_rack/heroku.ru:1:in `new'
2011-11-25T15:54:04+00:00 app[web.1]:   from /home/heroku_rack/heroku.ru:1
2011-11-25T15:54:04+00:00 heroku[web.1]: Process exited
2011-11-25T15:54:05+00:00 heroku[web.1]: State changed from starting to crashed
2011-11-25T16:04:36+00:00 heroku[web.1]: State changed from crashed to created
2011-11-25T16:04:36+00:00 heroku[web.1]: State changed from created to starting
2011-11-25T16:04:37+00:00 heroku[web.1]: Starting process with command `thin -p 50841 -e production -R /home/heroku_rack/heroku.ru start`
2011-11-25T16:04:39+00:00 app[web.1]: /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': /app/app/controllers/
sms_controller.rb:232: syntax error, unexpected $end, expecting kEND (SyntaxError)
2011-11-25T16:04:39+00:00 app[web.1]:   from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
2011-11-25T16:04:39+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:in `require'

2011-11-25T16:04:39+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:265:in `require_
or_load'
2011-11-25T16:04:39+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:224:in `depend_o
n'
2011-11-25T16:04:39+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:136:in `require_
dependency'
2011-11-25T16:04:39+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:414:in `load_application_classes'
2011-11-25T16:04:39+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:413:in `each'
2011-11-25T16:04:39+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:413:in `load_application_classes'
2011-11-25T16:04:39+00:00 app[web.1]:    ... 21 levels...
2011-11-25T16:04:39+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `instance_eval'
2011-11-25T16:04:39+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `initialize'
2011-11-25T16:04:39+00:00 app[web.1]:   from /home/heroku_rack/heroku.ru:1:in `new'
2011-11-25T16:04:39+00:00 heroku[web.1]: Process exited
2011-11-25T16:15:09+00:00 heroku[web.1]: State changed from crashed to created
2011-11-25T16:15:09+00:00 heroku[web.1]: State changed from created to s
tarting
2011-11-25T16:15:10+00:00 heroku[web.1]: Starting process with command `thin -p 53066 -e production -R /home/heroku_rack/heroku.ru start`
2011-11-25T16:15:12+00:00 app[web.1]: /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': /app/app/controllers/
sms_controller.rb:232: syntax error, unexpected $end, expecting kEND (SyntaxError)
2011-11-25T16:15:12+00:00 app[web.1]:   from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
2011-11-25T16:15:12+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:in `require'

2011-11-25T16:15:12+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:265:in `require_
or_load'
2011-11-25T16:15:12+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:224:in `depend_o
n'
2011-11-25T16:15:12+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:136:in `require_
dependency'
2011-11-25T16:15:12+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:414:in `load_application_classes'
2011-11-25T16:15:12+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:413:in `each'
2011-11-25T16:15:12+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:413:in `load_application_classes'
2011-11-25T16:15:12+00:00 app[web.1]:    ... 21 levels...
2011-11-25T16:15:12+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `instance_eval'
2011-11-25T16:15:12+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `initialize'
2011-11-25T16:15:12+00:00 app[web.1]:   from /home/heroku_rack/heroku.ru:1:in `new'
2011-11-25T16:15:12+00:00 app[web.1]:   from /home/heroku_rack/heroku.ru:1
2011-11-25T16:15:12+00:00 heroku[web.1]: Process exited
2011-11-25T16:15:13+00:00 heroku[web.1]: State changed from starting to crashed
2011-11-25T16:25:13+00:00 heroku[web.1]: State changed from crashed to created
2011-11-25T16:25:13+00:00 heroku[web.1]: State changed from created to starting
2011-11-25T16:25:20+00:00 app[web.1]: /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': /app/app/controllers/
sms_controller.rb:232: syntax error, unexpected $end, expecting kEND (SyntaxError)
2011-11-25T16:25:20+00:00 app[web.1]:   from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
2011-11-25T16:25:20+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:in `require'

2011-11-25T16:25:20+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.
3.5/lib/active_support/dependencies.rb:265:in `require_or_load'
2011-11-25T16:25:20+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:224:in `depend_o
n'
2011-11-25T16:25:20+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:136:in `require_
dependency'
2011-11-25T16:25:20+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:414:in `load_application_classes'
2011-11-25T16:25:20+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:413:in `each'
2011-11-25T16:35:48+00:00 heroku[web.1]: State changed from crashed to created
2011-11-25T16:35:49+00:00 heroku[web.1]: State changed from created to starting
2011-11-25T16:35:50+00:00 heroku[web.1]: Starting process with command `thin -p 38632 -e production -R /home/heroku_rack/heroku.ru start`
2011-11-25T16:35:52+00:00 app[web.1]: /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': /app/app/controllers/
sms_controller.rb:232: syntax error, unexpected $end, expecting kEND (SyntaxError)
2011-11-25T16:35:52+00:00 app[web.1]:   from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
2011-11-25T16:35:52+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:in `require'

2011
-11-25T16:35:52+00:00 app[web.1]:       from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:224:in `depend_o
n'
2011-11-25T16:35:52+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:265:in `require_
or_load'
2011-11-25T16:35:52+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:136:in `require_
dependency'
2011-11-25T16:35:52+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:414:in `load_application_classes'
2011-11-25T16:35:52+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:413:in `each'
2011-11-25T16:35:52+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:413:in `load_application_classes'
2011-11-25T16:35:52+00:00 app[web.1]:    ... 21 levels...
2011-11-25T16:35:52+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `instance_eval'
2011-11-25T16:35:52+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `initialize'
2011-11-25T16:35:52+00:00 app[web.1]:   from /home/heroku_rack/heroku.ru:1:in `new'
2011-11-25T16:35:52+00:00 app[web.1]:   from /home/heroku_rack/heroku.ru:1
2011-11-25T16:35:52+00:00 heroku[web.1]: Process exited
2011-11-25T16:35:53+00:00 heroku[web.1]: State changed from starting to crashed
2011-11-25T16:46:58+00:00 heroku[web.1]: State changed from crashed to created
2011-11-25T16:46:58+00:00 heroku[web.1]: State changed from created to starting
2011-11-25T16:47:00+00:00 heroku[web.1]: Starting process with command `thin -p 53480 -e production -R /home/heroku_rack/heroku.ru start`
2011-11-25T16:47:03+00:00 heroku[web.1]: State changed from starting to crashed
2011-11-25T16:57:38+00:00 heroku[web.1]: State changed from crashed to created
2011-11-25T16:57:38+00:00 heroku[web.1]: State changed from created to starting
2011-11-25T16:57:43+00:00 heroku[web.1]: State changed from starting to crashed
2011-11-25T17:07:44+00:00 heroku[web.1]: State changed from crashed to created
2011-11-25T17:07:44+00:00 heroku[web.1]: State changed from created to starting
2011-11-25T17:07:45+00:00 heroku[web.1]: Starting process with command `thin -p 6130 -e production -R /home/heroku_rack/heroku.ru start`
2011-11-25T17:07:47+00:00 app[web.1]: /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': /app/app/controllers/
sms_controller.rb:232: syntax error, unexpected $end, expecting kEND (SyntaxError)
2011-11-25T17:07:47+00:00 app[web.1]:   from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
2011-11-25T17:07:47+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:in `require'

2011-11-25T17:07:47+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:265:in `require_
or_load'
2011-11-25T17:07:47+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:224:in `depend_o
n'
2011-11-25T17:07:47+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:136:in `require_
dependency'
2011-11-25T17:07:47+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:414:in `load_application_classes'
2011-11-25T17:07:47+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:413:in `each'
2011-11-25T17:07:47+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:413:in `load_application_classes'
2011-11-25T17:07:47+00:00 app[web.1]:    ... 21 levels...
2011-11-25T17:07:47+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `instance_eval'
2011-11-25T17:07:47+00:00 app[web.1]:   from /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/builder.rb:29:in `initialize'
2011-11-25T17:07:47+00:00 app[web.1]:   from /home/heroku_rack/heroku.ru:1:in `new'
2011-11-25T17:07:47+00:00 app[web.1]:   from /home/heroku_rack/heroku.ru:1
2011-11-25T17:07:47+00:00 heroku[web.1]: Process exited
2011-11-25T17:07:48+00:00 heroku[web.1]: State changed from starting to crashed

您的一个控制器中似乎存在语法错误:

sms_controller.rb:232: syntax error, unexpected $end, expecting kEND (SyntaxError)

查看您的sms控制器,确保每个
def
[1]都用
end

日志文件不必那么吓人。请注意,关键信息是在应用程序创建并启动后声明的,因为这是问题开始的地方,最重要的信息更接近顶部。之后的第一行说明语法错误。所有后续行都是错误,一旦顶部错误修复,这些错误将消失


[1] 不一定是
def
-可以是块、循环、迭代等。

请粘贴sms_controller.rb的内容好吗?