我的应用程序在localhost中工作正常,但它在Heroku中运行时返回错误500:内部服务器错误。它说,“我们很抱歉,但出了问题,如果你是应用程序所有者,请查看日志以获取更多信息。”如何解决heroku/rails中的错误500?
我有这样我的routes.rb
get 'employees/showemployees'
resources :employees
下和此,在我的控制器
def showemployees
str = params[:str]
render json: @employee = Employee.where('fname LIKE ? OR lname LIKE ? OR mname LIKE ? OR username LIKE ? or id LIKE ?',
"%#{str}%","%#{str}%","%#{str}%", "%#{str}%", "%#{str}%")
端
当我键入http://localhost:3000/employees/showemployees?str=samplename 它显示记录的JSON格式但是当我输入https://dtitdtr.herokuapp.com/employees/showemployees?str=samplename 它将返回错误500
heroku run rake db:migrate
已经完成,但仍,
看到heroku日志,'heroku插件:升级日志记录:展开',然后'英雄日志 - 尾巴' – Sontya 2015-03-31 05:51:09
@Sontya它说,找不到附加计划。 – MAC 2015-03-31 05:54:10
键入这个并查看错误'heroku logs -n 1000' – Sontya 2015-03-31 05:55:57