Questions tagged [sinatra-assetpack]

Sinatra-Assetpack is a Ruby gem that serves up CSS, JS, and image files to your Sinatra app, It minifies your production CSS and JS, enables "cache busting" for all files, and includes LESS, SCSS/SASS, and CoffeeScript support.

20 questions
4
votes
1 answer

Sinatra assetpack not compiling sass to css

I have a basic Sinatra app and I am attempting to use AssetPack to serve my assets. I am currently only trying to serve css files from sass files. I am including the sass gem. Snippit from my app.rb file: register Sinatra::AssetPack assets { css…
Mike Bonds
  • 1,020
  • 10
  • 16
3
votes
1 answer

Sinatra-Assetpack not serving js files

This should be pretty easy, but it's simply not working. Running Padrino with sinatra-assetpack. All css files serve perfectly like this: serve '/stylesheets', from: '/app/stylesheets' css :shared, [ '/stylesheets/reset.css', …
Ronze
  • 1,544
  • 2
  • 18
  • 33
3
votes
1 answer

Clearing out Sinatra Assetpack asset pipeline

I'm playing around with this package of Sinatra and Coffeescript and can't seem to clear the asset pipeline. When I update backbone.js to the most recent version, the app (run with shotgun watch) continues to serve the version of backbone.js that…
CamelBlues
  • 3,444
  • 5
  • 29
  • 37
3
votes
2 answers

How do I get Twitter Bootstrap's Less files to work with Sinatra AssetPack?

I am trying to get Bootstrap's Less files working with Sinatra AssetPack, but I am getting Less parser errors. These errors lead me believe that the less files being imported through bootstrap.less are not aware of each other. I have an app.rb…
Eric Levine
  • 13,536
  • 5
  • 49
  • 49
2
votes
1 answer

Sinatra app - Where to place Zurb Foundation?

I am following this sinatra recipe (Foundation framework + Compass) and have always been unsure, when implementing foundation, of where I should place these files. My Sinatra app has the…
waffl
  • 5,179
  • 10
  • 73
  • 123
2
votes
1 answer

Sinatra LoadError

While working on a Sinatra App, I came about a peculiar problem, hopefully which someone could help me out with. I'm running ruby 1.9.3 and when I run my app using ruby myapp.rb It runs on the localhost with an error. However when I tried sudo ruby…
kkaul
  • 147
  • 1
  • 2
  • 13
2
votes
2 answers

How do I turn off logging for asset requests with thin and sinatra?

I'm using sinatra/assetpack and thin. How do I turn off logging the asset requests like quiet assets for Rails?
AJcodez
  • 31,780
  • 20
  • 84
  • 118
2
votes
0 answers

Caching generated images with Sinatra, MiniMagick & nginx

I'm building a placeholder image site - similar enough to http://placekitten.com/ I've got a quick & dirty version working with a directory of big images, and a Sinatra route that randomises the image selection & resizes it to the right…
Jon Gold
  • 1,173
  • 12
  • 17
2
votes
2 answers

Sinatra-assetpack not compiling Less files in Classic type Sinatra app

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…
Gus Shortz
  • 1,711
  • 1
  • 15
  • 24
1
vote
1 answer

Sinatra asset pipeline gem, compiles to an empty .json

I'm trying to get sinatra-asset-pipeline to work for my Sinatra application, so I can get my assets to display on Heroku. I'm following a MVC pattern and is currently storing my assets inside project-folder/assets/stylesheets/application.scss. My…
scarsam
  • 325
  • 1
  • 12
1
vote
2 answers

Can't precomile sinatra assets via ansible

I am deploying my sinatra project via ansible, and one of the tasks is precompiling assets. At first I stacked into question how to initialize rbenv properly. Then, what I did is: - name: Precompiling assets command: bash -lc "cd {{ build_path }}…
Nick Roz
  • 3,918
  • 2
  • 36
  • 57
1
vote
0 answers

Sinatra Asset Pack isn't Cache Busting @imported files

I have a Sinatra app with an application.scss file which @imports all of the rest of the app's SCSS files. It uses the Sinatra asset pack. In the layout.erb file I have: <%= css :application %> Sinatra changes the URL of the compiled CSS file…
Gil Birman
  • 35,242
  • 14
  • 75
  • 119
1
vote
1 answer

Sinatra, Compass + Asset Pack

So I'm trying to use Compass and Asset Pack in a Sinatra app. My setup is the following: require 'sinatra' require 'bundler' require 'sinatra/assetpack' require 'sinatra/support' require 'compass' class Application < Sinatra::Base register…
Synthesezia
  • 291
  • 2
  • 12
1
vote
1 answer

Accessing the request object with AssetPack in Sinatra

I'm using AssetPack to handle public assets on my Sinatra app. Because the app work as a embeddeable ad on sites, I need to declare css assets route absolute. This is my current code: require 'rubygems' require 'sinatra' require 'rack' require…
Martin
  • 11,216
  • 23
  • 83
  • 140
1
vote
1 answer

Scss/Sass not working with sinatra-assetpack

I'm writing a classic style sinatra app, and trying to package my scss files with sinatra-assetpack, but it's not working. This is my main web file: require 'rubygems' require 'sinatra' require 'haml' require 'sass' require 'compass' require…
zlog
  • 3,316
  • 4
  • 42
  • 82
1
2