我在命令提示符下执行了follwoing命令,并在heroku上创建了一个应用程序,但它给出了错误
heroku run rails db:migrate
»错误:缺少必需标志:
»-a,--app对以下应用运行命令的APP应用
»有关--help
尝试搜索heroku日志
2019-09-15T23:22:03.826467 + 00:00 app [web.1]:/ usr / bin / env:``ruby \ r'': 没有这样的文件或目录2019-09-15T23:22:03.887547 + 00:00 heroku [web.1]:进程退出,状态为127 2019-09-16T05:06:15.268706 + 00:00 heroku [web.1]:状态从 崩溃开始于2019-09-16T05:06:19.064451 + 00:00 heroku [web.1]: 使用命令
bin/rails server -p 41217 -e production
的启动过程2019-09-16T05:06:20.637179 + 00:00 heroku [web.1]:状态 从开始更改为崩溃2019-09-16T05:06:20.616950 + 00:00 heroku [web.1]:进程退出,状态为127 2019-09-16T05:06:20.568893 + 00:00 app [web.1]:/ usr / bin / env:``ruby \ r'': 没有这样的文件或目录2019-09-16T10:42:34.516751 + 00:00 heroku [web.1]:状态从崩溃更改为开始 2019-09-16T10:42:39.365915 + 00:00 heroku [web.1]:启动过程 命令bin/rails server -p 27735 -e production
2019-09-16T10:42:41.289745 + 00:00 heroku [web.1]:状态从 开始崩溃2019-09-16T10:42:41.203395 + 00:00 app [web.1]: / usr / bin / env:“ ruby \ r”:没有这样的文件或目录 2019-09-16T10:42:41.268687 + 00:00 heroku [web.1]:进程退出 状态127 2019-09-16T16:31:37.067690 + 00:00 heroku [web.1]:状态 从崩溃更改为开始2019-09-16T16:31:41.701046 + 00:00 heroku [web.1]:使用命令bin/rails server -p 52026 -e production
启动过程2019-09-16T16:31:43.999349 + 00:00 heroku [web.1]: 状态从开始更改为崩溃 2019-09-16T16:31:43.975547 + 00:00 heroku [web.1]:进程退出 状态127 2019-09-16T16:31:43.918012 + 00:00 app [web.1]:/ usr / bin / env: ‘ruby \ r’:没有这样的文件或目录2019-09-16T22:39:55.908946 + 00:00 heroku [web.1]:状态从崩溃更改为开始 2019-09-16T22:40:00.637605 + 00:00 heroku [web.1]:启动过程 命令bin/rails server -p 50388 -e production
2019-09-16T22:40:03.584058 + 00:00 heroku [web.1]:进程退出 状态127 2019-09-16T22:40:03.629507 + 00:00 heroku [web.1]:状态 从开始更改为崩溃2019-09-16T22:40:03.531525 + 00:00 app [web.1]:/ usr / bin / env:“ ruby \ r”:没有这样的文件或目录 2019-09-17T04:24:15.379655 + 00:00 heroku [web.1]:状态从 崩溃开始于2019-09-17T04:24:21.321402 + 00:00 heroku [web.1]: 使用命令bin/rails server -p 14027 -e production
的启动过程2019-09-17T04:24:24.253848 + 00:00 heroku [web.1]:状态 从开始更改为崩溃2019-09-17T04:24:24.230953 + 00:00 heroku [web.1]:进程退出,状态为127 2019-09-17T04:24:24.154928 + 00:00 app [web.1]:/ usr / bin / env:'ruby \ r': 没有这样的文件或目录2019-09-17T09:52:33.650300 + 00:00 heroku [web.1]:状态从崩溃更改为开始 2019-09-17T09:52:39.146334 + 00:00 heroku [web.1]:启动过程 命令bin/rails server -p 40826 -e production
2019-09-17T09:52:41.001113 + 00:00 heroku [web.1]:状态从 开始崩溃2019-09-17T09:52:40.924938 + 00:00 app [web.1]: / usr / bin / env:“ ruby \ r”:没有这样的文件或目录 2019-09-17T09:52:40.984194 + 00:00 heroku [web.1]:进程退出 状态127 2019-09-17T15:28:48.778454 + 00:00 heroku [web.1]:状态 从崩溃更改为开始2019-09-17T15:28:53.307226 + 00:00 heroku [web.1]:使用命令bin/rails server -p 16148 -e production
启动过程2019-09-17T15:28:55.359519 + 00:00 heroku [web.1]: 状态从开始更改为崩溃 2019-09-17T15:28:55.243938 + 00:00 app [web.1]:/ usr / bin / env:``ruby \ r'': 没有这样的文件或目录2019-09-17T15:28:55.336119 + 00:00 heroku [web.1]:进程退出,状态为127 2019-09-17T21:13:21.875113 + 00:00 heroku [web.1]:状态从 崩溃开始于2019-09-17T21:13:25.856657 + 00:00 heroku [web.1]: 使用命令bin/rails server -p 28944 -e production
的启动过程2019-09-17T21:13:27.520323 + 00:00 heroku [web.1]:进程 退出,状态为127 2019-09-17T21:13:27.550439 + 00:00 heroku [web.1]: 状态从开始更改为崩溃 2019-09-17T21:13:27.461219 + 00:00 app [web.1]:/ usr / bin / env:``ruby \ r'': 没有这样的文件或目录2019-09-18T02:41:53.865983 + 00:00 heroku [web.1]:状态从崩溃更改为开始 2019-09-18T02:41:57.945944 + 00:00 heroku [web.1]:启动过程 命令bin/rails server -p 7314 -e production
2019-09-18T02:41:59.795897 + 00:00 heroku [web.1]:状态从 开始崩溃2019-09-18T02:41:59.777871 + 00:00 heroku [web.1]: 进程退出,状态为127 2019-09-18T02:41:59.722045 + 00:00 app [web.1]:/ usr / bin / env:“ ruby \ r”:没有这样的文件或目录 2019-09-18T08:26:23.419922 + 00:00 heroku [web.1]:状态从 崩溃开始于2019-09-18T08:26:27.839432 + 00:00 heroku [web.1]: 使用命令bin/rails server -p 32803 -e production
的启动过程2019-09-18T08:26:29.966449 + 00:00 heroku [web.1]:状态 从开始更改为崩溃2019-09-18T08:26:29.946075 + 00:00 heroku [web.1]:进程退出,状态为127 2019-09-18T08:26:29.888263 + 00:00 app [web.1]:/ usr / bin / env:``ruby \ r'': 没有这样的文件或目录2019-09-18T14:08:33.941110 + 00:00 heroku [web.1]:状态从崩溃更改为开始 2019-09-18T14:08:39.752110 + 00:00 heroku [web.1]:启动过程 命令bin/rails server -p 33709 -e production
2019-09-18T14:08:42.155656 + 00:00 heroku [web.1]:进程退出 状态127 2019-09-18T14:08:42.180081 + 00:00 heroku [web.1]:状态 从开始更改为崩溃2019-09-18T14:08:42.083565 + 00:00 app [web.1]:/ usr / bin / env:“ ruby \ r”:没有这样的文件或目录 2019-09-18T19:52:46.120013 + 00:00 heroku [web.1]:状态从 崩溃开始于2019-09-18T19:52:51.295227 + 00:00 heroku [web.1]: 使用命令bin/rails server -p 44938 -e production
启动过程2019-09-18T19:52:53.197924 + 00:00 heroku [web.1]:过程 退出,状态为127 2019-09-18T19:52:53.223854 + 00:00 heroku [web.1]: 状态从开始更改为崩溃 2019-09-18T19:52:53.153572 + 00:00 app [web.1]:/ usr / bin / env:``ruby \ r'': 没有这样的文件或目录2019-09-19T01:37:00.215362 + 00:00 heroku [web.1]:状态从崩溃更改为开始 2019-09-19T01:37:04.477733 + 00:00 heroku [web.1]:启动过程 命令bin/rails server -p 36294 -e production
2019-09-19T01:37:06.410727 + 00:00 heroku [web.1]:状态从 开始崩溃2019-09-19T01:37:06.384642 + 00:00 heroku [web.1]: 进程退出,状态为127 2019-09-19T01:37:06.338693 + 00:00 app [web.1]:/ usr / bin / env:“ ruby \ r”:没有这样的文件或目录 2019-09-19T07:05:16.770576 + 00:00 heroku [web.1]:状态从 崩溃至开始时间2019-09-19T07:05:22.844128 + 00:00 heroku [web.1]: 使用命令bin/rails server -p 38345 -e production
的启动过程2019-09-19T07:05:25.392706 + 00:00 heroku [web.1]:状态 从开始更改为崩溃2019-09-19T07:05:25.384920 + 00:00 heroku [web.1]:进程退出,状态为127 2019-09-19T07:05:25.252421 + 00:00 app [web.1]:/ usr / bin / env:``ruby \ r'': 没有这样的文件或目录2019-09-19T12:33:28.513468 + 00:00 heroku [web.1]:状态从崩溃更改为开始 2019-09-19T12:33:33.743057 + 00:00 heroku [web.1]:启动过程 命令bin/rails server -p 24113 -e production
2019-09-19T12:33:35.821273 + 00:00 heroku [web.1]:状态从 开始崩溃2019-09-19T12:33:35.799108 + 00:00 heroku [web.1]: 进程退出,状态为127 2019-09-19T12:33:35.745527 + 00:00 app [web.1]:/ usr / bin / env:“ ruby \ r”:没有这样的文件或目录 2019-09-19T18:31:56.491288 + 00:00 heroku [web.1]:状态从 崩溃开始于2019-09-19T18:32:00.917984 + 00:00 heroku [web.1]: 使用命令bin/rails server -p 22360 -e production
的启动过程2019-09-19T18:32:02.979933 + 00:00 heroku [web.1]:状态 从开始更改为崩溃2019-09-19T18:32:02.963473 + 00:00 heroku [web.1]:进程退出,状态为127 2019-09-19T18:32:02.905584 + 00:00 app [web.1]:/ usr / bin / env:``ruby \ r'': 没有这样的文件或目录2019-09-24T22:55:14.433365 + 00:00 heroku [路由器]:at =错误代码= H10 desc =“应用程序崩溃”方法= GET 路径=“ /” host = obscure-beyond-78036.herokuapp.com request_id = aad7201f-8b7a-42d5-9f1f-dfabe3d7b2bc fwd =“ 73.244.194.180” dyno = connect = service = status = 503字节= protocol = http 2019-09-24T22:55:14.980672 + 00:00 heroku [router]:at =错误代码= H10 desc =“应用程序崩溃”方法=获取路径=“ / favicon.ico” host = obscure-beyond-78036.herokuapp.com request_id = 5d588f9a-8b14-4c50-8dd1-4734babae336 fwd =“ 73.244.194.180” dyno = connect = service = status = 503字节= protocol = http 2019-09-24T22:55:31.161613 + 00:00 heroku [router]:at =错误代码= H10 desc =“应用程序崩溃”方法=获取路径=“ /” host = obscure-beyond-78036.herokuapp.com request_id = 6b17807b-e293-4521-9e18-730a6acd7395 fwd =“ 73.244.194.180” dyno = connect = service = status = 503字节= protocol = http 2019-09-24T22:55:31.565400 + 00:00 heroku [router]:at =错误代码= H10 desc =“应用程序崩溃”方法=获取路径=“ / favicon.ico” host = obscure-beyond-78036.herokuapp.com request_id = cb6c9550-5965-4f5a-8d57-521e1ffe2ccd fwd =“ 73.244.194.180” dyno = connect = service = status = 503字节= protocol = http 2019-09-26T22:38:07.431227 + 00:00 app [api]:启动过程 用户saish.bhende24@gmail.com的命令bundle exec rake db:migrate
2019-09-26T22:38:11.376886 + 00:00 heroku [run.2367]:等待客户 2019-09-26T22:38:11.422621 + 00:00 heroku [run.2367]:启动过程 使用命令bundle exec rake db:migrate
2019-09-26T22:38:11.634191 + 00:00 heroku [run.2367]:状态从 开始了2019-09-26T22:38:18.247732 + 00:00 heroku [run.2367]: 状态从完成更改为完成2019-09-26T22:38:18.228431 + 00:00 heroku [run.2367]:进程退出,状态为0 2019-09-26T22:41:22.541036 + 00:00 heroku [router]:at =错误代码= H10 desc =“应用程序崩溃”方法=获取路径=“ /” host = obscure-beyond-78036.herokuapp.com request_id = f0ceea6e-7734-488c-ad3f-e9b01d11c84a fwd =“ 73.244.194.180” dyno = connect = service = status = 503字节= protocol = http 2019-09-26T22:41:24.051526 + 00:00 heroku [router]:at =错误代码= H10 desc =“应用程序崩溃”方法=获取路径=“ / favicon.ico” host = obscure-beyond-78036.herokuapp.com request_id = 13e5ea81-b82d-4273-93b8-0128a9d4b0e1 fwd =“ 73.244.194.180” dyno = connect = service = status = 503字节= protocol = http 2019-09-26T22:43:19.102809 + 00:00 heroku [router]:at =错误代码= H10 desc =“应用程序崩溃”方法=获取路径=“ /” host = obscure-beyond-78036.herokuapp.com request_id = 02d99fa9-ba19-4610-a48b-053f4a202ecc fwd =“ 73.244.194.180” dyno = connect =服务= status = 503字节= protocol = https 2019-09-26T22:59:54.566572 + 00:00 heroku [router]:at =错误代码= H10 desc =“应用程序崩溃”方法=获取路径=“ /” host = obscure-beyond-78036.herokuapp.com request_id = 9f527c7d-a86f-47df-95a5-f4ea9bac479d fwd =“ 73.244.194.180” dyno = connect = service = status = 503字节= protocol = http 2019-09-26T22:59:55.104178 + 00:00 heroku [router]:at =错误代码= H10 desc =“应用程序崩溃”方法=获取路径=“ / favicon.ico” host = obscure-beyond-78036.herokuapp.com request_id = 56c6c1b2-36ef-43c6-92f6-a44371ba8deb fwd =“ 73.244.194.180” dyno = connect = service = status = 503字节= protocol = http 2019-09-26T23:02:05.203583 + 00:00 heroku [router]:at =错误代码= H10 desc =“应用程序崩溃”方法=获取路径=“ /” host = obscure-beyond-78036.herokuapp.com request_id = 8d0e9e5a-a6d3-49f5-83b2-bfb260c2b143 fwd =“ 54.198.238.84” dyno = connect = service = status = 503字节= protocol = http 2019-09-27T00:20:20.590533 + 00:00 heroku [router]:at =错误代码= H10 desc =“应用程序崩溃”方法=获取路径=“ /” host = obscure-beyond-78036.herokuapp.com request_id = 3bc112eb-37b7-4138-b163-c767b275daf3 fwd =“ 73.244.194.180” dyno = connect = service = status = 503字节= protocol = http 2019-09-27T00:20:21.091296 + 00:00 heroku [router]:at =错误代码= H10 desc =“应用程序崩溃”方法=获取路径=“ / favicon.ico” host = obscure-beyond-78036.herokuapp.com request_id = f4968a6d-6838-4d21-b4e0-9ff361b6f18d fwd =“ 73.244.194.180” dyno = connect = service = status = 503字节= protocol = http
heroku run rails db:migrate
»错误:缺少必需标志:
»-a,--app对以下应用运行命令的APP应用
»有关--help
期望将代码部署到heroku以运行该应用程序。
答案 0 :(得分:0)
请使用此命令进行迁移
heroku运行rake db:migrate --app your_app_name
或
heroku git:remote --app YOUR_APP_NAME --remote environment_name(例如测试,开发,生产)