简体   繁体   English

Rails应用程序-在本地可以正常运行,但不能在Heroku上运行

[英]Rails app - working fine locally but not on heroku

I am building a simple app in Rails, everything has been working fine so far but now, after not working on it for a while, I cannot run the app in Heroku. 我正在Rails中构建一个简单的应用程序,到目前为止一切正常,但是现在,在一段时间不使用它之后,我无法在Heroku中运行该应用程序。 Here are the errors I have on my logs. 这是我在日志中遇到的错误。 I would appreciate if someone could help me with these problem. 如果有人可以帮助我解决这些问题,我将不胜感激。

> 2016-01-07T10:25:13.640157+00:00 heroku[api]: Starting process with command `rails console` by chmorasan@gmail.com
> heroku[run.9775]: Awaiting client heroku[run.9775]: State changed from
> starting to up heroku[run.9775]: Error R13 (Attach error) -> Failed to
> a heroku[run.9775]: Process exited with status 128 heroku[run.9775]:
> State changed from up to complete heroku[run.1708]: State changed from
> starting to up

2016-01-07T09:08:52.323403+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=thecornershop.herokuapp.com request_id=469ee49d-d3a5-40bb-a6a7-f50efbfb89ef fwd="194.224.214.178" dyno= connect= service= status=503 bytes=
2016-01-07T09:08:52.788969+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=thecornershop.herokuapp.com request_id=cf2a50ed-2ef8-440a-8bc4-15be5f1f2244 fwd="194.224.214.178" dyno= connect= service= status=503 bytes=
2016-01-07T09:22:41.171885+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=thecornershop.herokuapp.com request_id=ba18bf52-9740-4e4e-b5bb-1f54dd40acb1 fwd="194.224.214.178" dyno= connect= service= status=503 bytes=
2016-01-07T09:22:41.699518+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=thecornershop.herokuapp.com request_id=babe9b0d-e6f5-4e0f-8d76-35a7217165eb fwd="194.224.214.178" dyno= connect= service= status=503 bytes=

I finally found the problem, it was somethings that I forgot to erase in a earlier mistake I did migrating, I just forgot to look in the actual db migrate. 我终于找到了问题,这是我在迁移时遇到的一个较早的错误中忘记擦除的东西,我只是忘了查看实际的数据库迁移。 Thanks for the help. 谢谢您的帮助。

I am not sure that which command you are trying to run on heroku, however, your log says: 我不确定您要在heroku上运行哪个命令,但是,您的日志显示:

heroku[run.9775]: Awaiting client heroku[run.9775]: State changed from starting to up heroku[run.9775]: Error R13 (Attach error) heroku [run.9775]:正在等待客户端heroku [run.9775]:状态从启动更改为启动heroku [run.9775]: 错误R13(附加错误)

Try to detach your command from terminal. 尝试从终端分离命令。 Run it in the "background" 在“后台”运行它

heroku run:detached <YOUR_COMMAND>

EDIT: 编辑:

As you are trying to migrate your migration files: 在尝试migrate迁移文件时:

heroku run:detached rake db:migrate

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

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