New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What do you suggest to disable asset_sync? (precompile => PhoneGap) #66
Comments
You'd likely want a custom Rakefile that only enhances the assets:precompile task for deployment environments. Check out the existing Rakefile and basically add an asset_sync.rake in your project and wrap it with an if clause for something like ENV['RAILS_ENV'] == 'production' We could perhaps bring this into the gem somehow, but I'm not sure what assumptions I want to make on this... On Tuesday, 24 April 2012 at 18:56, Mathieu Martin wrote:
|
Holy Guacamole, thanks for the quick response :-) I'm actually in the process of testing a patch that would add a config option named "enabled" that would of course default to true. I'll let you know if it works to my liking. If so, feel free to merge, comment or ignore :-) Cheers |
Let me know what you think. I'll amend the commit based on your feedback if you think this has value. |
Closing this in favor of the pull request. |
Useful when precompiling to export to a hybrid mobile app such as PhoneGap. Would fix issue AssetSync#66.
Hey guys,
I love the simplicity of asset_sync. I've recently set it up to deploy my mobile web app's assets to a CDN and it works like a charm!
However I need to precompile my assets for a PhoneGap app, and I can't find any obvious way to simply turn off AssetSync in that scenario.
I've created a dummy config/environments/hybrid.rb to tweak the asset pipeline for my app's needs.
I've tried creating config/initializers/asset_sync.rb and wrapping the config block in a if that checks for the proper Rails.env, but precompilation still fails with
Fog provider can't be blank, Fog directory can't be blank
.Any suggestions?
I'm currently looking at the code to see if I can figure out a clean patch I could contribute. But if you already have something in mind, I'd love to hear about it.
Thanks!
The text was updated successfully, but these errors were encountered: