couldn't find file 'jquery' with type 'application/javascript'
I am following RoR 4. I came across the same error couldn't find file 'jquery' with type 'application/javascript'
. I did the following and was successful in running my app
gem 'jquery-rails'
andgem 'turbolinks'
bundle update
bundle install
This occurs often times because the Gemfile lacks the gems needed for the jquery dependencies to resolve themselves.
In Rails 5.x, add this to the Gemfile:
gem 'jquery-rails', '~> 4.3', '>= 4.3.3'gem 'rails-ujs', '~> 0.1.0'
After this, run bundle Install.
Restart the server for it to update the latest changes and voila, it works!
This is caused because of default javascript runtimes that are already available in Windows but has some compatibility issues. The most easy workaround is to install nodejs from http://nodejs.org/download/
and then restart your PC. This solves all the issues.
For more details about the issue, please refer to this page : ExecJS::RuntimeError on Windows trying to follow rubytutorial