assets - Rails 3.2 including vendor 3rd party javascripts -
i have file called hammer.js within vendor folder keep 3rd party js in vendor/assets/javascripts , home made stuff in app/assets/javascripts.
but when precompiling assets rails won't fetch assets vendor. within manifest file have specified //= require vendor didn't work tried //= require hammer , tried //= require hammer.js read these solutions seemed work other people. not loading @ all
note: bundle exec rake assets:precompile each time , check public assets , render page , @ loaded resources each time try alternative.
edit:
//= require jquery //= require jquery.ui.all //= require jquery_ujs //= require_tree ../../../vendor/assets/javascripts //= require_tree . so tried this. still not loading
within config/environments/production.rb have following
# code not reloaded between requests config.cache_classes = true # full error reports disabled , caching turned on config.consider_all_requests_local = false config.action_controller.perform_caching = true # disable rails's static asset server (apache or nginx this) config.serve_static_assets = false # compress javascripts , css config.assets.compress = true # don't fallback assets pipeline if precompiled asset missed config.assets.compile = false # generate digests assets urls config.assets.digest = true sorry first time have set js in rails.
try loading them follows (note path):
//= require_tree ../../../vendor/assets/javascripts
Comments
Post a Comment