Skip to content

Instantly share code, notes, and snippets.

@mferrier
Created January 27, 2012 18:55
Show Gist options
  • Save mferrier/1690318 to your computer and use it in GitHub Desktop.
Save mferrier/1690318 to your computer and use it in GitHub Desktop.
disabling engineyard asset pipeline precompilation
13:04 < mferrier> Hey guys, on the rails 3.1 stack, anyone know how I would prevent the asset pipeline precompile from running?
13:06 < emachnic> mferrier: http://docs.engineyard.com/asset-pipeline.html
13:08 < mferrier> so I read, but I still want to be able to use the asset pipeline.
13:08 < mferrier> I just don't want the precompile step during deployments.
13:10 < emachnic> mferrier: Should be able to set config.assets.precompile to false IIRC
13:15 < mferrier> ah, I'm not explaining properly. I'm precompiling locally and committing the result into the repo. So I still want to be able to rake assets:precompile locally, but just not have that task happen in the engineyard stack.
13:15 < mferrier> changing the rails asset pipeline setup will prevent the local precompilation.
13:15 < emachnic> mferrier: Ahh. Let me check real quick
13:20 < adamholt> emachnic: mferrier: if you add your assets to public/assets we skip compiling them on the server - https://github.com/engineyard/engineyard-serverside/blob/master/lib/engineyard-serverside/rails_asset_support.rb#L30-32
13:20 < adamholt> committed to your git repo that is
13:20 < emachnic> Thanks adamholt
13:21 < adamholt> np emachnic
13:21 < emachnic> adamholt: So therefore, precompiling locally and committing should in essence take care of itself
13:22 < mferrier> looks good, thanks
13:22 < adamholt> yeah, it should skip the precompilation, if it's not doing that, then you should file a ticket
13:50 < mferrier> adamholt: one extra thing, we don't use the standard public/assets path for our asset pipeline. Is there any easy way for that stack to check the value of config.assets.prefix ?
13:51 < adamholt> no, not currently mferrier, however it only checks that there is a directory there, you can just add a .gitkeep file to it, and it will skip it
13:51 < adamholt> doesn't need to have any assets in it
13:52 < mferrier> yeah. just making sure that doesn't interefere with our routes.
13:53 < adamholt> i shouldn't do, as nginx will only try to match the files within it, if not, then it will hand it off to rails
13:53 < mferrier> oh, yeah? I thought maybe for /assets it would try to do a directory listing or something
13:53 < mferrier> cool, thanks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment