0

I wanted to install jQuery UI, in order to do that I coded this: Gemfile:

gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'jquery-datatables-rails'

/app/assets/javascipts/application.js

//= require jquery
//= require jquery_ujs
//= require jquery.ui.draggable
//= require jquery.ui.droppable
//= require jquery.ui.resizable

I don't want any jQuery styling so I didn't include any css files in the manifest. I only want these 3 interactions to be include.

After I had run: bundle install and bundle update commands, and restarted server, I got following error:

 couldn't find file 'jquery.ui.draggable' with type 'application/javascript'
Checked in these paths: 
  /old-time-turtle-app/app/assets/fonts
  /old-time-turtle-app/app/assets/images
  /old-time-turtle-app/app/assets/javascripts
  /old-time-turtle-app/app/assets/stylesheets
  /old-time-turtle-app/vendor/assets/javascripts
  /old-time-turtle-app/vendor/assets/stylesheets
  /old-time-turtle-app/.gems/ruby/2.3.0/gems/browser-timezone-rails-1.0.1/app/assets/javascripts
  /old-time-turtle-app/.gems/ruby/2.3.0/gems/jstz-rails3-plus-1.0.5/vendor/assets/javascripts
  /old-time-turtle-app/.gems/ruby/2.3.0/gems/js_cookie_rails-2.1.4/vendor/assets/javascripts
  /old-time-turtle-app/.gems/ruby/2.3.0/gems/browser-timezone-rails-1.0.1/app/assets/javascripts
  /old-time-turtle-app/.gems/ruby/2.3.0/gems/nprogress-rails-0.2.0.2/app/assets/javascripts
  /old-time-turtle-app/.gems/ruby/2.3.0/gems/nprogress-rails-0.2.0.2/app/assets/stylesheets
  /old-time-turtle-app/.gems/ruby/2.3.0/gems/chartkick-2.2.4/app/assets/javascripts
  /old-time-turtle-app/.gems/ruby/2.3.0/gems/chartkick-2.2.4/vendor/assets/javascripts
  /old-time-turtle-app/.gems/ruby/2.3.0/gems/coffee-rails-4.1.1/lib/assets/javascripts
  /old-time-turtle-app/.gems/ruby/2.3.0/gems/jquery-datatables-rails-3.4.0/app/assets/images
  /old-time-turtle-app/.gems/ruby/2.3.0/gems/jquery-datatables-rails-3.4.0/app/assets/javascripts
  /old-time-turtle-app/.gems/ruby/2.3.0/gems/jquery-datatables-rails-3.4.0/app/assets/media
  /old-time-turtle-app/.gems/ruby/2.3.0/gems/jquery-datatables-rails-3.4.0/app/assets/stylesheets
  /old-time-turtle-app/.gems/ruby/2.3.0/gems/jquery-ui-rails-6.0.1/app/assets/images
  /old-time-turtle-app/.gems/ruby/2.3.0/gems/jquery-ui-rails-6.0.1/app/assets/javascripts
  /old-time-turtle-app/.gems/ruby/2.3.0/gems/jquery-ui-rails-6.0.1/app/assets/stylesheets
  /old-time-turtle-app/.gems/ruby/2.3.0/gems/jquery-rails-4.3.1/vendor/assets/javascripts
  /old-time-turtle-app/.gems/ruby/2.3.0/gems/actioncable-5.0.5/lib/assets/compiled
  /old-time-turtle-app/.gems/ruby/2.3.0/gems/turbolinks-source-5.0.3/lib/assets/javascripts
  /old-time-turtle-app/app/assets/fonts
  /old-time-turtle-app/.gems/ruby/2.3.0/gems/bootstrap-sass-3.3.7/assets/stylesheets
  /old-time-turtle-app/.gems/ruby/2.3.0/gems/bootstrap-sass-3.3.7/assets/javascripts
  /old-time-turtle-app/.gems/ruby/2.3.0/gems/bootstrap-sass-3.3.7/assets/fonts
  /old-time-turtle-app/.gems/ruby/2.3.0/gems/bootstrap-sass-3.3.7/assets/images

It seems that it looks for these files and doesn't find them, do I need to include the .js files manually ?

5
  • what is your rails version ? Commented Aug 28, 2017 at 11:30
  • Rails 5.0.5 And I'm working in docker. Commented Aug 28, 2017 at 11:32
  • 1
    try changing jquery.ui.draggable to jquery-ui/widgets/draggable. The path have changed for jquery-ui-rails-6.0.1 and above. Commented Aug 28, 2017 at 11:33
  • It worked!! Thank you! Commented Aug 28, 2017 at 11:39
  • I have placed the answer below, please accept it so it will be useful for people in the future. Commented Aug 28, 2017 at 11:42

1 Answer 1

1

The path have changed for jquery-ui-rails-6.0.1 and above. Refer here

Change jquery.ui.draggable to jquery-ui/widgets/draggable in application.js.

Sign up to request clarification or add additional context in comments.

Comments

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.