Rails active admin deployment: could not find file 'jquery-ui'

when trying to deploy using capistrano when the capistrano command uses a packet rake command

RAILS_ENV=production RAILS_GROUPS=assets assets:precompile 

I have this error

 couldn't find file 'jquery-ui' (in /home/umbrosus/.rvm/gems/ruby-1.9.3-p392@gancxadebebi/gems/activeadmin-0.5.1/app/assets/javascripts/active_admin/base.js:2) 

Before it worked well, but I tried updating to 0.6, and then started this error. I returned to 0.5.1, and the error is still there. Am I doing something bad?

thank

+43
ruby-on-rails assets capistrano activeadmin
May 30 '13 at 19:30
source share
6 answers

"jquery-rails" recently uninstalled the jQuery UI.

https://github.com/rails/jquery-rails/commit/2fdcdb2633cbc6426d412c050200fc31d14b9a3b

They recommend using the pearl jquery-ui-rails.

There is a request for an active migration request (starting from this entry) to add this gem to the dependency. However, ActiveAdmin developers said they " block it until we officially abandon Rails 3.0 support ." The version they are bound to is jquery-rails < 3.0.0 .

In the meantime, just change your Gemfile:

gem "jquery-ui-rails" Not recommended, see @Kevin's comment below

Or you can downgrade jquery-rails version:

 gem "jquery-rails", "< 3.0.0" 

Or you can pull Github masters from your branch. They applied a temporary fix.

 gem "activeadmin", github: "gregbell/active_admin" 
+118
May 30 '13 at 23:09
source share

Well, there is no need to lower jquery-rails to 2.3.0 or point to a GitHub branch. Just use jquery-ui-rails . To get around the differences in the file name:

Just create app/assets/javascripts/jquery-ui.js

 //= require jquery.ui.all 

Create app/assets/stylesheets/jquery-ui.css

 /* *= require jquery.ui.all */ 

They upload the correct files to satisfy ActiveAdmin

+31
Aug 07 '13 at 14:08
source share

Although the Pull request has now been merged with AA, you will still have this problem if you work with the latest version of AA. I do not like to force jQuery rails to version 2.3.0, so here is an alternative solution to the problem: In the active_admin.js file active_admin.js replace

 //= require active_admin/base 

from

 //= require jquery //= require jquery_ujs //= require jquery.ui.core //= require jquery.ui.widget //= require jquery.ui.datepicker //= require active_admin/application 

kudos fred for providing this solution here .

+11
Jul 05 '13 at
source share

Lowering "jquery-rails" to "2.3.0" fixed this problem for me as well.

+1
Jun 26 '13 at 14:37
source share

In my case, the jquery problem arose because I used gem. I did not use jquery directly, so adding app / assets / js / jquery-ui.js to my project did not help.

Adding gem "jquery-rails", "<3.0.0" to my gemfile fixed it, but I immediately got a problem with turbolinks, which is quite easy to fix ...

My last gemfile:

 # Temporary fix for jquery issue gem "jquery-rails", "< 3.0.0" gem 'turbolinks' 

... easy peasy

0
Nov 12 '13 at 18:44
source share

I know this is already allowed. But I want to give another solution that worked for me.

I run Rails 4.0.8 when this problem occurs.

I just delete the explicit version number for gem jquery-ui-rails gem jquery-rails.

Mine looks essentially:

 # js gem 'jquery-ui-rails' gem 'jquery-rails' # rails admin gem 'rails_admin' 

Gemfile.lock automatically calculated the correct version for all three gems automatically.

0
Aug 20
source share



All Articles