2

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.

Timothy
  • 139
  • 1
  • 12
  • I think rais-ujs is included with Rails 5.1. Since you're still on 5.0 then Rails is still dependent on jquery for UJS. Then you can just simply remove `//= require rails-ujs` from your `app/assets/javascripts/application.js` – Jay-Ar Polidario Nov 06 '17 at 13:34

1 Answers1

7
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
Sedad Kosovac
  • 658
  • 5
  • 14