NoMethodError: undefined method `symbolize_keys' for nil:NilClass - ruby-on-rails

while deploying rails application to production server.
capistrano unable to load following file from confing
server_options = YAML.load_file(File.join(Rails.root, "config", "server.yml"))[Rails.env].symbolize_keys
I have created the following files manually on server
config/database.yml
config/aws.yml
config/cable.yml
config/email.yml
config/secrets.yml
config/server.yml
config/application.yml
Because these are in .gitignore
# add sensitive files to .gitignore
config/database.yml
config/aws.yml
config/cable.yml
config/email.yml
config/secrets.yml
config/server.yml
config/application.yml
Here is the symlinking part of capistrano in deploy.rb
files we want symlinking to specific entries in shared.
set :linked_files, %w{config/database.yml config/aws.yml config/cable.yml config/email.yml config/secrets.yml config/server.yml config/application.yml}
# dirs we want symlinking to shared
set :linked_dirs, %w{log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system public/pdf public/excel public/img}
# what specs should be run before deployment is allowed to
# continue, see lib/capistrano/tasks/run_tests.cap
set :tests, []
# which config files should be copied by deploy:setup_config
# see documentation in lib/capistrano/tasks/setup_config.cap
# for details of operations
set(:config_files, %w(
nginx.conf
database.example.yml
aws.example.yml
cable.example.yml
email.example.yml
secrets.example.yml
server.example.yml
application.example.yml
log_rotation
unicorn.rb
unicorn_init.sh
))
# which config files should be made executable after copying
# by deploy:setup_config
set(:executable_config_files, %w(
unicorn_init.sh
))
# files which need to be symlinked to other parts of the
# filesystem. For example nginx virtualhosts, log rotation
# init scripts etc.
set(:symlinks, [
{
source: "nginx.conf",
link: "/etc/nginx/sites-enabled/{{full_app_name}}"
},
{
source: "unicorn_init.sh",
link: "/etc/init.d/unicorn_{{full_app_name}}"
},
{
source: "log_rotation",
link: "/etc/logrotate.d/{{full_app_name}}"
}
])
Now upon deploying cap staging deploy
Full trace by cap staging deploy --trace
deploy:assets:precompile
01 RBENV_ROOT=/home/centos/.rbenv RBENV_VERSION=2.4.0 /home/centos/.rbenv/bin/rbenv exec bundle exec rake assets:precompile
01 rake aborted!
01 NoMethodError: undefined method `symbolize_keys' for nil:NilClass
01 /home/centos/apps/expedite_pm_staging/releases/20190125070939/config/environments/production.rb:88:in `block in <top (r…
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/railtie.rb:209:in `insta…
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/railtie.rb:209:in `confi…
01 /home/centos/apps/expedite_pm_staging/releases/20190125070939/config/environments/production.rb:1:in `<top (required)>'
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.7.1/lib/active_support/dependenci…
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.7.1/lib/active_support/dependenci…
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.7.1/lib/active_support/dependenci…
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.7.1/lib/active_support/dependenci…
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/engine.rb:600:in `block …
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/engine.rb:599:in `each'
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/engine.rb:599:in `block …
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:30:in `…
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:30:in `…
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:55:in `…
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:44:in `…
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:44:in `…
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:54:in `…
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:352:in `i…
01 /home/centos/apps/expedite_pm_staging/releases/20190125070939/config/environment.rb:5:in `<top (required)>'
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:328:in `r…
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:328:in `r…
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:448:in `b…
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:6…
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
01 /home/centos/.rbenv/versions/2.4.0/bin/bundle:22:in `load'
01 /home/centos/.rbenv/versions/2.4.0/bin/bundle:22:in `<main>'
01 Tasks: TOP => environment
01 (See full trace by running task with --trace)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as centos#54.84.214.65: rake exit status: 1
rake stdout: rake aborted!
NoMethodError: undefined method `symbolize_keys' for nil:NilClass
/home/centos/apps/expedite_pm_staging/releases/20190125070939/config/environments/production.rb:88:in `block in <top (required)>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/railtie.rb:209:in `instance_eval'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/railtie.rb:209:in `configure'
/home/centos/apps/expedite_pm_staging/releases/20190125070939/config/environments/production.rb:1:in `<top (required)>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:293:in `require'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:293:in `block in require'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:259:in `load_dependency'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:293:in `require'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/engine.rb:600:in `block (2 levels) in <class:Engine>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/engine.rb:599:in `each'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/engine.rb:599:in `block in <class:Engine>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:30:in `instance_exec'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:30:in `run'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:44:in `each'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:44:in `tsort_each_child'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:54:in `run_initializers'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:352:in `initialize!'
/home/centos/apps/expedite_pm_staging/releases/20190125070939/config/environment.rb:5:in `<top (required)>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:328:in `require'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:328:in `require_environment!'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:448:in `block in run_tasks_blocks'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
/home/centos/.rbenv/versions/2.4.0/bin/bundle:22:in `load'
/home/centos/.rbenv/versions/2.4.0/bin/bundle:22:in `<main>'
Tasks: TOP => environment
(See full trace by running task with --trace)
rake stderr: Nothing written
/home/developer/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sshkit-1.18.0/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute'
/home/developer/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sshkit-1.18.0/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute'
Caused by:
SSHKit::Command::Failed: rake exit status: 1
rake stdout: rake aborted!
NoMethodError: undefined method `symbolize_keys' for nil:NilClass
/home/centos/apps/expedite_pm_staging/releases/20190125070939/config/environments/production.rb:88:in `block in <top (required)>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/railtie.rb:209:in `instance_eval'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/railtie.rb:209:in `configure'
/home/centos/apps/expedite_pm_staging/releases/20190125070939/config/environments/production.rb:1:in `<top (required)>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:293:in `require'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:293:in `block in require'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:259:in `load_dependency'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:293:in `require'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/engine.rb:600:in `block (2 levels) in <class:Engine>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/engine.rb:599:in `each'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/engine.rb:599:in `block in <class:Engine>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:30:in `instance_exec'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:30:in `run'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:44:in `each'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:44:in `tsort_each_child'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:54:in `run_initializers'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:352:in `initialize!'
/home/centos/apps/expedite_pm_staging/releases/20190125070939/config/environment.rb:5:in `<top (required)>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:328:in `require'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:328:in `require_environment!'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:448:in `block in run_tasks_blocks'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
/home/centos/.rbenv/versions/2.4.0/bin/bundle:22:in `load'
/home/centos/.rbenv/versions/2.4.0/bin/bundle:22:in `<main>'
Tasks: TOP => environment
(See full trace by running task with --trace)
rake stderr: Nothing written
/home/developer/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sshkit-1.18.0/lib/sshkit/command.rb:99:in `exit_status='
/home/developer/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sshkit-1.18.0/lib/sshkit/backends/netssh.rb:169:in `execute_command'
/home/developer/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sshkit-1.18.0/lib/sshkit/backends/abstract.rb:145:in `block in create_command_and_execute'
/home/developer/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sshkit-1.18.0/lib/sshkit/backends/abstract.rb:145:in `tap'
/home/developer/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sshkit-1.18.0/lib/sshkit/backends/abstract.rb:145:in `create_command_and_execute'
/home/developer/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sshkit-1.18.0/lib/sshkit/backends/abstract.rb:78:in `execute'
/home/developer/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/capistrano-rails-1.1.8/lib/capistrano/tasks/assets.rake:69:in `block (6 levels) in <top (required)>'
/home/developer/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sshkit-1.18.0/lib/sshkit/backends/abstract.rb:97:in `with'
/home/developer/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/capistrano-rails-1.1.8/lib/capistrano/tasks/assets.rake:68:in `block (5 levels) in <top (required)>'
/home/developer/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sshkit-1.18.0/lib/sshkit/backends/abstract.rb:89:in `within'
/home/developer/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/capistrano-rails-1.1.8/lib/capistrano/tasks/assets.rake:67:in `block (4 levels) in <top (required)>'
/home/developer/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sshkit-1.18.0/lib/sshkit/backends/abstract.rb:29:in `instance_exec'
/home/developer/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sshkit-1.18.0/lib/sshkit/backends/abstract.rb:29:in `run'
/home/developer/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sshkit-1.18.0/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
Tasks: TOP => deploy:assets:precompile
The deploy has failed with an error: Exception while executing as centos#54.84.214.65: rake exit status: 1
rake stdout: rake aborted!
NoMethodError: undefined method `symbolize_keys' for nil:NilClass
/home/centos/apps/expedite_pm_staging/releases/20190125070939/config/environments/production.rb:88:in `block in <top (required)>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/railtie.rb:209:in `instance_eval'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/railtie.rb:209:in `configure'
/home/centos/apps/expedite_pm_staging/releases/20190125070939/config/environments/production.rb:1:in `<top (required)>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:293:in `require'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:293:in `block in require'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:259:in `load_dependency'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:293:in `require'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/engine.rb:600:in `block (2 levels) in <class:Engine>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/engine.rb:599:in `each'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/engine.rb:599:in `block in <class:Engine>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:30:in `instance_exec'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:30:in `run'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:44:in `each'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:44:in `tsort_each_child'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:54:in `run_initializers'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:352:in `initialize!'
/home/centos/apps/expedite_pm_staging/releases/20190125070939/config/environment.rb:5:in `<top (required)>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:328:in `require'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:328:in `require_environment!'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:448:in `block in run_tasks_blocks'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
/home/centos/.rbenv/versions/2.4.0/bin/bundle:22:in `load'
/home/centos/.rbenv/versions/2.4.0/bin/bundle:22:in `<main>'
Tasks: TOP => environment
(See full trace by running task with --trace)
rake stderr: Nothing written
** Invoke deploy:failed (first_time)
** Execute deploy:failed
** DEPLOY FAILED
** Refer to log/capistrano.log for details. Here are the last 20 lines:
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/engine.rb:600:in `block (2 levels) in <class:Engine>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/engine.rb:599:in `each'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/engine.rb:599:in `block in <class:Engine>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:30:in `instance_exec'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:30:in `run'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:44:in `each'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:44:in `tsort_each_child'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:54:in `run_initializers'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:352:in `initialize!'
/home/centos/apps/expedite_pm_staging/releases/20190125070939/config/environment.rb:5:in `<top (required)>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:328:in `require'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:328:in `require_environment!'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:448:in `block in run_tasks_blocks'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
/home/centos/.rbenv/versions/2.4.0/bin/bundle:22:in `load'
/home/centos/.rbenv/versions/2.4.0/bin/bundle:22:in `<main>'

Related

c9 and heroku / rake aborted! undefined method `mount'

Everything working fine on the development environment(C9). However, when it comes to deploying to Heroku, when I try to run 'heroku rake db:migrate', I get the following error message:
breadeat:~/workspace/KNU_Community_Sy_part (master) $ heroku run rake db:migrate
Running rake db:migrate on ⬢ arcane-woodland-11170... up, run.6105 (Free)
rake aborted!
NoMethodError: undefined method `mount' for #<Kcm::Application:0x00000002c99d00>
/app/config/environments/production.rb:2:in `block in <top (required)>'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.2/lib/rails/railtie.rb:211:in `instance_eval'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.2/lib/rails/railtie.rb:211:in `configure'
/app/config/environments/production.rb:1:in `<top (required)>'
/app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.2/lib/active_support/dependencies.rb:292:in `require'
/app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.2/lib/active_support/dependencies.rb:292:in `block in require'
/app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.2/lib/active_support/dependencies.rb:258:in `load_dependency'
/app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.2/lib/active_support/dependencies.rb:292:in `require'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.2/lib/rails/engine.rb:600:in `block (2 levels) in <class:Engine>'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.2/lib/rails/engine.rb:599:in `each'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.2/lib/rails/engine.rb:599:in `block in <class:Engine>'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.2/lib/rails/initializable.rb:30:in `instance_exec'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.2/lib/rails/initializable.rb:30:in `run'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.2/lib/rails/initializable.rb:59:in `block in run_initializers'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.2/lib/rails/initializable.rb:48:in `each'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.2/lib/rails/initializable.rb:48:in `tsort_each_child'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.2/lib/rails/initializable.rb:58:in `run_initializers'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.2/lib/rails/application.rb:353:in `initialize!'
/app/config/environment.rb:5:in `<top (required)>'
/app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.2/lib/active_support/dependencies.rb:292:in `require'
/app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.2/lib/active_support/dependencies.rb:292:in `block in require'
/app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.2/lib/active_support/dependencies.rb:258:in `load_dependency'
/app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.2/lib/active_support/dependencies.rb:292:in `require'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.2/lib/rails/application.rb:329:in `require_environment!'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.2/lib/rails/application.rb:445:in `block in run_tasks_blocks'
/app/vendor/bundle/ruby/2.3.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:74:in `load'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:74:in `kernel_load'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:27:in `run'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/cli.rb:360:in `exec'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor.rb:369:in `dispatch'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/cli.rb:20:in `dispatch'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/base.rb:444:in `start'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/cli.rb:10:in `start'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/exe/bundle:30:in `block in <top (required)>'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/exe/bundle:22:in `<top (required)>'
/app/bin/bundle:3:in `load'
/app/bin/bundle:3:in `<main>'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
help plz..
my code in github
link_to : https://github.com/sangyeol-kim/KNU_Community_Sy_part
For reference, I have installed the Heroku redis add-on.
In config/environments/production.rb on line 2, change this:
mount ActionCable.server => '/cable'
to this:
config.action_cable.mount_path = "/cable"
I see mount ActionCable.server => '/cable' in config/environments/production.rb
https://github.com/sangyeol-kim/KNU_Community_Sy_part/blob/3dc80e210f3a8d40fb9184877098560c65d3b37f/config/environments/production.rb#L2
Remove that and try it out.

Numeric conversion error with PostgreSQL and Rails

I'm getting the following error output when trying to run RAILS_ENV=production rake db:migrate on an Ubuntu instance:
/usr/local/rvm/gems/ruby-2.4.0/gems/activesupport-4.2.6/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
And the following output as well:
/usr/local/rvm/gems/ruby-2.4.0/gems/activesupport-4.2.6/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
/usr/local/rvm/gems/ruby-2.4.0/gems/activesupport-4.2.6/lib/active_support/cache/strategy/local_cache.rb:138:in `local_cache_key'
/usr/local/rvm/gems/ruby-2.4.0/gems/activesupport-4.2.6/lib/active_support/cache/strategy/local_cache.rb:74:in `middleware'
/usr/local/rvm/gems/ruby-2.4.0/gems/railties-4.2.6/lib/rails/application/bootstrap.rb:79:in `block in <module:Bootstrap>'
/usr/local/rvm/gems/ruby-2.4.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `instance_exec'
/usr/local/rvm/gems/ruby-2.4.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `run'
/usr/local/rvm/gems/ruby-2.4.0/gems/railties-4.2.6/lib/rails/initializable.rb:55:in `block in run_initializers'
/usr/local/rvm/gems/ruby-2.4.0/gems/railties-4.2.6/lib/rails/initializable.rb:54:in `run_initializers'
/usr/local/rvm/gems/ruby-2.4.0/gems/railties-4.2.6/lib/rails/application.rb:352:in `initialize!'
/home/rails/gsc_surveying/config/environment.rb:5:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.4.0/gems/railties-4.2.6/lib/rails/application.rb:328:in `require'
/usr/local/rvm/gems/ruby-2.4.0/gems/railties-4.2.6/lib/rails/application.rb:328:in `require_environment!'
/usr/local/rvm/gems/ruby-2.4.0/gems/railties-4.2.6/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/usr/local/rvm/gems/ruby-2.4.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
Tasks: TOP => db:migrate => environment
Switching to Ruby 2.3.1 fixed the issue.

Database migration error

I just cloned one of my repos to a new Mac, everything was fine but then when I try to rake db:create:all or rake db:migrate, I got this error: (I read something about database.yml file but I don't have it in my project and it all worked on another Mac):
rake aborted!
Cannot load `Rails.application.database_configuration`:
Could not load database configuration. No such file - ["config/database.yml"]
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/application/configuration.rb:110:in `database_configuration'
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.2.1/lib/active_record/railtie.rb:117:in `block (2 levels) in <class:Railtie>'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:44:in `each'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.2.1/lib/active_record/base.rb:316:in `<module:ActiveRecord>'
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.2.1/lib/active_record/base.rb:26:in `<top (required)>'
/Library/Ruby/Gems/2.0.0/gems/devise-3.4.1/lib/devise/orm/active_record.rb:3:in `<top (required)>'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `block in require'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
/Users/fabrizio/Desktop/SkyWalker/imnotatester/config/initializers/devise.rb:22:in `block in <top (required)>'
/Library/Ruby/Gems/2.0.0/gems/devise-3.4.1/lib/devise.rb:293:in `setup'
/Users/fabrizio/Desktop/SkyWalker/imnotatester/config/initializers/devise.rb:3:in `<top (required)>'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `block in load'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:652:in `block in load_config_initializer'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/notifications.rb:166:in `instrument'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:651:in `load_config_initializer'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `each'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `block in <class:Engine>'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `instance_exec'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `run'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `each'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `tsort_each_child'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:54:in `run_initializers'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/application.rb:352:in `initialize!'
/Users/fabrizio/Desktop/SkyWalker/imnotatester/config/environment.rb:5:in `<top (required)>'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `block in require'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/Library/Ruby/Gems/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/application.rb:328:in `require_environment!'
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.1/lib/rails/application.rb:457:in `block in run_tasks_blocks'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
Create database.yml in config directory (near application.rb, boot.rb, routes.rb).
# database.yml
development:
encoding: utf8
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
Then call bundle exec rake db:create && bundler exec rake db:migrate,. Hope you have bundler and sqlite3 in the Gemfile.

Gem::LoadError: Specified 'postgresql' for database adapter, but the gem is not loaded

Help me! Enter "mina deploy" get this beauty:
My "/home/deploy/inscope/shared/config/database.yml" looks:
production:
adapter: postgresql
encoding: unicode
database: ***
username: ***
password: ***
host: localhost
rake aborted!
Gem::LoadError: Specified 'postgresql' for database adapter, but the gem is not loaded. Add `gem 'pg'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.0/lib/active_record/connection_adapters/connection_specification.rb:190:in `rescue in spec'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.0/lib/active_record/connection_adapters/connection_specification.rb:187:in `spec'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.0/lib/active_record/connection_handling.rb:50:in `establish_connection'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.0/lib/active_record/railtie.rb:129:in `block (2 levels) in <class:Railtie>'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.0/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.0/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.0/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.0/lib/active_support/lazy_load_hooks.rb:27:in `each'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.0/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.0/lib/active_record/railtie.rb:118:in `block in <class:Railtie>'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/railties-4.1.0/lib/rails/initializable.rb:30:in `instance_exec'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/railties-4.1.0/lib/rails/initializable.rb:30:in `run'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/railties-4.1.0/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/railties-4.1.0/lib/rails/initializable.rb:54:in `run_initializers'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/railties-4.1.0/lib/rails/application.rb:288:in `initialize!'
/home/deploy/inscope/tmp/build-142737137923106/config/environment.rb:5:in `<top (required)>'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `require'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `block in require'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:232:in `load_dependency'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `require'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/railties-4.1.0/lib/rails/application.rb:264:in `require_environment!'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/railties-4.1.0/lib/rails/application.rb:367:in `block in run_tasks_blocks'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/sprockets-rails-2.2.4/lib/sprockets/rails/task.rb:64:in `block (2 levels) in define'
Gem::LoadError: pg is not part of the bundle. Add it to Gemfile.
/home/deploy/.rvm/gems/ruby-2.2.0/gems/bundler-1.9.1/lib/bundler/rubygems_integration.rb:261:in `block in replace_gem'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.0/lib/active_record/connection_adapters/postgresql_adapter.rb:13:in `<top (required)>'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `require'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `block in require'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:232:in `load_dependency'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `require'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.0/lib/active_record/connection_adapters/connection_specification.rb:188:in `spec'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.0/lib/active_record/connection_handling.rb:50:in `establish_connection'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.0/lib/active_record/railtie.rb:129:in `block (2 levels) in <class:Railtie>'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.0/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.0/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.0/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.0/lib/active_support/lazy_load_hooks.rb:27:in `each'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.0/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/activerecord-4.1.0/lib/active_record/railtie.rb:118:in `block in <class:Railtie>'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/railties-4.1.0/lib/rails/initializable.rb:30:in `instance_exec'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/railties-4.1.0/lib/rails/initializable.rb:30:in `run'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/railties-4.1.0/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/railties-4.1.0/lib/rails/initializable.rb:54:in `run_initializers'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/railties-4.1.0/lib/rails/application.rb:288:in `initialize!'
/home/deploy/inscope/tmp/build-142737137923106/config/environment.rb:5:in `<top (required)>'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `require'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `block in require'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:232:in `load_dependency'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `require'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/railties-4.1.0/lib/rails/application.rb:264:in `require_environment!'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/railties-4.1.0/lib/rails/application.rb:367:in `block in run_tasks_blocks'
/home/deploy/inscope/tmp/build-142737137923106/vendor/bundle/ruby/2.2.0/gems/sprockets-rails-2.2.4/lib/sprockets/rails/task.rb:64:in `block (2 levels) in define'
Tasks: TOP => environment
(See full trace by running task with --trace)
! ERROR: Deploy failed.
-----> Cleaning up build
Unlinking current
OK
! Command failed.
Failed with status 19
You have to add
gem 'pg'
In your GEMFILE, and you can see it in first row of error:
Gem::LoadError: Specified 'postgresql' for database adapter,
but the gem is not loaded.
Add `gem 'pg'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).

Can't push changes to heroku

I've added Twilio to my rails app and when I go to push the changes to heroku I'm getting the following error. I've having trouble tracing it back to the issue.
Running: rake assets:precompile
rake aborted!
undefined method `strip' for nil:NilClass
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/twilio-ruby-3.11.5/lib/twilio-ruby/rest/client.rb:142:in `initialize'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/config/initializers/twilio.rb:6:in `new'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/config/initializers/twilio.rb:6:in `<top (required)>'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `load'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `block in load'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `load'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:609:in `block (2 levels) in <class:Engine>'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:608:in `each'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:608:in `block in <class:Engine>'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `instance_exec'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `run'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:55:in `block in run_initializers'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `each'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `tsort_each_child'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:54:in `run_initializers'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/application.rb:215:in `initialize!'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/config/environment.rb:5:in `<top (required)>'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/application.rb:189:in `require_environment!'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/application.rb:250:in `block in run_tasks_blocks'
/tmp/build_04f806c2-b1ba-46f8-a554-26485f452fbd/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:54:in `block (2 levels) in define'
Tasks: TOP => environment
(See full trace by running task with --trace)
Update: In my Twilio.rb (config/initializer) I had copied over some code from Twilio's site.
require "twilio-ruby"
Once I removed this I was able to get it to push to heroku.

Resources