rake db:migrate error at digital ocean and devise

May 16, 2015 1.4k views
Ruby on Rails Ruby Ubuntu

I am trying to deploy my app on digital ocean platform. May be the problem is with devise. I am using postgres database.

i tried running

RAILS_ENV=production2 rake db:create
but its giving me error:

rake aborted!
NoMethodError: undefined method app_id' for nil:NilClass
/home/Clot-/config/initializers/devise.rb:252:in
block in <top (required)>'
/usr/local/rvm/gems/ruby-2.1.5/gems/devise-3.2.4/lib/devise.rb:288:in setup'
/home/Clot-/config/initializers/devise.rb:3:in
<top (required)>'
/usr/local/rvm/gems/ruby-2.1.5/gems/activesupport-4.0.2/lib/activesupport/dependencies.rb:223:in `load'
/usr/local/rvm/gems/ruby-2.1.5/gems/activesupport-4.0.2/lib/active
support/dependencies.rb:223:in block in load'
/usr/local/rvm/gems/ruby-2.1.5/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in
loaddependency'
/usr/local/rvm/gems/ruby-2.1.5/gems/activesupport-4.0.2/lib/active
support/dependencies.rb:223:in load'
/usr/local/rvm/gems/ruby-2.1.5/gems/railties-4.0.2/lib/rails/engine.rb:609:in
block (2 levels) in <class:Engine>'
/usr/local/rvm/gems/ruby-2.1.5/gems/railties-4.0.2/lib/rails/engine.rb:608:in each'
/usr/local/rvm/gems/ruby-2.1.5/gems/railties-4.0.2/lib/rails/engine.rb:608:in
block in <class:Engine>'
/usr/local/rvm/gems/ruby-2.1.5/gems/railties-4.0.2/lib/rails/initializable.rb:30:in instance_exec'
/usr/local/rvm/gems/ruby-2.1.5/gems/railties-4.0.2/lib/rails/initializable.rb:30:in
run'
/usr/local/rvm/gems/ruby-2.1.5/gems/railties-4.0.2/lib/rails/initializable.rb:55:in block in run_initializers'
/usr/local/rvm/gems/ruby-2.1.5/gems/railties-4.0.2/lib/rails/initializable.rb:44:in
each'
/usr/local/rvm/gems/ruby-2.1.5/gems/railties-4.0.2/lib/rails/initializable.rb:44:in tsort_each_child'
/usr/local/rvm/gems/ruby-2.1.5/gems/railties-4.0.2/lib/rails/initializable.rb:54:in
runinitializers'
/usr/local/rvm/gems/ruby-2.1.5/gems/railties-4.0.2/lib/rails/application.rb:215:in initialize!'
/home/Clot-/config/environment.rb:5:in
<top (required)>'
/usr/local/rvm/gems/ruby-2.1.5/gems/activesupport-4.0.2/lib/active
support/dependencies.rb:229:in require'
/usr/local/rvm/gems/ruby-2.1.5/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in
block in require'
/usr/local/rvm/gems/ruby-2.1.5/gems/activesupport-4.0.2/lib/activesupport/dependencies.rb:214:in `loaddependency'
/usr/local/rvm/gems/ruby-2.1.5/gems/activesupport-4.0.2/lib/activesupport/dependencies.rb:229:in require'
/usr/local/rvm/gems/ruby-2.1.5/gems/railties-4.0.2/lib/rails/application.rb:189:in
require
environment!'
/usr/local/rvm/gems/ruby-2.1.5/gems/railties-4.0.2/lib/rails/application.rb:250:in block in run_tasks_blocks'
/usr/local/rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in
eval'
/usr/local/rvm/gems/ruby-2.1.5/bin/rubyexecutablehooks:15:in `<main>'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)

Be the first one to answer this question.