A bit of background as to what is going on here might be helpful. When you push your code into Heroku a set of machines will take that code and compile it into a slug. This slug is what is deployed to the dynos when required. Due to a few reasons, these slug compilers are not aware of the application environment - this only comes into play when the slug meets the dyno. So therefore, when asset sync is trying to access your environment during the build process (which the buildpacks control if you've seen them) then it doesn't find anything.
Now, there's a couple of options round this. Firstly, you can run `heroku run rake assets:precompile` once you're up and deployed. All rake tasks have access to your environment so this will run just fine. Secondly, you can use the user-env-compile plugin that Daniel mentioned, but be aware this is beta so could be changed/yanked at any time. A third option is as Richard suggests (although only applies if using cloudfront) and let Cloudfront pull the files from your dynos first time their needed and not use asset sync at all. I guess it all depends on what your needs are. N On Fri, Apr 20, 2012 at 5:33 PM, brianthecoder <wbsmit...@gmail.com> wrote: > So I followed the guide here > https://devcenter.heroku.com/articles/cdn-asset-host-rails31, but for > some reason, during the assets:precompile rake task. Its not picking up any > of my environment variables. I even added a line to inspect the environment > variables in the asset_sync initalizer, and none of the environment > variables I have configured were in there. Am I missing something? > > -- > You received this message because you are subscribed to the Google > Groups "Heroku" group. > > To unsubscribe from this group, send email to > heroku+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/heroku?hl=en_US?hl=en > -- Neil -- You received this message because you are subscribed to the Google Groups "Heroku" group. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/heroku?hl=en_US?hl=en