I am trying to upgrade rails version from 4.2 to 5.0
While following upgrade steps, there's the connectivity issue related to database (postgres).
On running command rails app:update
the following error shows up
rails aborted!
ActiveRecord::ConnectionNotEstablished: No connection pool with id primary found.
/home/user/.rvm/gems/ruby-2.3.1/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:882:in `retrieve_connection'
/home/user/.rvm/gems/ruby-2.3.1/gems/activerecord-5.0.7.2/lib/active_record/connection_handling.rb:128:in `retrieve_connection'
/home/user/.rvm/gems/ruby-2.3.1/gems/activerecord-5.0.7.2/lib/active_record/connection_handling.rb:91:in `connection'
/home/user/.rvm/gems/ruby-2.3.1/gems/activerecord-5.0.7.2/lib/active_record/model_schema.rb:331:in `table_exists?'
/home/user/.rvm/gems/ruby-2.3.1/gems/public_activity-1.6.4/lib/public_activity/orm/active_record/activity.rb:47:in `<class:Activity>'
/home/user/.rvm/gems/ruby-2.3.1/gems/public_activity-1.6.4/lib/public_activity/orm/active_record/activity.rb:22:in `<module:ActiveRecord>'
/home/user/.rvm/gems/ruby-2.3.1/gems/public_activity-1.6.4/lib/public_activity/orm/active_record/activity.rb:19:in `<module:ORM>'
/home/user/.rvm/gems/ruby-2.3.1/gems/public_activity-1.6.4/lib/public_activity/orm/active_record/activity.rb:18:in `<module:PublicActivity>'
/home/user/.rvm/gems/ruby-2.3.1/gems/public_activity-1.6.4/lib/public_activity/orm/active_record/activity.rb:3:in `<top (required)>'
/home/user/.rvm/gems/ruby-2.3.1/gems/public_activity-1.6.4/lib/public_activity/orm/active_record.rb:4:in `require_relative'
/home/user/.rvm/gems/ruby-2.3.1/gems/public_activity-1.6.4/lib/public_activity/orm/active_record.rb:4:in `<top (required)>'
/home/user/.rvm/gems/ruby-2.3.1/gems/public_activity-1.6.4/lib/public_activity.rb:53:in `require'
/home/user/.rvm/gems/ruby-2.3.1/gems/public_activity-1.6.4/lib/public_activity.rb:53:in `inherit_orm'
/home/user/.rvm/gems/ruby-2.3.1/gems/public_activity-1.6.4/lib/public_activity/models/activity.rb:4:in `<module:PublicActivity>'
/home/user/.rvm/gems/ruby-2.3.1/gems/public_activity-1.6.4/lib/public_activity/models/activity.rb:3:in `<top (required)>'
/home/user/application/engines/common/lib/common/activity_extension.rb:10:in `require'
/home/user/application/engines/common/lib/common/activity_extension.rb:10:in `<module:Common>'
/home/user/application/engines/common/lib/common/activity_extension.rb:1:in `<top (required)>'
/home/user/application/engines/common/lib/common/engine.rb:8:in `require'
/home/user/application/engines/common/lib/common/engine.rb:8:in `<top (required)>'
/home/user/application/engines/common/lib/common.rb:1:in `require'
/home/user/application/engines/common/lib/common.rb:1:in `<top (required)>'
/home/user/.rvm/gems/ruby-2.3.1/gems/bundler-2.1.4/lib/bundler/runtime.rb:74:in `require'
/home/user/.rvm/gems/ruby-2.3.1/gems/bundler-2.1.4/lib/bundler/runtime.rb:74:in `block (2 levels) in require'
/home/user/.rvm/gems/ruby-2.3.1/gems/bundler-2.1.4/lib/bundler/runtime.rb:69:in `each'
/home/user/.rvm/gems/ruby-2.3.1/gems/bundler-2.1.4/lib/bundler/runtime.rb:69:in `block in require'
/home/user/.rvm/gems/ruby-2.3.1/gems/bundler-2.1.4/lib/bundler/runtime.rb:58:in `each'
/home/user/.rvm/gems/ruby-2.3.1/gems/bundler-2.1.4/lib/bundler/runtime.rb:58:in `require'
/home/user/.rvm/gems/ruby-2.3.1/gems/bundler-2.1.4/lib/bundler.rb:174:in `require'
/home/user/application/config/application.rb:17:in `<top (required)>'
/home/user/application/Rakefile:4:in `require'
/home/user/application/Rakefile:4:in `<top (required)>'
/home/user/.rvm/gems/ruby-2.3.1/gems/railties-5.0.7.2/lib/rails/commands/rake_proxy.rb:13:in `block in run_rake_task'
/home/user/.rvm/gems/ruby-2.3.1/gems/railties-5.0.7.2/lib/rails/commands/rake_proxy.rb:11:in `run_rake_task'
/home/user/.rvm/gems/ruby-2.3.1/gems/railties-5.0.7.2/lib/rails/commands/commands_tasks.rb:51:in `run_command!'
/home/user/.rvm/gems/ruby-2.3.1/gems/railties-5.0.7.2/lib/rails/commands.rb:18:in `<top (required)>'
script/rails:6:in `require'
script/rails:6:in `<main>'
Does anyone have any idea why this error appears and how to resolve it?
Please help!