{"issue":{"state":"open","created_at":"2011-11-24T16:40:20Z","updated_at":"2011-12-05T11:02:48Z","comments":6,"user":{"gravatar_id":"38ff4bc3b30b3ce7350af40b32e2c0b7","id":94277,"url":"https://api.github.com/users/robotmay","avatar_url":"https://secure.gravatar.com/avatar/38ff4bc3b30b3ce7350af40b32e2c0b7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"robotmay"},"body":"Just ran across something which caused me a bit of a headache; finally figured out what it was!\r\nInstalling for the first time I get an exception when generating the assets:\r\n\r\n```\r\nrails g active_admin:install\r\n      invoke  devise\r\n    generate    No need to install devise, already done.\r\n      invoke    active_record\r\n      create      db/migrate/20111124160716_devise_create_admin_users.rb\r\n      create      app/models/admin_user.rb\r\n      invoke      rspec\r\n      create        spec/models/admin_user_spec.rb\r\n      invoke        fabrication\r\n      create          spec/fabricators/admin_user_fabricator.rb\r\n      insert      app/models/admin_user.rb\r\n       route    devise_for :admin_users\r\n        gsub    app/models/admin_user.rb\r\n        gsub    config/routes.rb\r\n      insert    db/migrate/20111124160716_devise_create_admin_users.rb\r\n      create  config/initializers/active_admin.rb\r\n      create  app/admin\r\n      create  app/admin/dashboards.rb\r\n       route  ActiveAdmin.routes(self)\r\n    generate  active_admin:assets\r\n/Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/mysql2_adapter.rb:283:in `query': Mysql2::Error: Table 'fwd_development.active_admin_comments' doesn't exist: SHOW FIELDS FROM `active_admin_comments` (ActiveRecord::StatementInvalid)\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/mysql2_adapter.rb:283:in `block in execute'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract_adapter.rb:244:in `block in log'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/notifications/instrumenter.rb:21:in `instrument'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract_adapter.rb:239:in `log'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/mysql2_adapter.rb:283:in `execute'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/mysql2_adapter.rb:473:in `columns'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:95:in `block (2 levels) in initialize'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:185:in `with_connection'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:92:in `block in initialize'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/base.rb:712:in `yield'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/base.rb:712:in `default'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/base.rb:712:in `columns'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/texticle-2.0/lib/texticle.rb:52:in `respond_to?'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/base.rb:897:in `respond_to?'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activeadmin-0.3.1/lib/active_admin/resource.rb:151:in `default_options'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activeadmin-0.3.1/lib/active_admin/resource.rb:59:in `initialize'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activeadmin-0.3.1/lib/active_admin/resource/action_items.rb:11:in `initialize'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activeadmin-0.3.1/lib/active_admin/resource/sidebars.rb:9:in `initialize'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activeadmin-0.3.1/lib/active_admin/namespace.rb:118:in `new'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activeadmin-0.3.1/lib/active_admin/namespace.rb:118:in `find_or_build_resource'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activeadmin-0.3.1/lib/active_admin/namespace.rb:46:in `register'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activeadmin-0.3.1/lib/active_admin/comments.rb:23:in `block in <top (required)>'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activeadmin-0.3.1/lib/active_admin/event.rb:23:in `call'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activeadmin-0.3.1/lib/active_admin/event.rb:23:in `block in dispatch'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activeadmin-0.3.1/lib/active_admin/event.rb:22:in `each'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activeadmin-0.3.1/lib/active_admin/event.rb:22:in `dispatch'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activeadmin-0.3.1/lib/active_admin/application.rb:92:in `find_or_create_namespace'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activeadmin-0.3.1/lib/active_admin/application.rb:158:in `load_default_namespace'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activeadmin-0.3.1/lib/active_admin/application.rb:132:in `load!'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activeadmin-0.3.1/lib/active_admin/application.rb:152:in `routes'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activeadmin-0.3.1/lib/active_admin.rb:63:in `routes'\r\n\tfrom /Users/robertmay/Dropbox/Development/Rails/FWD/config/routes.rb:5:in `block in <top (required)>'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.1/lib/action_dispatch/routing/route_set.rb:258:in `instance_exec'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.1/lib/action_dispatch/routing/route_set.rb:258:in `eval_block'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.1/lib/action_dispatch/routing/route_set.rb:235:in `draw'\r\n\tfrom /Users/robertmay/Dropbox/Development/Rails/FWD/config/routes.rb:1:in `<top (required)>'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:234:in `load'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:234:in `block in load'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `block in load_dependency'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:640:in `new_constants_in'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `load_dependency'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:234:in `load'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/application/routes_reloader.rb:29:in `block in load_paths'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/application/routes_reloader.rb:29:in `each'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/application/routes_reloader.rb:29:in `load_paths'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/application/routes_reloader.rb:13:in `reload!'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/application.rb:87:in `reload_routes!'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activeadmin-0.3.1/lib/active_admin/reloader.rb:17:in `block in attach!'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/callbacks.rb:404:in `_run_prepare_callbacks'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/callbacks.rb:81:in `run_callbacks'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.1/lib/action_dispatch/middleware/reloader.rb:46:in `prepare!'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/application/finisher.rb:41:in `block in <module:Finisher>'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/initializable.rb:30:in `instance_exec'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/initializable.rb:30:in `run'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/initializable.rb:55:in `block in run_initializers'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/initializable.rb:54:in `each'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/initializable.rb:54:in `run_initializers'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/application.rb:96:in `initialize!'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/railtie/configurable.rb:30:in `method_missing'\r\n\tfrom /Users/robertmay/Dropbox/Development/Rails/FWD/config/environment.rb:5:in `<top (required)>'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `block in require'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `block in load_dependency'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:640:in `new_constants_in'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `load_dependency'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/application.rb:83:in `require_environment!'\r\n\tfrom /Users/robertmay/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.1/lib/rails/commands.rb:22:in `<top (required)>'\r\n\tfrom script/rails:6:in `require'\r\n\tfrom script/rails:6:in `<main>'\r\n      create  db/migrate/20111124160741_create_admin_notes.rb\r\n      create  db/migrate/20111124160742_move_admin_notes_to_comments.rb\r\n```\r\n\r\nThen, when running the migrations I got the same error:\r\n\r\n```\r\nrake db:migrate\r\nrake aborted!\r\nMysql2::Error: Table 'fwd_development.active_admin_comments' doesn't exist: SHOW FIELDS FROM 'active_admin_comments'\r\n\r\nTasks: TOP => db:migrate => environment\r\n(See full trace by running task with --trace)\r\n```\r\n\r\nI was able to get past the migration error by removing the following two lines from the routes.rb file and putting them back afterwards:\r\n\r\n```ruby\r\nActiveAdmin.routes(self)\r\ndevise_for :admin_users, ActiveAdmin::Devise.config\r\n```\r\n\r\nI then successfully generated the assets using  `rails generate active_admin:assets`.\r\n\r\nNot sure if anyone else has experienced this but I thought I'd report it anyway :)\r\nI'm using the master branch, by the way. ","assignee":null,"id":2343254,"labels":[{"color":"e10c02","name":"Bug","url":"https://api.github.com/repos/gregbell/active_admin/labels/Bug"}],"number":783,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"title":"Install issue regarding migrations","closed_at":null,"html_url":"https://github.com/gregbell/active_admin/issues/783","url":"https://api.github.com/repos/gregbell/active_admin/issues/783","milestone":null},"action":"created","comment":{"created_at":"2011-12-05T11:02:48Z","updated_at":"2011-12-05T11:02:48Z","user":{"gravatar_id":"283759b769c780a0eebcef993dec4610","id":21100,"url":"https://api.github.com/users/jarinudom","avatar_url":"https://secure.gravatar.com/avatar/283759b769c780a0eebcef993dec4610?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"jarinudom"},"body":"Oh and Rake 0.9.2, if that helps.","id":3015577,"url":"https://api.github.com/repos/gregbell/active_admin/issues/comments/3015577"}}