I am currently develoing a Rails application which makes heavy use of some javascript libraries, including jquery, backbone.js and d3.js. For jquery, there is the jquery-rails gem, for backbone, we have backbone-rails. But nothing like this exists for d3.js.
I copied the javascript from d3.js to my repository, this feels a bit unclean to me though, because when d3 gets updated, I have to copy it again (and I have to notice, that d3 got updated!). I thought about git submodules, but I have to pull them manually every time I check out the repository. May be there is way to let bundler check out a specific release of the d3 repository?
How do you handle updating third-party javascript libraries in rails? Is there a preferred way?
Why not create a d3-rails gem if there isn’t one? The convention now seems to be to put these javascript libraries in their own gems with jquery-rails now included in Rails 3.1. It’s more work now but it might payoff for you down the road. You would be helping the community and it would make for easy updates within your app.