Skip to content

Instantly share code, notes, and snippets.

@kmamykin
Created August 4, 2011 08:28
Show Gist options
  • Save kmamykin/1124723 to your computer and use it in GitHub Desktop.
Save kmamykin/1124723 to your computer and use it in GitHub Desktop.
Rails 3.1.0.rc5 setup for heroku with assets pipeline working
...
Bundler.require *Rails.groups(:assets) if defined?(Bundler)
...
# Enable the asset pipeline
config.assets.enabled = true
config.assets.precompile << "mobile.css"
config.sass.load_paths << "#{Gem.loaded_specs['compass'].full_gem_path}/frameworks/compass/stylesheets"
config.sass.load_paths << "#{Gem.loaded_specs['compass'].full_gem_path}/frameworks/blueprint/stylesheets"
gem 'rails', '3.1.0.rc5'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass', '3.1.5' # <= downgraded due to a weird interaction b/w compass blueprint and latest Sass
gem 'sass-rails', "~> 3.1.0.rc"
gem 'coffee-rails', "~> 3.1.0.rc"
gem 'uglifier'
gem 'compass', :git => 'https://github.com/chriseppstein/compass.git', :branch => 'rails31'
end
gem 'jquery-rails'
# UI gems
gem "haml"
# Compress JavaScripts and CSS
config.assets.compress = true
# Specify the default JavaScript compressor
config.assets.js_compressor = :uglifier
#<- based on http://devcenter.heroku.com/articles/rails31_heroku_cedar
config.action_dispatch.x_sendfile_header = nil
# Enable serving of images, stylesheets, and javascripts from an asset server
config.action_controller.asset_host = "xxx-your-xxx.cloudfront.net"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment