0

在添加之前,我的部署很好......我将以下代码添加到 routes.rb 中,在开发中运行良好,但是在远程服务器 w Capistrano 上再次部署时,部署失败:

routes.rb
   Workshop::Application.routes.draw do

    if Rails.env.production?
      offline = Rack::Offline.configure :cache_interval => 120 do      
         cache ActionController::Base.helpers.asset_path("application.css")
         cache ActionController::Base.helpers.asset_path("application.js")
         # cache other assets
         images = ["favicon.ico", "empty_boxes.png", "isabelle.png", "loading.gif", "errors/not_found.jpg", "errors/access_denied.jpg", "gallery/black.png"]
         images.each do |image|
           cache ActionController::Base.helpers.asset_path(image)
          end
         ...
      end 
      ... other routes ..
   end

部署错误与任何缓存操作有关是这个块:

  * executing "cd -- /var/www/vhosts/ceramique-isabelle.fr/rails/workshop/
   releases/2013.... && bundle exec rake RAILS_ENV=production 
    RAILS_GROUPS=assets assets:precompile && cp --
  /var/www/vhosts/ceramique-isabelle.fr/rails/workshop/shared/assets/manifest.yml
 /var/www/vhosts/ceramique-isabelle.fr/rails/workshop/releases/2013../assets_manifest.yml"

  servers: ["ceramique-isabelle.fr"]
       [ceramique-isabelle.fr] executing command
       ** [out :: ceramique-isabelle.fr] rake aborted!
        [out :: ceramique-isabelle.fr] application.css isn't precompiled

如果我抑制了一些缓存行,那么它会在以下情况下失败

        [out :: ceramique-isabelle.fr] application.js isn't precompiled
         or removing the cache for application.js , it fails on the nex ...
        [out :: ceramique-isabelle.fr] favicon.ico isn't precompiled

有没有办法避免这个错误..我会尝试部署这个块然后再次插入它并再次重新部署,但我想它也会在远程服务器预编译期间失败

4

1 回答 1

1

它与此块无关.....而是与 css 预编译错误有关...我尝试在本地进行预编译,但出现错误

“...-border-radius:”后的无效 CSS:预期的伪类或伪元素,为“10px;”

去哪里搜索并修改它....

对不起坏道

于 2013-01-25T17:52:46.823 回答