Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't install Active Admin for Ruby on Rails: "Sprockets::FileNotFound..."

I installed a new rails app locally, then added the active admin gem and ran rake db:migrate and then the installas per the instructions. I'm also using powder.

When trying to access the admin area at mysite.dev/admin, I get the following:

Sprockets::FileNotFound in Active_admin/devise/sessions#new

couldn't find file 'jquery-ui' (in /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activeadmin-0.6.0/app/assets/javascripts/active_admin/base.js:2)

What on earth am I doing wrong?

like image 232
tjcss Avatar asked Jun 03 '13 20:06

tjcss


2 Answers

You should set in your gem file : gem 'jquery-rails', "2.3.0" to fix the jquery-rails gem version to 2.3.0 The last update ( 3.0.0) remove the jquery-ui files and cause that issue :

couldn't find file 'jquery-ui' (in /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activeadmin-0.6.0/app/assets/javascripts/active_admin/base.js:2)

That should fix your issue for now. You can also get the last version of Active Admin from github that fixes your issue.

But I would advice to change

gem jquery-rails 

in your gemfile to :

gem 'jquery-rails', "2.3.0"

Hope that helps !

like image 121
Jeremy B Avatar answered Sep 21 '22 20:09

Jeremy B


I've updated to last version (0.6.0) and I had the same problem.
Instead of downgrade my jquery-rails or install the gem directly from github, I change //= require active_admin/base in my in active_admin.js for:

//= require jquery
//= require jquery_ujs
//= require jquery.ui.core
//= require jquery.ui.widget
//= require jquery.ui.datepicker
//= require active_admin/application
like image 32
Alter Lagos Avatar answered Sep 19 '22 20:09

Alter Lagos