Sprockets::FileNotFound
khanshakeeb opened this issue · comments
Getting an error when I have add lines into application.js file
couldn't find file 'fancybox'
(in /var/www/tumara/app/assets/javascripts/application.js:15)
can anyone help me out please
Are you running you application in the development or production environment?
A few things to check?
- Have you added
gem 'fancybox-rails
to yourGemfile
and runbundle install
? - Did you restart
rails server
after adding installing? - If running in production env have you run
bundle exec rake assets:precompile
to build the assets?
To check which paths assets are being loaded from in your application try the following:
$ rails console
> Rails.configuration.assets[:paths]
=> ["/var/www/tumara/app/assets/images", "/var/www/tumara/app/assets/javascripts", "/var/www/tumara/app/assets/stylesheets", "/var/www/tumara/vendor/assets/images", "/var/www/tumara/vendor/assets/javascripts", "/var/www/tumara/vendor/assets/stylesheets"]
The vendor
directory from this gem should be included in the list of paths.
Closing due to inactivity. Let me know if you have any more issues.
Thanks @hecticjeff ! This was helpful for me.