Skip to content

Instantly share code, notes, and snippets.

@mcollina
Created March 25, 2011 08:50
Show Gist options
  • Save mcollina/886560 to your computer and use it in GitHub Desktop.
Save mcollina/886560 to your computer and use it in GitHub Desktop.
Not working rack pagespeed application
*~
public/rack-*
rvm use --create @page-rackspeed-bug
alert("hello world");
require 'rubygems'
require 'bundler/setup'
require 'sinatra'
require 'rack/pagespeed'
require 'haml'
public_dir = File.join(File.dirname(__FILE__), "public")
use Rack::PageSpeed, :public => public_dir do
store :disk => public_dir
minify_javascripts
combine_javascripts :hash => { %w(/a.js /b.js) => "app" }
end
get '/' do
haml :root
end
alert("hello world bis");
source :rubygems
gem 'sinatra'
gem 'haml'
# I'm using this because I can't build memcached on my machine
gem 'rack-pagespeed', :git => "git://github.com/mcollina/rack-pagespeed.git"
GIT
remote: git://github.com/mcollina/rack-pagespeed.git
revision: f491ac696ff73a843a356d5b46aca2c763d9f20d
specs:
rack-pagespeed (1.0.3)
jsmin (= 1.0.1)
jsmin (= 1.0.1)
mime-types (= 1.16)
nokogiri (= 1.4.4)
nokogiri (= 1.4.4)
rack (= 1.2.1)
rack (= 1.2.1)
GEM
remote: http://rubygems.org/
specs:
haml (3.0.25)
jsmin (1.0.1)
mime-types (1.16)
nokogiri (1.4.4)
rack (1.2.1)
sinatra (1.2.1)
rack (~> 1.1)
tilt (>= 1.2.2, < 2.0)
tilt (1.2.2)
PLATFORMS
ruby
DEPENDENCIES
haml
rack-pagespeed!
sinatra
!!!
%html
%head
%title Bug Bug!
%script{:src => "/a.js"}
%script{:src => "/b.js"}
%body
Hello world
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment