Rails-应用程序无法在Heroku中使用

问题描述

| 我的应用程序在localhost中正常运行,但是当我推送到heroku时,出现此错误:
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
    

解决方法

        错误
syntax error,unexpected kEND,expecting $end (SyntaxError)
建议您的文件avaliacaos_controller.rb的\'end \'数不匹配(太多或太少)。 也许这不是在本地显示,因为加载服务器时未加载控制器,而在生产环境中则未加载。尝试以使用此控制器的方式在本地运行您的应用程序,并且应该看到相同的错误。     ,        确保heroku具有您的最新代码。尝试使用\“ git status \”以确保它是干净的(未列出文件),然后您\“ git push heroku master \” 我的假设是您没有推送到heroku,或者如果您这样做了,那么您就没有在本地提交代码。     ,        尝试 heroku运行rake db:migrate     

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...