我想今天在Heroku上发布Laravel App,但是Heroku bash找不到php命令。 我在config/database.php中更新了数据库详细信息,下一步我想运行迁移,但当我转到heroku run bash和php artisan migrate --app myappname时,我只看到bash: php: command not found 我上Windows10了。
我想在Heroku上部署一个非常基本的Django应用程序。我按照说明操作,但浏览器显示Heroku错误页面,heroku日志显示
bash: gunicorn: command not found
我在requirements.txt中安装了gunicorn,并按照文档说明配置了wsgi.py和Procfile。我还能尝试什么呢?
编辑:我还尝试在Heroku (heroku run pip install gunicorn)上手动安装gunicorn,它工作得很好,所以我非常确定gunicorn已经安装好了。为什么Heroku找不到呢?
编辑2:看起来我可以手动安装gunicorn (先安
我尝试在Windows上登录到heroku。使用cmd.exe
C:\Users\Komp_1\OneDrive\PHP_projects\chatbot>heroku auth:login
Enter your Heroku credentials:
Email: sergiuszxxxi@gmail.com
Password: **********
Enter your Heroku credentials:
Email: sergiuszxxxi@gmail.com
Password: **********
Enter your Heroku credentials:
Email:
为什么heroku运行bash不能工作?
$ heroku登录
Enter your Heroku credentials.
Email: xx@yy.zz
Password (typing will be hidden):
Logged in as xx@yy.zz
$ heroku run bash
▸ No app specified.
▸ Run this command from an app folder or specify which app to use with --app APP
$ heroku run --app bash
▸ Usage:
我在Heroku中遇到了应用程序的问题,我的设置是Nginx、Docker和Php,还有一个简单的Php脚本。在Heroku中发布发布命令并打开应用程序之后,我的应用程序会在浏览器中启动,但它会崩溃。
这是原木。
2020-05-30T15:46:38.733789+00:00 heroku[web.1]: State changed from crashed to starting
2020-05-30T15:46:51.620126+00:00 heroku[web.1]: Starting process with command `nginx -g daemon\ off\;`
202
我通过heroku run bash访问了dyno,并创建了一个文件foo。然而,当我从我的应用程序中检查时,它仍然找不到foo。所以我深入研究,尝试在dyno上安装nginx,打开autoindex,我可以确认这些文件与通过heroku run bash和nginx访问的文件是不同的。为什么会这样呢?如何将文件放到显示正在运行的进程的文件系统中。
我今天注册了Heroku帐户,并在我的Mac (OSX10.10.1)上安装了工具箱。
当我打开我的航站楼时,我得到了这个:
Last login: Sun Jan 4 21:50:53 on ttys000
-bash: alias: Added: not found
-bash: alias: by: not found
-bash: alias: the: not found
-bash: alias: Heroku: not found
-bash: alias: Toolbelt: not found
Zulhilmis-MBP:~ zulhilmizainudin$
这是我的.
有几个使用heroku run的本地Linux命令不可用,例如heroku run less filename和heroku run apropos。如何获得所有可用的heroku run 命令的列表?
顺便说一下,我只是试图查看我的应用程序中的一些dir和文件,但由于某些原因,我无法使用可用的命令来查看它们。我尝试过cd my_project/my_application && ls,但由于某种原因,它只显示了my_project的ls。
我想在bash脚本中运行一些heroku命令。我知道这是完全错误的,应该参加一个课程在bash,但以下是我想要完成的。
# get the database url and assign it to a variable
URL=heroku config:get DATABASE_URL -a wt2-production
# insert the variable in another command
heroku pg:copy URL DATABASE_URL --app my-staging-app
我将如何在bash脚本中完成这一任务?
我在Windows上使用Git Bash。 我刚刚验证了我的Heroku帐户,然后打开git bash并输入: $ heroku login bash回应道: heroku: Press any key to open up the browser to login or q to exit:
Opening browser to https://cli-auth.heroku.com/auth/browser/c31ddaf9-7a55-4daf-afad-a0500e924c26
heroku: Waiting for login...
Logging in... done
Logged
我不能让Heroku在windows10的Gitbash中工作。
Gitbash version = 1.9.4.msysgit.2
错误消息:
$ heroku version
/c/Program Files (x86)/heroku/bin/../client/bin/heroku.cmd:
line 1: @echo: command not found
/c/Program Files (x86)/heroku/bin/../client/bin/heroku.cmd:
line 2: setlocal: command not found
/c/Program Files
我有一个红矿山()的安装推到Heroku (雪松堆栈)。在我本地的Redmine实例中,文件上传工作的方式是,数据库只是存储一些有关文件的数据,包括文件的名称和文件在磁盘上的位置,并且文件本身只是存储在[app-location]/files下的磁盘上(Redmine是一个rails应用程序)。当我的红矿山项目被推到Heroku时,files目录就找不到了。根据我所读到的关于Heroku文件系统的文章,这并不奇怪。但令人惊讶和困惑的是,文件上传仍然有效,而且我没有设置s3,这是Heroku上文件上传的常用建议。我检查了Heroku数据库以获得有关文件上传的数据。
以下是我找到该文件的步骤。
h
我想像Rails一样在Yii中设置资产编译和小型化。
我在考虑使用PHP扫雷器。我不想手动编译和签入Git中的资产。然而,即使它能工作,Heroku也不会出现在Git中的新文件中。为什么?
>heroku run bash
Running `bash` attached to terminal... up, run.6857
~ $ cd web
cd web
~/web $ ls
ls
MySample.php css images index.php robots.txt
assets favicon.ico index-tes
我在heroku上的帐户被暂停,我正尝试在"cmd or git bash“上删除它;但是,在我的程序中,我无法从该帐户注销。
这是我收到的错误:
$ heroku logout
C:/Users/Romantiku/.heroku/client/lib/heroku/cli.rb:30:in `rescue in start': und
efined method `styled_error' for Heroku::CLI:Class (NoMethodError)
from C:/Users/Romantiku/.heroku/client/lib
我的代码如下
#!/bin/bash
function execute_php () {
process=$(ps -A | grep php)
if [-z "$process"]; then echo "no php running" fi
}
(sleep 5 && execute_php)
我正在尝试确定命令"php“是否正在执行,但我得到了”第8行:意外令牌‘}’附近的语法错误“。
我是一个使用bash脚本的新手,即使我搜索了错误,也找不到它。
我使用的是heroku,并且我已经使用heroku run bash登录了and访问bash。我发现可以使用以下shell脚本在heroku上安装vim:
#!/usr/bin/env bash
curl https://s3.amazonaws.com/heroku-jvm-buildpack-vi/vim-7.3.tar.gz --output vim.tar.gz
mkdir vim && tar xzvf vim.tar.gz -C vim
export PATH=$PATH:/app/vim/bin
我现在想将我从Heroku上的vim中提取的文本粘贴到其他编辑器中。