precompile

rake assets:precompile throws Sass::SyntaxError: Invalid CSS after “*/”

一曲冷凌霜 提交于 2019-12-04 17:55:05
问题 I hope this isn't a duplicate problem; I've tried other solutions on SO with no effect When pushing my app to Heroku, the push has failed because application.css has not been able to compile. My terminal output: Running: rake assets:precompile rake aborted! Sass::SyntaxError: Invalid CSS after " */": expected selector, was "@font-face" (in /tmp/build_17e92975-ae8d-446f-8678-110eeeccfb64/app/assets/stylesheets/adminsite/application.css) (sass):1845 Attempts at solution I've searched and

config.assets.precompile not adding vendor/gem assets

北城余情 提交于 2019-12-04 00:13:37
I'm having trouble getting vendorized assets to be compiled as root files. I want to have the following assets available standalone (not packaged with other assets_: vendor/gems/neo-viz/app/assets/stylesheets/neo-viz.css.scss vendor/gems/neo-viz/app/assets/javascripts/neo-viz.js.coffee vendor/gems/neo-viz/app/assets/javascripts/lib/jQuery/jquery-1.6.1.min.js vendor/gems/neo-viz/app/assets/javascripts/lib/arbor/arbor.js With the following line: config.assets.precompile += %w( jquery-1.6.1.min.js arbor.js neo-viz.js neo-viz.css ) Only the css file is precompiled and made available. Why? Also,

Sprockets::FileNotFound: couldn't find file 'jquery.ui.all' on Rails 4

浪尽此生 提交于 2019-12-03 19:34:29
问题 Sprockets::FileNotFound: couldn't find file 'jquery.ui.all' I attempted all recommendations found so far. None of them works for me. I cannot run anymore the program in development and as such I cannot anymore make a new deployment online. Gemfile source 'https://rubygems.org' ruby '2.0.0' gem 'rails', '4.0.0' gem 'bcrypt-ruby', '3.0.1' gem 'faker', '>=1.1.2' gem 'pg', '>=0.15.1' gem 'uglifier', '>=2.1.1' gem 'coffee-rails', '>=4.0.0' gem 'jbuilder', '~> 1.2' gem 'activerecord-import', '>=0.4

Modern C++: initialize constexpr tables

折月煮酒 提交于 2019-12-03 16:17:11
问题 Suppose I have a class X , which functionality requires a lot of constant table values, say an array A[1024] . I have a recurrent function f that computes its values, smth like A[x] = f(A[x - 1]); Suppose that A[0] is a known constant, therefore the rest of the array is constant too. What is the best way to calculate these values beforehand, using features of modern C++, and without storaging file with hardcoded values of this array? My workaround was a const static dummy variable: const bool

rake assets:precompile throws Sass::SyntaxError: Invalid CSS after “*/”

本小妞迷上赌 提交于 2019-12-03 12:27:19
I hope this isn't a duplicate problem; I've tried other solutions on SO with no effect When pushing my app to Heroku, the push has failed because application.css has not been able to compile. My terminal output: Running: rake assets:precompile rake aborted! Sass::SyntaxError: Invalid CSS after " */": expected selector, was "@font-face" (in /tmp/build_17e92975-ae8d-446f-8678-110eeeccfb64/app/assets/stylesheets/adminsite/application.css) (sass):1845 Attempts at solution I've searched and deleted every instance of "*/" that comes before an @font-face inside the ../stylesheets/adminsite/ directory

Modern C++: initialize constexpr tables

元气小坏坏 提交于 2019-12-03 04:47:38
Suppose I have a class X , which functionality requires a lot of constant table values, say an array A[1024] . I have a recurrent function f that computes its values, smth like A[x] = f(A[x - 1]); Suppose that A[0] is a known constant, therefore the rest of the array is constant too. What is the best way to calculate these values beforehand, using features of modern C++, and without storaging file with hardcoded values of this array? My workaround was a const static dummy variable: const bool X::dummy = X::SetupTables(); bool X::SetupTables() { A[0] = 1; for (size_t i = 1; i <= A.size(); ++i)

Excluding files from assets:precompile in rails

假装没事ソ 提交于 2019-12-02 23:31:47
I use codekit for writing less which it then converts to css automatically. I don't want rails to convert my less files to css, I rather codekit do it. if I precompile the assets via rake assets:precompile I get rake aborted! cannot load such file -- less How do I exclude a specific folder/file types from precompiling? (all my less files are in app/assets/stylesheets/less and the css (which I do want to be precompiled) are in app/assets/stylesheets/css update deleting application.less solves this but how do I excluding it from processing in the first place? From the Asset Pipeline guide: The

put /assets in .slugignore for Heroku deployments with asset_sync (S3/CDN)

老子叫甜甜 提交于 2019-11-30 15:23:41
I am not sure if there is an existing way to do this but with asset_sync the idea is that assets are served from S3 or some CDN(e.g. cloudfront) thus not needing to be part of the application slug. Is it possible to have /assets in .slugignore on Heroku and still get asset:precompile and asset_sync to work? If I just put /assets in .slugignore, they are not compiled with the digest and references to assets are without the fingerprint and thus don't work. Editing .slugignore don't work there, because excluding files begins before all compilation steps on Heroku. But we need to compile these all

Sprockets::FileNotFound: couldn't find file 'jquery.ui.all' on Rails 4

守給你的承諾、 提交于 2019-11-30 09:06:52
Sprockets::FileNotFound: couldn't find file 'jquery.ui.all' I attempted all recommendations found so far. None of them works for me. I cannot run anymore the program in development and as such I cannot anymore make a new deployment online. Gemfile source 'https://rubygems.org' ruby '2.0.0' gem 'rails', '4.0.0' gem 'bcrypt-ruby', '3.0.1' gem 'faker', '>=1.1.2' gem 'pg', '>=0.15.1' gem 'uglifier', '>=2.1.1' gem 'coffee-rails', '>=4.0.0' gem 'jbuilder', '~> 1.2' gem 'activerecord-import', '>=0.4.1' gem 'rubyzip2' gem 'date_validator' gem 'psych', '~> 2.0.5' gem 'json', '>=1.8.1' gem 'turbolinks',

put /assets in .slugignore for Heroku deployments with asset_sync (S3/CDN)

*爱你&永不变心* 提交于 2019-11-29 22:10:10
问题 I am not sure if there is an existing way to do this but with asset_sync the idea is that assets are served from S3 or some CDN(e.g. cloudfront) thus not needing to be part of the application slug. Is it possible to have /assets in .slugignore on Heroku and still get asset:precompile and asset_sync to work? If I just put /assets in .slugignore, they are not compiled with the digest and references to assets are without the fingerprint and thus don't work. 回答1: Editing .slugignore don't work