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.

1
  • 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 Commented Nov 6, 2017 at 13:34

1 Answer 1

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
Sign up to request clarification or add additional context in comments.

1 Comment

Thank you. Something so simple, sometimes we just need another pair of eyes. Thanks again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.