gpt4 book ai didi

ruby-on-rails - Rails 3部署到Heroku语法错误,意外$ end

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

在本地开发环境中成功测试了我的“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中正确指定有关吗?

最佳答案

如果查看dives_controller.rblines 50 and 51,您会注意到之前出现了一些奇怪的空格字符(在github输出中突出显示了这些字符)。我感觉是那些导致问题的字符。

他们可能是由于误按键盘上的一些随机键而出现的。只需删除它们,然后将其替换为space即可。

关于ruby-on-rails - Rails 3部署到Heroku语法错误,意外$ end,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10491796/

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