Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7790257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:31:49+00:00 2026-06-01T21:31:49+00:00

I use Rails 3.2.2 on Heroku with CDN (CloudFront) to host assets. I try

  • 0

I use Rails 3.2.2 on Heroku with CDN (CloudFront) to host assets.

I try the Heroku tutorial (https://devcenter.heroku.com/articles/cdn-asset-host-rails31) with asset_sync gem.

There is no problem with the assets:precompile, all my assets are hosted on my S3 bucket.

-->heroku run bundle exec rake assets:precompile                                                                                                                                                            
    Running bundle exec rake assets:precompile attached to terminal... up, run.1
    AssetSync: using default configuration from built-in initializer
    AssetSync: Syncing.
    Using: Manifest /app/public/assets/manifest.yml
    Uploading: assets/facebook_64-8cdc90984860efef829203e1e01aab10.png
    Uploading: assets/google_64-11634a6b4a219799449e7a7157f73387.png
    Uploading: assets/twitter_64-657ee379209d0bb998440421b499a6a2.png
    Uploading: assets/application-699d029330a2d095a9b59006a63a7b01.js
    Uploading: assets/application-2060c0efc074ae11265455479abfb6ff.css
    Uploading: assets/back_office-ccfdd79c9b296176087815c95607f540.css
    AssetSync: Done.

The problem is that Heroku tries to access to a bad CSS files :


<link href="http://s3.amazonaws.com/annoncestest/assets/application-85cc4376a5de3b224db7c0548a44e7cb.css" media="all" rel="stylesheet" type="text/css" />

As you can see the MD5 for application CSS is not the same.

However there is no problem with JS files or other assets which are not CSS files.

On my bucket the manifest.yml refer to the good file application-2060c0efc074ae11265455479abfb6ff.css
but Heroku always tries to access to application-85cc4376a5de3b224db7c0548a44e7cb.css

I tried to set the manifest path in my production.rb with :

config.assets.manifest = "http://myapp.cloudfront.net/assets"
or
config.assets.manifest = "http://myapp.cloudfront.net/assets/manifest.yml"

Everytime css files are bad.

I have no idea what’s the problem. Any idea?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T21:31:50+00:00Added an answer on June 1, 2026 at 9:31 pm

    I solve the problem thanks to heroku support.

    First, my deployment didn’t running well because I had the famous problem during rake assets:precompile

    could not connect to server: Connection refused
    Is the server running on host "127.0.0.1" and accepting
    TCP/IP connections on port xxxx?

    To prevent this you need to set initialize_on_precompile to false in your config/application.rb (not in your config/environments/production.rb) :

    config.assets.initialize_on_precompile = false

    After that when you deploy the precompilation seems to work but there is a problem with asset_sync which not find your ENV variables (FOG_DIRECTORY and FOG_PROVIDER)

    To solve this you need to install a heroku labs with these two commands:

    heroku plugins:install https://github.com/heroku/heroku-labs.git
    heroku labs:enable user_env_compile

    And you deploy again on heroku and (theoricaly) it should work fine! (it works for me!)

    I hope this is help somebody in the future!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What is a good .gitignore to use with Rails on Heroku? *.log *.sqlite3 what
I use currently use Heroku for rails hosting which uses a Git repository for
I want to use the CSV module with rails 3.2.1 on heroku cedar, but
do you use Heroku to write Ruby on Rails app? i read about from
I use Heroku to host and deploy a lot of little apps, in the
I have a multi-tenant Rails app, hosted with Heroku at http://myapp.herokuapp.com . The tenants/accounts
I am building my first app on Heroku and learning how to use rails
I'm trying to use git push heroku master to upload my rails 3 app
I have a Rails 3.1 app deployed to Heroku. This app makes heavy use
I use Heroku to deploy my Rails apps. But I thought about learning Chef

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.