0

I HAD a working rails 3.2.13 application.

Then i tried to install ActiveAdmin.

The current version is the 0.6.

After the installation, following the steps in the ActiveAdmin site (http://www.activeadmin.info/documentation.html), trying to access the root of my site (so NOT the active admin realm) i get:

Routing Error 

uninitialized constant DashboardController

Try running rake routes ...

So far so good because this is a known bug that i solved turning back to active admin 0.5.1.

Still remains another problem in the root:

Sprockets::FileNotFound in Home#index

Showing /home/agostinox/Projects/mybeautifulapp/app/views/layouts/application.html.erb where line #10 raised:

couldn't find file 'jquery-ui'
  (in /home/agostinox/.rvm/gems/ruby-2.0.0-p0/gems/activeadmin-0.5.1/app/assets/javascripts/active_admin/base.js:2)

So: when i access my root page (and NOT the active admin stuff) it tries to find jquery-ui in the gems registered for active admin.
Why does this happen and how can i solve this?

AgostinoX
  • 7,477
  • 20
  • 77
  • 137
  • 1
    From my experience ActiveAdmin - however useful - is not superb piece of code. Do you have 'jquery-ui' inculded in your application.js? – Mike Szyndel Jun 29 '13 at 17:47
  • 1
    check http://stackoverflow.com/questions/15818446/active-admin-ruby-on-rails-dashboard-controller-error, https://github.com/gregbell/active_admin/issues/2053 – Kristian Hildebrandt Jun 29 '13 at 17:53
  • @Kristian, that was the first problem i had, and i've resolved it following that github issue (well actually due to the second i also pull back the active admin version to 0.5.1). then there was another one, that is the argument of the question – AgostinoX Jun 29 '13 at 19:40
  • @Michael. i think you refer to these lines in my application.js: //= require jquery //= require jquery_ujs //= require jquery.ui.all ; but before installing active admin it worked. now, as you can see in the error i posted, it seems to search for jquery-ui into the active admin stuff. – AgostinoX Jun 29 '13 at 19:46

1 Answers1

0

Use jquery-rails version 2.3.0 instead of 3.0.0.

Pedro Nascimento
  • 13,136
  • 4
  • 36
  • 64
  • for the sake of completeness: i updated, in my gemfile, the line "gem 'jquery-rails'" whith "gem 'jquery-rails', '2.3'". I tried to bundle it and it complains that "gem is locked to 3, try to run. bundle update jquery-rails. That is what i did. Now it seems to work. Can you be more precise on how you come to this solution? (and eventually put it in your answer) – AgostinoX Jun 30 '13 at 10:44
  • I think its a comparability issue between activeadmin 0.6.0 and latest version of jquery-rails. Seems activeadmin dosen't recognize some file names changes in the latest jquery-rails gem, that's why going back to an older version solve your issue – Nimir Jul 02 '13 at 13:59
  • 1
    `jquery-rails` 3.0.0 removes jQuery UI, which ActiveAdmin relies on. Latest versions of ActiveAdmin will require `jquery-ui-rails`. – Pedro Nascimento Jul 02 '13 at 19:03