Search code examples
ruby-on-railsrubygemsrails-ujs

couldn't find file 'rails-ujs' with type 'application/javascript' (On page load)


Created a Rails 5 app using devise for auth and attempting to add Thredded gem for forums.

Expected behavior

The app should load at http://localhost:3000.

Actual behavior

After server starts, the following message shows up in the chrome browser where the app should be.

couldn't find file 'rails-ujs' with type 'application/javascript'

System configuration

    Ruby 2.4.0p0 (2016-12-24 revision 57164)
    Rails 5.0.4

GemFile
    gem 'pg', '~> 0.18'
    gem 'puma', '~> 3.0'
    gem 'sass-rails', '~> 5.0'
    gem 'uglifier', '>= 1.3.0'
    gem 'coffee-rails', '~> 4.2'
    gem 'thredded', '~> 0.13.7'
    gem 'omniauth-facebook'
    gem 'geocoder'
    gem 'rails_admin', '~> 1.1.1'
    gem 'devise'
    gem 'jquery-rails'
    gem 'bcrypt', '~> 3.1.11'
    gem 'turbolinks', '~> 5'
    gem 'jbuilder', '~> 2.5'

Thank you.


Solution

  • gem 'rails-ujs', '~> 5.1.0.beta1'
    

    Include this gem in your gem file or use rails 5.1.4 that has it by default. Or remove it from

    app/assets/javascripts/application.js
    require rails-ujs #this line remove