标签: precompile

在visual studio中发布网站:使用"固定命名和单页组装"?

从Visual Studio 2008创建网站时,您会看到一个包含一些选项的对话框.其中之一是"使用固定命名和单页组装".

我们没有启用,但这个选项的专业人士和内容是什么?性能或其他方面是否存在差异?我们应该或不应该使用这个?

如果没有这个选项,我们会在发布后在bin文件夹中获取774个文件,当我们检查它时,我们会得到1320个文件,因为每个ascx都有自己的dll.

如果我们检查一下,那么"固定名称"是否只在我的计算机上修复了?或者当同事发布网站时是否相同?

.net asp.net publish visual-studio precompile

5
推荐指数
1
解决办法
8459
查看次数

ActionView :: Template :: Error(rails.png未预编译)

我正在收到页面"我们很抱歉,但是当我尝试加载我的rails应用程序时出现了问题.当我运行时

tail -f log/production.log
Run Code Online (Sandbox Code Playgroud)

我明白了

ActionView::Template::Error (rails.png isn't precompiled)
Run Code Online (Sandbox Code Playgroud)

我跑了

 RAILS_ENV=production rake assets:precompile
Run Code Online (Sandbox Code Playgroud)

从当前目录.

ruby-on-rails precompile ubuntu-11.10

5
推荐指数
1
解决办法
4300
查看次数

为什么要耙资产:预编译需要永远?

我们的RoR应用程序使用了很多需要预编译的资产.通常需要几分钟assets:precompile才能运行.

然而最近发生了一件非常奇怪的事情:简单rake assets:precompile永不结束(等了几个小时).

我找到了一个解决方法:

rake assets:precompile --trace
Run Code Online (Sandbox Code Playgroud)

然而,无论如何修复它会很棒.关于某个原因的任何想法?

ruby rake assets precompile

5
推荐指数
1
解决办法
1006
查看次数

Playframework 2.1预编译ember把手

我正在尝试为PlayFramework 2.1编写一个SBT插件,它可以预编译位于app/assets/templates中的把手模板.我当然会在完成后分享这个插件.我发现这个HOWTO http://eng.netwallet.com/2012/04/25/emberhandlebars-template-precompilation-with-play/这是一个有点过时,但它是适应它玩没问题!2.1.

然后我尝试编译一个简单的模板文件,但SBT失败了以下内容:

ember: processing template test

[error] /.../templates/test.handlebars: Compilation error[unexpected exception during Ember compilation (file=/.../templates/test.handlebars, options=List(), ember=ember-1.0.0-pre.4.js): org.mozilla.javascript.EvaluatorException: missing name after . operator (ember-1.0.0-pre.4.js#3309)]

[error] (MyProject/*:play-copy-assets) @6dap83075: Compilation error in /.../templates/test.handlebars:null

[error] (MyProject/compile:resources) @6dap83075: Compilation error in /.../templates/test.handlebars:null
Run Code Online (Sandbox Code Playgroud)

第3309行的ember-1.0.0-pre.4.js有一个volatile关键字,显然是在Rhino中保留的.

我远非犀牛专家,这就是为什么我想知道是否有人知道如何解决这个问题?我现在不是在寻找5*解决方案.任何解决方案(即使是使用自定义ember.js的快速和肮脏的黑客)都有合理的机会为大多数简单的把手模板工作都可以工作,我们担心一旦功能出现并且SBT插件出来就抛光它.

提前致谢!

rhino precompile handlebars.js playframework-2.0 ember.js

5
推荐指数
1
解决办法
1342
查看次数

预编译coffeescript文件(Rails 4)

在我的Rails 4应用程序中,我有一个users.js.coffee文件app/assets/javascripts.它编译并在开发中正常工作.但是,当我部署到heroku时,它无法正常工作.据Railsguides说:

匹配器(以及预编译数组的其他成员;请参见下文)应用于最终编译的文件名.这意味着排除了编译为JS/CSS的任何内容,以及原始JS/CSS文件; 例如,.coffee和.scss文件在编译到JS/CSS时不会自动包含.

所以我在我的网站上添加了以下内容 config/environments/production.rb

config.assets.precompile += %w ( users.js.coffee )
Run Code Online (Sandbox Code Playgroud)

它仍然没有强制文件被预编译.你知道我怎么可能强迫Rails预编译它(我RAILS_ENV=production bundle exec rake assets:precompile用来预编译)?

非常感谢.

ruby-on-rails precompile coffeescript asset-pipeline ruby-on-rails-4

5
推荐指数
1
解决办法
1624
查看次数

Azure发布的不同合并设置的权衡是什么?

通过Visual Studio发布到Azure时,可以选择预编译页面。有很多选项可以解释它的功能,但是却没有权衡取舍。

  • 我为什么不勾选“允许可更新”?
  • 为什么要合并为一个文件?这样更快吗?它加载速度更快还是编译速度更快?

Microsoft网站上有一些信息,但是在上述几点上,他们并没有真正涉足其中。

https://msdn.microsoft.com/zh-CN/library/hh475319(v=vs.110).aspx

在此处输入图片说明

publish azure visual-studio precompile

5
推荐指数
1
解决办法
643
查看次数

BEGIN什么时候开始(或运行)?

这与Perl 6文档仓库中的此问题有关

实际运行BEGIN 的阶段并不太清楚.文档说"编译时间",但Perl是预编译的,因此实际上可能编译时间.事实上,让我们使用这段代码

unit module Beginner;

BEGIN {
    say "This is where all started";
}
Run Code Online (Sandbox Code Playgroud)

从这里

require Beginner;

say "Begun";
Run Code Online (Sandbox Code Playgroud)

在一个新目录(rm -rf .precomp运行).它输出:

This is where all started
Begun
Run Code Online (Sandbox Code Playgroud)

到目前为止,.precomp已经创建了保存缓存的目录.

所以让我们从这里使用它:

use Beginner;
say "Already started";
Run Code Online (Sandbox Code Playgroud)

它显然只是回归Already started.(如果我们运行第一个程序也会发生同样的情况)这可能是一个问题,因为用户可能事先不知道是否可能发生预编译,这反过来意味着它不确定何时发生"编译时间".无论如何,问题是:我们如何正确地制定这个来在文档中解释它?此外,是否应该BEGIN鼓励使用(因为计算的值将存储在预编译缓存中,从而有效地从运行时中消除)或不鼓励?这有什么好的用例吗?

perl6 precompile

5
推荐指数
1
解决办法
93
查看次数

如何禁用heroku上的资产编译?

我正在尝试使用这个turtorial将我的rails应用程序部署到heroku:

https://devcenter.heroku.com/articles/getting-started-with-rails4

所以,我使用rails 4.1.1和ruby 2.1.1

我的Gemfile gem 'rails_12factor', group: :production里面有.

我的application.rb:


require File.expand_path('../boot', __FILE__)

require 'rails/all'

Bundler.require(*Rails.groups)

module Charticus
  class Application  Rails::Application
    # Settings in config/environments/* take precedence over those specified here.
    # Application configuration should go into files in config/initializers
    # -- all .rb files in that directory are automatically loaded.

    # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
    # Run "rake -D time" for a list of tasks for …
Run Code Online (Sandbox Code Playgroud)

assets heroku precompile asset-pipeline ruby-on-rails-4

4
推荐指数
2
解决办法
4226
查看次数

如何在生产轨道中给出指纹css路径4

我正在使用imgkit我的网页快照.我跑:

RAILS_ENV=production bundle exec rake assets:precompile 预编译我的资产.

app/assets目录的所有文件都编译为public/assets application.css编译为application-7a23a105125768e41d9d24aee4553615.css.

我的控制器代码是:

  kit = IMGKit.new(render_to_string(:partial => 'form', :height => 200, :transparent => true, :quality => 10, :layout => false,:locals => {:project => @project}))
  #  t = kit.to_img(:png) 
  kit.stylesheets << "#{Rails.root.to_s}/public/assets/application.css"
  #file = kit.to_file(Rails.root + "public/pngs/" + "screenshot.png")
  file = kit.to_file(Rails.root + "public/assets/" + "screenshot.png")
  #send_file("#{Rails.root.to_s}/public/pngs/screenshot.png", :filename => "screenshot.png", :type => "image/png",:disposition => 'attachment',:streaming=> 'true')
Run Code Online (Sandbox Code Playgroud)

我不知道怎么解决/public/assets/application.css没找到错误...

没有这样的文件或目录 - public/assets/application.css

我正在使用https://github.com/csquared/IMGKit/issues/36获取css并在我的快照中工作

编辑

def …
Run Code Online (Sandbox Code Playgroud)

ruby-on-rails heroku precompile ruby-on-rails-4 imgkit

4
推荐指数
1
解决办法
881
查看次数

错误:Sprockets :: FileNotFound:找不到Heroku的文件'application.scss'

我有一些问题,Sprockets在rake资产期间找不到文件:precompile.我之前没有遇到过这个问题,但是当我添加了一个生成的迁移(本地构建)时,Heroku无法构建我的应用程序,我不知道为什么,因为它在本地构建(没有我运行额外的rake资产:预编译).

错误信息是这样的:

-----> Preparing app for Rails asset pipeline
       Running: rake assets:precompile
       rake aborted!
       Sprockets::FileNotFound: could not find file: /tmp/build_dd4a799769e6963b7b292df72db58fd8/username-appname-uniqueid/app/assets/stylesheets/application.scss
Run Code Online (Sandbox Code Playgroud)

有什么帮助吗?感谢您的时间!

PS.作为旁注 - 当我运行"rake assets:precompile"然后推送到Heroku时,应用程序会构建.然而,一个css类"fa-bars"的项目搞砸了......为什么会这样?

谢谢!

assets ruby-on-rails heroku precompile sprockets

3
推荐指数
1
解决办法
775
查看次数