English 中文(简体)
Heroku公司在掠夺资产和预谋资产之间的冲突
原标题:Heroku conflict between gzipping assets and precompiling assets

我在Ceroku Cedar Stack上运行了1辆铁路机3.1号。 I m 采用Rack:Deflater mediumware, g清我的内容并实现这一点

config.middleware.insert_before ActionDispatch::Static, Rack::Deflater

在我的工作过程中。 rb 档案。

However, since last week, I get the following error when deploying to Heroku

Running: rake assets:precompile
   rake aborted!
   No such middleware to insert before: ActionDispatch::Static

然而,动,的中风仍能回落。

use Rack::Cache
use Rack::Deflater
use ActionDispatch::Static
use Rack::Lock

And content served were still gzipped. However, assets were not compiled(minified) as pre-compilation failed. A manual rake precompile::asets also does not help.

因此,我假定“行动司”:在资产完工前无法提供统计。 因此,我试图插入“Rack:Rack之前的Deflater:Lock和现在我的资产都是在没有错误信息的情况下汇编的,但所使用内容却不适宜。

因此,我需要做些什么,以图谋和汇编我的资产? 我失踪了什么? 感谢。

问题回答

我仍然理解为什么Heroku不承认行动司:在资产编前的统计。 然而,Heroku民间人士确实建议解决这一问题。

Rack:Deflater mediumware需要列入编织案,而不是环境档案。 类似,

require ::File.expand_path( ../config/environment ,  __FILE__)
# Middleware to gzip content
use Rack::Deflater
run MyApplication

这样,它不会干扰资产在完工前的运行,而且仍然会影响所服务的内容。

令人非常欢迎的是,任何资源都说明如何打字和Rack:Deflater现在居住的地方。





相关问题
rails collection_select vs. select

collection_select and select Rails helpers: Which one should I use? I can t see a difference in both ways. Both helpers take a collection and generates options tags inside a select tag. Is there a ...

SSL slowness in EC2

We ve deployed our rails app to EC2. In our setup, we have two proxies on small instances behind round-robin DNS. These run nginx load balancers for a dynamically growing and shrinking farm of web ...

Auth-code with A-Za-z0-9 to use in an URL parameter

As part of a web application I need an auth-code to pass as a URL parameter. I am currently using (in Rails) : Digest::SHA1.hexdigest((object_id + rand(255)).to_s) Which provides long strings like : ...

RubyCAS-Client question: Rails

I ve installed RubyCAS-Client version 2.1.0 as a plugin within a rails app. It s working, but I d like to remove the ?ticket= in the url. Is this possible?

activerecord has_many :through find with one sql call

I have a these 3 models: class User < ActiveRecord::Base has_many :permissions, :dependent => :destroy has_many :roles, :through => :permissions end class Permission < ActiveRecord::...

Ordering a hash to xml: Rails

I m building an xml document from a hash. The xml attributes need to be in order. How can this be accomplished? hash.to_xml

Text Editor for Ruby-on-Rails

guys which text editor is good for Rubyonrails? i m using Windows and i was using E-Texteditor but its not free n its expired now can anyone plese tell me any free texteditor? n which one is best an ...

How to get SQL queries for each user where env is production

I’m developing an application dedicated to generate statistical reports, I would like that user after saving their stat report they save sql queries too. To do that I wrote the following module: ...

热门标签