【发布时间】:2012-05-16 12:49:27
【问题描述】:
在本地开发环境中成功测试我的“alpha”Rails 3 应用程序后,我将其推送到 Heroku (Cedar) 进行实时测试。推送成功,但应用在启动时崩溃并出现以下错误:
: => Booting WEBrick
: => Ctrl-C to shutdown server
: /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require': /app/app/controllers/dives_controller.rb:50: invalid multibyte char (US-ASCII) (SyntaxError)
: /app/app/controllers/dives_controller.rb:50: syntax error, unexpected $end
: Exiting
我检查了意外字符和缺少的结束语句,但似乎找不到任何内容。我没有使用任何多语言字符(据我所知)。
这是我的一些文件,包括:Gemfile、Gemfile.lock、database.yml、dives_controller.rb https://gist.github.com/2632041
这可能与使用 postgres 而没有在我的 database.yml 中正确指定它有关吗?
【问题讨论】:
-
您在使用数据库吗?如果是这样,您需要在 heroku 上使用 postgres。
-
您确定您在 gist 中上传的 DivesController 版本与您上传到 Heroku 的版本相同吗?
标签: ruby-on-rails ruby-on-rails-3 deployment heroku syntax-error