1

I installed ActiveAdmin on my rails application, and now get the following error message when loading my view. It says:

"couldn't find file 'jquery-ui/datepicker' with type 'application/javascript'"

Extracted source (around line #6): <%= stylesheet_link_tag'application', media: 'all', 'data-turbolinks-track' => true %>

I tried the answer on Rails 4 - how to install "jquery-ui"?

but it didn't work. Can anyone help?

2 Answers 2

3

After installing ActiveAdmin gem, just add this to your application.js :

//= require jquery-ui/widgets/datepicker

And in your application.css:

*= require jquery-ui/datepicker

When you check the view page source it should be there after restarting the server

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

4 Comments

I tried this too. But it does not work. Could it be linked to the fact that I have both gem 'query-rails' and gem 'query-ui-rails' in my gemfile?
I've just installed fresh rails 4.2.7 and I added gem 'activeadmin', github: 'activeadmin' after that you don't need any additional gem in order to work. Jquery-UI is already installed. just add the (widget) code what I added from my answer. This is my application.js file : //= require jquery //= require jquery_ujs //= require turbolinks //= require jquery-ui/widgets/datepicker //= require_tree .
Thanks, I realise I did not run 'activeadmin', github: 'activeadmin'. Instead I ran gem 'activeadmin' # Plus integrations with: gem 'devise' gem 'cancan' # or cancancan gem 'draper' gem 'pundit' I suppose this might be the error?
It should not. According to their github page 'activeadmin', github: 'activeadmin' will be proper way of installing it for Rails 4. If you check Gemfile on their main page you will see that it has dependencies for jquery-ui, so no need to install it on top. gem 'jquery-ui-rails', rails_major == '3' ? '~> 4.0' : '~> 5.0'. it also checks for rails versions as well to add other dependencies. Is it working now?
0
gem 'just-datetime-picker'

Follow this https://github.com/Envek/jquery-datetimepicker-rails for it to work with ActiveAdmin

1 Comment

try adding //= require jquery-ui/datepicker in your application.js

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.