我在这里需要一些帮助。我正在设置一台新的 2020 年 Macbook Pro M1。
我已经完成了在 Mac 上安装 ruby/rails 的所有常规步骤,但是我无法完成rails new。在安装的以下部分后,我收到此错误:
E*****@Admins-MBP desktop % rails new testapp
create
create README.md
create Rakefile
create .ruby-version
create config.ru
create .gitignore
create .gitattributes
create Gemfile
run git init from "."
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call: …Run Code Online (Sandbox Code Playgroud) 我有一个需要更改的 shell 脚本,以便仅在环境变量的值为 时才起作用true。如果重要的话,变量将来自 Heroku。
我的脚本如下所示:
if [[ $SANDBOX_SITE = "true" ]]
then
*run existing script*
else
exit
fi
Run Code Online (Sandbox Code Playgroud)
我可以看到环境变量存在,printenv并且我运行了脚本heroku run bash --app *appname*,所以我知道它位于正确的 shell 中。任何提示或建议将不胜感激。
*编辑
我忘了添加,脚本每次都会退出。