I am close but seem to be missing something. I have dropped OpenLayers.js in app/assets/javascripts, the theme folder in app/assets/stylesheets and the img folder in app/assets.
I have *= require theme/default/style.css in my application.css file and //= require OpenLayers in my application.js file.
I am trying to load an OpenLayers map in my locations.js.coffee file but the img folder fails. OpenLayers tries to load the image files from /locations/img/... vs. /img/... which doesn’t seem to work either.
I am still fuzzy on the asset pipeline in Rails and I am sure I am doing this wrong. I can’t seem to find a concrete example of the best way to install OpenLayers in a Rails app. Any ideas or suggestions?
Drop the complete openlayers directory in
vendor/assets/javascripts(to save some space I made a symbolic link):Add
//= openlayers/OpenLayersto theapp/assets/javascripts/application.js: