无法将Rails应用推到Heroku

时间:2021-10-23 00:10:50

All of a sudden we can't push our Rails app to Heroku- it's failing the same way on both staging and production environments, as well as a new app we just set up for testing. This app has been running on Heroku for 9 months, with multiple pushes a week, without any issues, but as of yesterday, after some innocuous changes to a model file, we're getting the following error:

突然之间,我们无法将Rails应用程序推向Heroku——它在登台和生产环境以及我们刚刚为测试设置的新应用程序上都以同样的方式失败。这个应用程序已经在Heroku上运行了9个月,每周有多个推送,没有任何问题,但截至昨天,在对一个模型文件进行了一些无关的修改之后,我们得到了以下错误:

-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.0.0
-----> Installing dependencies using 1.5.2
       New app detected loading default bundler cache
       Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment sh: Syntax error: "(" unexpected
       Bundler Output:  !  !     Failed to install gems via Bundler.  !

 !     Push rejected, failed to compile Ruby app

UPDATE:
What's crazy is that we just rolled everything back to the last commit that had successfully deployed to Heroku, and it's still failing. In other words, the exact same code deployed fine a few days ago, and now we're getting this error.

更新:最疯狂的是,我们只是将所有东西回滚到成功部署到Heroku的最后一次提交中,但它仍然失败。换句话说,几天前部署的完全相同的代码,现在我们得到了这个错误。

??

? ?

1 个解决方案

#1


3  

We had similar issues with a couple of our Heroku apps. We figured out that a recent Heroku stack upgrade changed how they parse Heroku config variables. One of our variables had a double quote " that threw a syntax error when attempting to bundle. I suggest checking your Heroku config variables to make sure there is not open parenthesis or double quotes

我们的Heroku应用程序也有类似的问题。我们发现最近的Heroku栈升级改变了他们如何解析Heroku配置变量。我们的一个变量有一个双引号,“在尝试绑定时抛出语法错误”。我建议检查Heroku配置变量,以确保没有打开括号或双引号

you can check this by running heroku config

您可以通过运行heroku配置来检查这一点

#1


3  

We had similar issues with a couple of our Heroku apps. We figured out that a recent Heroku stack upgrade changed how they parse Heroku config variables. One of our variables had a double quote " that threw a syntax error when attempting to bundle. I suggest checking your Heroku config variables to make sure there is not open parenthesis or double quotes

我们的Heroku应用程序也有类似的问题。我们发现最近的Heroku栈升级改变了他们如何解析Heroku配置变量。我们的一个变量有一个双引号,“在尝试绑定时抛出语法错误”。我建议检查Heroku配置变量,以确保没有打开括号或双引号

you can check this by running heroku config

您可以通过运行heroku配置来检查这一点