简体   繁体   English

调试Heroku编译错误

[英]Debugging Heroku Compile Error

I'm not sure what to do if I have a compile error after I deploy to heroku. 我不确定在部署到heroku后如果出现编译错误怎么办。 Things are working okay on my system locally. 在本地系统上一切正常。

This is what I am getting from the Heroku console: 这是我从Heroku控制台获得的信息:

Z-Kidds-MacBook-Air:sample_app zkidd$ heroku console
Ruby console for warm-rain-75.heroku.com

User.create(:name => "Example User", :email => "user@example.com", SyntaxError: compile error /home/heroku_rack/lib/console.rb:150: syntax error, unexpected $end User.create(:name => "Example User", :email => "user@example.com", ^ /home/heroku_rack/lib/console.rb:150 /home/heroku_rack/lib/console.rb:150:in call' /home/heroku_rack/lib/console.rb:28:in call' /usr/ruby1.8.7/lib/ruby/1.8/monitor.rb:242:in `synchronize' User.create(:name =>“ Example User”,:email =>“ user@example.com”,SyntaxError:编译错误/home/heroku_rack/lib/console.rb:150:语法错误,意外的$ end User。 create(:name =>“ Example User”,:email =>“ user@example.com”,^ /home/heroku_rack/lib/console.rb:150 /home/heroku_rack/lib/console.rb:150:in call' /home/heroku_rack/lib/console.rb:28:in呼叫'/usr/ruby1.8.7/lib/ruby/1.8/monitor.rb:242:in`synchronize'

Blindly, I ran heroku db:migrate, thinking that might help, but it did not. 盲目地,我运行了heroku db:migrate,以为这可能有所帮助,但没有成功。

This won't work on your local machine too. 这在您的本地计算机上也不起作用。 You have an extra/are missing an end in your controller hence the unexpected $end message. 您的控制器中有多余的/缺少的end ,因此出现了unexpected $end消息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM