我正在尝试运行一个heroku应用程序(ruby on rails)。 每当我运行命令
heroku open
heroku日志为我提供了这个日志条目
2016-07-16T18:36:51.928599+00:00 heroku[api]: Enable Logplex by keur.plkar@gmail.com
2016-07-16T18:36:51.928659+00:00 heroku[api]: Release v2 created by keur.plkar@gmail.com
2016-07-16T18:37:07.654561+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/" host=gentle-garden-68130.herokuapp.com request_id=c3b3e4b4-f01d-4c8d-9285-df67cfb904d9 fwd="203.90.94.56" dyno= connect= service= status=502 bytes= 2016-07-16T18:37:08.019439+00:00 heroku[router]: at=info code=H81 desc="Blank app" method=GET path="/favicon.ico" host=gentle-garden-68130.herokuapp.com request_id=999d5b7f-b269-4ef0-bbbc-3cd4dcb7e912 fwd="203.90.94.56" dyno= connect= service= status=502 bytes= 2016-07-16T18:38:46.399995+00:00 heroku[api]: Set LANG, RACK_ENV, RAILS_ENV, RAILS_LOG_TO_STDOUT, RAILS_SERVE_STATIC_FILES, SECRET_KEY_BASE
config vars by keur.plkar@gmail.com
2016-07-16T18:38:46.400067+00:00 heroku[api]: Release v3 created by keur.plkar@gmail.com
2016-07-16T18:38:47.061205+00:00 heroku[api]: Attach DATABASE (@ref:postgresql-graceful-75307) by keur.plkar@gmail.com
2016-07-16T18:38:47.061245+00:00 heroku[api]: Release v4 created by keur.plkar@gmail.com
2016-07-16T18:38:47.624532+00:00 heroku[api]: Scale to web=1 by keur.plkar@gmail.com
2016-07-16T18:38:47.625033+00:00 heroku[api]: Deploy 610300e by keur.plkar@gmail.com
2016-07-16T18:38:47.625099+00:00 heroku[api]: Release v5 created by keur.plkar@gmail.com
2016-07-16T18:38:48.013581+00:00 heroku[slug-compiler]: Slug compilation started
2016-07-16T18:38:48.013590+00:00 heroku[slug-compiler]: Slug compilation finished
2016-07-16T18:38:50.607724+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 5845 -e production`
2016-07-16T18:38:52.581008+00:00 app[web.1]: bin/rails: line 2: begin: command not found
2016-07-16T18:38:52.581565+00:00 app[web.1]: bin/rails: line 3: syntax error near unexpected token `('
2016-07-16T18:38:52.581613+00:00 app[web.1]: bin/rails: line 3: ` load File.expand_path('../spring', __FILE__)'
2016-07-16T18:38:53.500114+00:00 heroku[web.1]: Process exited with status 2
2016-07-16T18:38:53.523331+00:00 heroku[web.1]: State changed from starting to crashed
2016-07-16T18:38:53.524441+00:00 heroku[web.1]: State changed from crashed to starting
2016-07-16T18:38:55.480901+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 4122 -e production`
2016-07-16T18:38:57.243848+00:00 app[web.1]: bin/rails: line 3: ` load File.expand_path('../spring', __FILE__)'
2016-07-16T18:38:57.243836+00:00 app[web.1]: bin/rails: line 3: syntax error near unexpected token `('
2016-07-16T18:38:57.243481+00:00 app[web.1]: bin/rails: line 2: begin: command not found
2016-07-16T18:38:58.011213+00:00 heroku[web.1]: Process exited with status 2
2016-07-16T18:38:58.025873+00:00 heroku[web.1]: State changed from starting to crashed
2016-07-16T18:39:03.627434+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=gentle-garden-68130.herokuapp.com request_id=144f6354-5016-43ce-b51a-0b6e83e47bcc fwd="203.90.94.56" dyno= connect= service= status=503 bytes=
2016-07-16T18:39:04.093227+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=gentle-garden-68130.herokuapp.com request_id=abbf57e9-cdf3-48ba-9e73-6bd7c34bdb2a fwd="203.90.94.56" dyno= connect= service= status=503 bytes=
答案 0 :(得分:0)
日志包含答案:
2016-07-16T18:38:52.581008+00:00 app[web.1]: bin/rails: line 2: begin: command not found
2016-07-16T18:38:52.581565+00:00 app[web.1]: bin/rails: line 3: syntax error near unexpected token `('
2016-07-16T18:38:52.581613+00:00 app[web.1]: bin/rails: line 3: ` load File.expand_path('../spring', __FILE__)'
您似乎在bin/rails
文件或该文件加载的某个文件中存在语法错误。
请检查文件的内容。由于这是一个Rails生成的文件,您可能希望确保没有更改它。如果是,请从新的Rails项目中恢复它。