내 웹 사이트가 작동 중이었고 Heroku가 자산과 모든 것을 사전 컴파일했습니다. 자, 아무데도 겉으로보기에, 나는 rake aborted! stack level too deep
을 배포하기 시작했습니다. 내 application.css 파일에서 라인 *= require_tree .
삭제레이크 에셋 : heroku에서 작동하지 않는 사전 컴파일
stack level too deep
를 해결하기 위해 보이지만 나는이 얻을 : 끊어지는 이미지 (나는 이미지 URL을 사용하고 있습니다에
Running: rake assets:precompile
(in /tmp/build_b8o2t4k8frce)
/usr/local/bin/ruby /tmp/build_b8o2t4k8frce/vendor/bundle/ruby/1.9.1/bin/rake assets:precompile:nondigest RAILS_ENV=production RAILS_GROUPS=assets
(in /tmp/build_b8o2t4k8frce)
내 모든 링크를() 내 CSS 파일). 문제점은 무엇이있을 수 있으며 어떻게 수정합니까? 여기에게 Heroku에 의해 사용되는 버전입니다
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
그리고 :
나는 삼나무 스택을 사용하고 있는데이 내 gemfile입니다
Using rake (0.8.7)
Using rails (3.1.0)
Using sass (3.1.15)
Using sass-rails (3.1.6)
것은 여기 내 application.rb 파일의
if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
Bundler.require *Rails.groups(:assets => %w(development test))
# If you want your assets lazily compiled in production, use this line
# Bundler.require(:default, :assets, Rails.env)
end
module App
class Application < Rails::Application
# 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'
end
end
내 production.rb 파일은
입니다.# 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
# Generate digests for assets URLs
config.assets.digest = true
와우, 그게 다야! 그것은 그것을 고쳤다! 것은, 나는 초보자이고 나는이 줄'gem 'sass-rails', "~> 3.1.0"이 보석 버전이 잠겨 있음을 의미한다고 생각했지만, 분명히 물결 모양의 해시 로크 (또는 이름이 무엇이든간에) 보석이 업데이트됩니다.어쩌면 그게 무슨 일이 있었는지, 아마 내부적으로 Heroku가 뭔가를 바꿨고 갑자기 내 앱이 작동을 멈췄을 수도 있습니다. 정말 이상한 물건으로 인해 하루 종일 아무것도 잃지 않았습니다. 여기에서 끝날지 모르는 누군가를 위해, 해결책은 그 줄을'gem 'sass-rails', "3.1.4"'로 바꾸는 것이 었습니다. – Ashitaka
감사합니다 - 큰 도움 - 동일한 문제, 아무데도. 그게 오늘 내가 볼 필요가 있었던 마지막 것이 었습니다. – jpwynn
제발, 내 upvote 받아! 감사! – hajpoj