2012-03-19 6 views
18

내 웹 사이트가 작동 중이며 Heroku가 자산과 모든 것을 사전 컴파일했습니다. 이제 아무데도 겉으로보기에 배포 할 때이 메시지를 받기 시작했습니다.Heroku에 배포하는 동안 "레이크가 중단되었습니다! 스택 레벨이 너무 높음"

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 파일을 사전 컴파일 할 수 없습니다.

나는 삼나무 스택을 사용하고 있는데이 내 gemfile입니다 : 내 production.rb 파일 것

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 파일

# 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' 

그리고

# 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()을 사용하고 있습니다). 문제점은 무엇이있을 수 있으며 어떻게 수정합니까?

+0

이 파일 인 theme.css.scss를 나열 할 수 있습니까? 자산 파이프 라인이 넘쳐 흐리게 표시됩니다. –

+1

"스택 수준이 너무 높음"오류는 실제로 응용 프로그램에 메모리가 부족한 경우입니다. 종종 많은 재귀 (스스로를 호출하는 함수)를 사용하는 프로그램의 결과이며, 파서 (SASS에서 CSS, CoffeeScript에서 JS, ERB에서 HTML로)와 같은 것들은 대개 재귀를 사용합니다. 해결 방법으로 배포하기 전에 자산을 사전 컴파일 해보십시오. Heroku 인스턴스보다 로컬 시스템에 더 많은 메모리가있을 수 있습니다. –

+0

이것은 매우 심각한 버그입니다. 그걸 github에 신고 했니? – jcollum

답변

30

저는 정말로 필사적이었습니다. 그래서 나는 asked another question입니다. 분명히 이것은 삐걱 소리와 저음 레일로 내려 가기 때문에 발생합니다. v3.1.4 v3.2.5가 작동합니다.

+0

이것은 나를 위해 일했습니다. 나는 이것이 오랫동안 문제 였고 저주 레일 마스터가 여전히이 문제를 일으킨다는 것을 조금 경솔하게 생각합니다. 어떤 일련의 사건으로 인해 발생했는지 알고 싶습니다. - \ –

0

v3.2.12 나

하지만 문제는 현재의 모든 버전에서 고정 된 것처럼 전반적으로 보이는위한 속임수를 썼는지 말대꾸 할 v3.1.4 나 :

0

업그레이드 근무 레일을 말대꾸하는 다운 그레이드 , 번들 업데이트 만하면됩니다.

1

루비 2.3.0 이하 버전의 경우 레일에 application.rb 파일이 있습니다. 그러나 2.4.0 이상은 자동화 된 것으로 구현했습니다. 2.3.0로 루비 버전을 변경

Bundler.require(*Rails.groups)

트릭을했다. 이 사람이 하루를 구 했어요.

관련 문제