-
Notifications
You must be signed in to change notification settings - Fork 529
Common Issues Troubleshooting
Before you go through any of the troubleshooting make sure you've followed the Installation and Usage on the main page. This is a work on progress so if you cannot resolve your problem please see the Issues section. ##jQuery Conflict -- i.e. mercury broke my JS!
If you notice that you are getting javascript errors after installing mercury you might have a problem with your asset pipeline. This happens when you accidentally include mercury.js in your application.js file. One way this happens is by including your entire assets/javascripts directory:
//= require_directory . **Do not do this**
Mercury will call its dependencies on its own so you shouldn't include it in your JS manifest. To resolve this issue simply remove that line.
Note that you might notice other files that were automatically included aren't anymore. You can either manually include them in your manifest file or place them in a sub-folder and include that. Since its common to have your controller specific js files at that level you can add this code to your head:
<%= javascript_include_tag(controller_path) %>
This way you will automatically load each controller's unique js files. So under the Pages controller this will load assets/javascripts/pages.js.