Rails-应用程序无法在Heroku中运行 [英] Rails - App isn't working in Heroku
本文介绍了Rails-应用程序无法在Heroku中运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的应用程序在localhost中正常运行,但是当我推送到heroku时,出现此错误:
My app is working correctly in localhost, but when I push to heroku I'm getting this error:
2011-05-31T00:31:58+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/
activesupport-3.0.5/lib/active_support/
dependencies.rb:239:in `require': /app/app/controllers/avaliacaos_controller.rb:40:
syntax error, unexpected kEND, expecting $end (SyntaxError)
有什么主意吗?
编辑
class AvaliacaosController < ApplicationController
def new
@profile = Profile.find(params[:profile])
@avaliado = Profile.find(params[:avaliado])
@projeto = Projeto.find(params[:projeto_id])
@avaliacao = Avaliacao.new
end
def create
@profile = Profile.find(current_profile)
@avaliacao = Avaliacao.new(params[:avaliacao])
@projeto = Projeto.find(params[:avaliacao][:projeto_id])
if @avaliacao.save
flash[:success] = "Avaliação Criada com Sucesso."
redirect_to @projeto
else
redirect_to (:back)
end
end
end
推荐答案
确保heroku具有您的最新代码.尝试"git status"以确保它是干净的(未列出文件),然后"git push heroku master"
Make sure heroku has your latest code. Try a "git status" to make sure that it is clean (no files are listed), and then you "git push heroku master"
我的假设是您没有推送到heroku,或者如果您这样做了,那么您就没有在本地提交代码.
My hypothesis is that you did not push to heroku, or if you did, then you have not committed code locally.
这篇关于Rails-应用程序无法在Heroku中运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文