私のウェブサイトは正常に動作していましたが、Herokuは資産やすべてをプリコンパイルしていました。今や外見上どこからも外れて、私はrake aborted! stack level too deep
を展開し始めました。私application.cssファイルから行*= require_tree .
を削除rake assets:herokuでプリコンパイルが動作していません
はstack level too deep
を修正するようだが、その後、私はこれを取得:画像へ
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)
すべての私のリンクが壊れている(私が)(画像のURLを使用しています私のCSSファイル)。何が問題になるのか、どのように修正するのですか?
私は杉スタックを使用していますし、これが私の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
そしてここでは、Herokuので使用されるバージョンです:
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は何かを変え、突然私のアプリは動作を停止した。私が何のためにも1日を失うようにした本当に奇妙なもの。ここで終わるかもしれない人にとっては、解決策はその行を 'gem 'sass-rails'、" 3.1.4 "'に変更することでした。 – Ashitaka
ありがとう - BIGヘルプ - 同じ問題です。それが今日私が見なければならなかった最後のことは、ヒロクが失敗するのを押したことだった。 – jpwynn
私のupvoteを取ってください!ありがとう! – hajpoj