Skip to content

Instantly share code, notes, and snippets.

@noahhendrix
Forked from mbleigh/Gemfile
Created March 25, 2012 02:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save noahhendrix/2190816 to your computer and use it in GitHub Desktop.
Save noahhendrix/2190816 to your computer and use it in GitHub Desktop.
Non-Rails Rackup with Sprockets, Compass, Handlebars, Coffeescript, and Twitter Bootstrap

You can setup this like so:

  • app/assets
    • images
    • javascripts: application.js.coffee
    • stylesheets: application.css.sass
  • public: index.html
  • config.ru
  • Gemfile
@import "compass"
@import "bootstrap"
#= require bootstrap
require 'bundler'
Bundler.require :default, (ENV['RACK_ENV'] || 'development')
map '/assets' do
environment = Sprockets::Environment.new
environment.append_path 'app/assets/javascripts'
environment.append_path 'app/assets/stylesheets'
environment.append_path 'app/assets/templates'
# Adds Twitter Bootstrap Javascripts
environment.append_path Compass::Frameworks['bootstrap'].templates_directory + '/../vendor/assets/javascripts'
run environment
end
run lambda{|env| [200, {}, ['hello world']]}
source :rubygems
gem 'sprockets'
gem 'sprockets-sass'
gem 'sass'
gem 'compass'
gem 'bootstrap-sass'
gem 'coffee-script'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment