Created
April 29, 2012 21:22
-
-
Save foca/2553330 to your computer and use it in GitHub Desktop.
Completely confounded by Rails 3.2.3, the asset pipeline, and a custom asset host :-(
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/environments/production.rb | |
# Enable serving of images, stylesheets, and JavaScripts from an asset server | |
config.action_controller.asset_host = "//#{ENV.fetch("FOG_DIRECTORY")}.s3.amazonaws.com" | |
# app/views/layouts/application.erb | |
<%= javascript_include_tag :application %> | |
# Resulting HTML (in heroku, with RAILS_ENV=production): | |
<script src="/assets/application-7ab84bc8e150bcc5d29d61ca6dce119e.js" type="text/javascript"></script> | |
# WTF, Rails, WTF?! (aka: what am I missing?!) Why isn't the asset served from "//blah.s3.amazonaws.com"?!?!?! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment