1
votes

I'm trying to deploy my rails app on a VPS with capistrano and I am having this issue: Everything works well in development. Anyone knows how to approach this?

2013-11-18 21:41:44 executing deploy:migrate' * executing "cd /home/henrik41/apps/woomatch/releases/20131119023851 && bundle exec rake RAILS_ENV=production db:migrate" servers: ["66.228.34.47"] [66.228.34.47] executing command ** [out :: 66.228.34.47] rake aborted! ** [out :: 66.228.34.47] uninitialized constant ActiveAdmin ** [out :: 66.228.34.47] /home/henrik41/apps/woomatch/releases/20131119023851/config/initializers/active_admin.rb:1:in' ** [out :: 66.228.34.47] /home/henrik41/apps/woomatch/shared/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:588:in block (2 levels) in <class:Engine>' ** [out :: 66.228.34.47] /home/henrik41/apps/woomatch/shared/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:587:ineach' ** [out :: 66.228.34.47] /home/henrik41/apps/woomatch/shared/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/engine.rb:587:in block in <class:Engine>' ** [out :: 66.228.34.47] /home/henrik41/apps/woomatch/shared/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:30:ininstance_exec' ** [out :: 66.228.34.47] /home/henrik41/apps/woomatch/shared/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:30:in run' ** [out :: 66.228.34.47] /home/henrik41/apps/woomatch/shared/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:55:inblock in run_initializers' ** [out :: 66.228.34.47] /home/henrik41/apps/woomatch/shared/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:54:in each' ** [out :: 66.228.34.47] /home/henrik41/apps/woomatch/shared/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/initializable.rb:54:inrun_initializers' ** [out :: 66.228.34.47] /home/henrik41/apps/woomatch/shared/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/application.rb:136:in initialize!' ** [out :: 66.228.34.47] /home/henrik41/apps/woomatch/shared/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/railtie/configurable.rb:30:inmethod_missing' ** [out :: 66.228.34.47] /home/henrik41/apps/woomatch/releases/20131119023851/config/environment.rb:6:in <top (required)>' ** [out :: 66.228.34.47] /home/henrik41/apps/woomatch/shared/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/application.rb:103:inrequire_environment!' ** [out :: 66.228.34.47] /home/henrik41/apps/woomatch/shared/bundle/ruby/1.9.1/gems/railties-3.2.12/lib/rails/application.rb:297:in `block (2 levels) in initialize_tasks' ** [out :: 66.228.34.47] Tasks: TOP => db:migrate => environment ** [out :: 66.228.34.47] (See full trace by running task with --trace) command finished in 22955ms failed: "sh -c 'cd /home/henrik41/apps/woomatch/releases/20131119023851 && bundle exec rake RAILS_ENV=production db:migrate'" on 66.228.34.47

1
Can you post your Gemfile? Is active_admin inside a group (e.g. development) in your Gemfile?Peter Goldstein
Thanks Peter. You pinpointed the exact problem. My activeadmin was misplaced in my assets group. I displaced and now it migrates properly. You rock!Henri
@PeterGoldstein thanks! can you add it as an answer please so that i can upvoteSahil Dhankhar
@SahilDhankhar Sure. Done. Thanks.Peter Goldstein

1 Answers

2
votes

If active_admin is located inside a group (e.g. 'development' or 'assets') and is not available in the production environment it can cause this error.