Closed rupe closed 11 years ago
Alright, I tried setting RACK_ENV=production
for the prebuild option, and now get "*\ Building /assets/style.css..." messages ????? And an empty style.496718.css file is created in my session, in a non-existent /assets folder what is going on???
I am using the pbaker repo...
Ok, fixed that with:
css :style, '/css/style.css', [ '/css/style.css' ]
Well it's not just Less, I copied a compiled style.css
file over to app/css
and changed the serve/from
to app/css
and doesn't even serve up the regular compiled css file. So my problem is with assetpack not serving up files...
I seem to have solved this by using the --all
option with bundler, so bundle package --all
has assetpack serving up style.nnnnnn.css
... so far.
And it stopped working again, don't know why. I'm moving on....
Sorry! I think less support was incomplete, should be fixed in next release.
Any timeline for next release?
Soon, but as I did a release yesterday I won't release a new one today yet, use git in your Gemfile (seems like you already do, juste update it)
Oh, great, I didn't realize there was a new release ... it had been a while :D Great work, thanks.
On Monday, January 14, 2013 at 10:31 PM, Jean-Philippe Doyle wrote:
Soon, but as I did a release yesterday I won't release a new one today yet, use git in your Gemfile (seems like you already do, juste update it)
— Reply to this email directly or view it on GitHub (https://github.com/rstacruz/sinatra-assetpack/issues/61#issuecomment-12252035).
Released today, let me know if this fixes the issue
I'm afraid I haven't even tried LESS support yet, as I'm having other problems using this gem (opening an issue now).
I just updated to the newest version of the gem (0.1.2) and LESS support is broken for me (versus gem 'sinatra-assetpack'#, :require => 'sinatra/assetpack', :git => 'git://github.com/phillbaker/sinatra-assetpack.git', :ref => "9302731670bfc2f8e4628aa7985b64929ff1e376"
where it works.)
For example (taken from sinatra),
assets do
serve '/css', :from => 'app/css'
css :styles, '/css/styles.css', [
'/css/bootstrap.css' # .less version of bootstrap
]
css_compression :less
end
Leads to
Less::ParseError - 'reset.less' wasn't found.
:
at less.Parser.parser.parse.i (.../ruby/1.9.1/gems/less-2.2.2/lib/less/js/lib/less/parser.js:390:69)
.../ruby/1.9.1/gems/less-2.2.2/lib/less/parser.rb:61:in `block in to_css'
.../ruby/1.9.1/gems/less-2.2.2/lib/less/java_script/v8_context.rb:90:in `block in do_lock'
.../ruby/1.9.1/gems/less-2.2.2/lib/less/java_script/v8_context.rb:88:in `call'
.../ruby/1.9.1/gems/less-2.2.2/lib/less/java_script/v8_context.rb:88:in `Locker'
.../ruby/1.9.1/gems/less-2.2.2/lib/less/java_script/v8_context.rb:88:in `do_lock'
.../ruby/1.9.1/gems/less-2.2.2/lib/less/java_script/v8_context.rb:60:in `lock'
.../ruby/1.9.1/gems/less-2.2.2/lib/less/java_script/v8_context.rb:30:in `exec'
.../ruby/1.9.1/gems/less-2.2.2/lib/less/java_script.rb:26:in `exec'
.../ruby/1.9.1/gems/less-2.2.2/lib/less/parser.rb:61:in `to_css'
.../ruby/1.9.1/gems/tilt-1.3.3/lib/tilt/css.rb:68:in `evaluate'
.../ruby/1.9.1/gems/tilt-1.3.3/lib/tilt/template.rb:76:in `render'
.../ruby/1.9.1/gems/sinatra-1.3.4/lib/sinatra/base.rb:711:in `render'
.../ruby/1.9.1/gems/sinatra-assetpack-0.1.2/lib/sinatra/assetpack/class_methods.rb:73:in `block (3 levels) in add_individual_routes!'
.../ruby/1.9.1/gems/tilt-1.3.3/lib/tilt.rb:127:in `fetch'
.../ruby/1.9.1/gems/sinatra-assetpack-0.1.2/lib/sinatra/assetpack/class_methods.rb:72:in `block (2 levels) in add_individual_routes!'
...[truncated backtrace]
Based on the bootstrap file that has:
@import "reset.less";
@j15e, any idea what changed that could have effected this? LESS gem is the same.
My fault, things are swell. See explanation at http://stackoverflow.com/a/12099530. Full example of Sinatra AssetPack + Less at https://gist.github.com/4652773.
Oh?!? I didn't realize there was a css_compression :less
option available, must have missed it.
I will give LESS compilation and CSS asset serving another try once I've figured out my other issue. Thanks.
Just a comment on the :less
option for css_compression
, does this really make sense? I was under the impression that this option is used to determine how the SERVED css file is compressed, not how support files are compiled or what "template language" they use. Am I looking at this the wrong way?
I cannot figure out how to do this. All my main .less files are in
/app/css/less
, with @import'ed files in/app/css/less/bootstrap
. My main stylesheet is/app/css/less/style.less
which should be compiled to '/public/css/style.css'.Using a classic Sinatra app structure, I have the following in various files (unrelated code left out): ****Gemfile
****myapp.rb
****layout.haml
Which produces this stylesheet related tag in the served up html:
but does not actually compile the file
style.49718.css
. In fact, it doesn't compile any files at all.What could be the possible cause(s)?