"耙子中止!堆栈级别太深"部署到 Heroku 时 [英] "rake aborted! stack level too deep" while deploying to Heroku

查看:14
本文介绍了"耙子中止!堆栈级别太深"部署到 Heroku 时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站曾经可以运行,Heroku 预编译了资产和所有内容.现在,似乎无处不在,我开始在部署时收到此消息:

My website used to be working and Heroku precompiled the assets and everything. Now, seemingly out of nowhere, I started to get this message on deploy:

Preparing app for Rails asset pipeline
Running: rake assets:precompile
mkdir -p /tmp/build_31cexir1p9pwn/public/assets
mkdir -p /tmp/build_31cexir1p9pwn/public/assets/icons
mkdir -p /tmp/build_31cexir1p9pwn/public/assets/icons
mkdir -p /tmp/build_31cexir1p9pwn/public/assets
mkdir -p /tmp/build_31cexir1p9pwn/public/assets
(in /tmp/build_31cexir1p9pwn)
mkdir -p /tmp/build_31cexir1p9pwn/public/assets
mkdir -p /tmp/build_31cexir1p9pwn/public/assets
rake aborted!
stack level too deep
(in /tmp/build_31cexir1p9pwn/app/assets/stylesheets/theme.css.scss)

(See full trace by running task with --trace)
Precompiling assets failed, enabling runtime asset compilation
Injecting rails31_enable_runtime_asset_compilation

它无法预编译我的 css 文件.

It can't precompile my css file.

我正在使用 cedar stack,这是我的 gemfile:

I'm using cedar stack and this is my gemfile:

gem 'rails', '3.1.0'
gem 'rake', '0.8.7'
gem 'devise'

group :production do
  gem 'pg'
  gem 'thin'
end

group :assets do
  gem 'sass-rails', "  ~> 3.1.0"
  gem 'coffee-rails', "~> 3.1.0"
  gem 'uglifier'
end

这是我的 application.rb 文件

Here's my application.rb file

# Enable the asset pipeline
config.assets.enabled = true

# Version of your assets, change this if you want to expire all your assets.
config.assets.version = '1.0'

这是我的 production.rb 文件

And here's my production.rb file

# Code is not reloaded between requests
config.cache_classes = true

# Full error reports are disabled and caching is turned on
config.consider_all_requests_local       = false
config.action_controller.perform_caching = true

# Enable Rails's static asset server (Apache or nginx will not need this)
config.serve_static_assets = true

# Set expire header of 30 days for static files
config.static_cache_control = "public, max-age=2592000"

# Allow JavaScript and CSS compression
config.assets.compress = true

# Compress JavaScript by removing whitespace, shortening variable names, ...
config.assets.js_compressor = :uglifier

# Don't fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = true

现在我所有的图片链接都被破坏了(我在我的 css 文件中使用了 image-url()).可能是什么问题,我该如何解决?

Now all my links to images are broken (I'm using image-url() in my css file). What could be the problem and how do I fix it?

推荐答案

我真的很绝望所以我问了另一个问题.显然这是由 sass 引起的,降级到 sass-rails v3.1.4 v3.2.5 将使其工作.

I was truly desperate so I asked another question. Apparently this is caused by sass and downgrading to sass-rails v3.1.4 v3.2.5 will make it work.

这篇关于"耙子中止!堆栈级别太深"部署到 Heroku 时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆