Ruby on Rails
Saturday, August 3, 2013
I'm trying to use D3, a javascript data visualization library in my rails app. The problem is that I can't figure out where to put the d3.js source and my .json data so that rails will serve it.
My problem is in the way d3 issues a GET request when it looks for my json and d3.js files.
Things I tried:
- setting up a static pages folder that is served with high_voltage gem. This didn't work for me as I couldn't get around my application layout so it wrapped my js and json in html. I think this is why this didn't work.
- putting the files to be served in the public folder. This didn't work because it couldn't find the routes for the public folder. I did turn on config.serve_static_assets in the production enviroment config file.
Thanks,
Ryan
-- Ryan
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/7835d828-e964-4e5b-a98b-489b37a0303c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment