Thirdparty js files should be in your vendor folder. Once you precompile them for production they will be then moved into your public folder automagically. To call certain files on specific pages you need to remove the require_tree directive and also pay attention to which files are called in your application.js asset file. At the bottom of every view page (html.erb) you can add the following to run only page specific js:
Then in your application/layout view at the bottom before the closing body tag you should add:
This will then run any js on a page by page view basis and include any require statements for any files in the corresponding controller's js asset file.