Forem Creators and Builders 🌱

Cover image for ArgumentError: wrong number of arguments (given 3, expected 2)
Akhil Naidu
Akhil Naidu

Posted on

ArgumentError: wrong number of arguments (given 3, expected 2)

Error fixed with this PR


To make this post more readable, I'm shift the complete logs to comment section.

Recently, I'm facing this error quite frequently and I was not able to decipher it :p Any leads or suggestions would be great.

Update

Initially, I thought this was an error linked to Heroku or Dokku, but with this post and it's comments it was clear that, even the Fedora CoreOS and docker based Forem installation processes are also facing the same issue.

So, I raised a new issue in the Forem repository.

Upon the request in Github, there was a new PR on this issue, so for more updates you can view this PR.


In a fresh installation.

Here fresh installation indicates that deploying a new Forem instance with the latest repo.

       Using release configuration from last framework (Ruby).
-----> Discovering process types
       Procfile declares types -> release, sidekiq_worker, web
-----> Releasing leewardslope...
-----> Checking for predeploy task
       No predeploy task found, skipping
-----> Checking for release task
-----> Executing release task from Procfile: ./release-tasks.sh
=====> Start of leewardslope release task (00a819ffb) output
       + [[ '' = \b\l\o\c\k\e\d ]]
       + STATEMENT_TIMEOUT=4500000
       + bundle exec rails app_initializer:setup
       == Preparing database ==
       == 20200731033002 DropUserOptionalFields: migrating ===========================
       [strong_migrations] DANGER: No lock timeout set
       -- drop_table(:user_optional_fields)
          -> 0.0037s
       -- index_exists?(:user_optional_fields, [:label, :user_id], {:unique=>true})
       rails aborted!
       StandardError: An error has occurred, this and all later migrations canceled:
       wrong number of arguments (given 3, expected 2)
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/schema_statements.rb:99:in `index_exists?'



----- Skipping => Entire log can be seen in comments -------



       /app/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
       Caused by:
       ArgumentError: wrong number of arguments (given 3, expected 2)
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/schema_statements.rb:99:in `index_exists?'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-_bootsnap_lfi'




----- Skipping => Entire log can be seen in comments -------



       Tasks: TOP => db:prepare
       (See full trace by running task with --trace)
       ++ notify
       +++ caller
       ++ FAILED_COMMAND='18 ./release-tasks.sh: STATEMENT_TIMEOUT=4500000 bundle exec rails app_initializer:setup'
       ++ bundle exec rails runner ReleasePhaseNotifier.ping_slack
       /app/app/services/edge_cache/bust/nginx.rb:44: warning: already initialized constant Net::HTTP::Purge::METHOD
       /app/vendor/bundle/ruby/3.0.0/gems/fastly-3.0.2/lib/fastly/client.rb:166: warning: previous definition of METHOD was here
       /app/app/services/edge_cache/bust/nginx.rb:45: warning: already initialized constant Net::HTTP::Purge::REQUEST_HAS_BODY
       /app/vendor/bundle/ruby/3.0.0/gems/fastly-3.0.2/lib/fastly/client.rb:167: warning: previous definition of REQUEST_HAS_BODY was here
       /app/app/services/edge_cache/bust/nginx.rb:46: warning: already initialized constant Net::HTTP::Purge::RESPONSE_HAS_BODY
       /app/vendor/bundle/ruby/3.0.0/gems/fastly-3.0.2/lib/fastly/client.rb:168: warning: previous definition of RESPONSE_HAS_BODY was here
=====> End of leewardslope release task (00a819ffb) output
 !     Execution of release task failed: ./release-tasks.sh
2021/09/03 04:42:55 exit status 1
 !     exit status 1
2021/09/03 04:42:55 exit status 1
2021/09/03 04:42:55 exit status 1
2021/09/03 04:42:55 exit status 1
2021/09/03 04:42:55 exit status 1
 !     exit status 1
Enter fullscreen mode Exit fullscreen mode

Building the above Forem instance with old-repo

Here, I used a old-repo where the ruby version was 2.7.2

To, keep it more simple => I used the same hardware, env variables but changed the Forem repository to an older version.

It didn't exited with status 1, but have a working Forem.

-----> Releasing leewardslope...
-----> Checking for predeploy task
       No predeploy task found, skipping
-----> Checking for release task
-----> Executing release task from Procfile: ./release-tasks.sh
=====> Start of leewardslope release task (69c4b09c5) output
       + [[ '' = \b\l\o\c\k\e\d ]]
       + STATEMENT_TIMEOUT=4500000
       + bundle exec rails app_initializer:setup
       == Preparing database ==
       == Performing setup tasks ==
       == Updating Data ==
       == Bust Caches ==
       + bundle exec rake fastly:update_configs
       + bundle exec rails runner 'puts '\''app load success'\'''
       /app/app/services/edge_cache/bust/nginx.rb:44: warning: already initialized constant Net::HTTP::Purge::METHOD
       /app/vendor/bundle/ruby/2.7.0/gems/fastly-3.0.2/lib/fastly/client.rb:166: warning: previous definition of METHOD was here
       /app/app/services/edge_cache/bust/nginx.rb:45: warning: already initialized constant Net::HTTP::Purge::REQUEST_HAS_BODY
       /app/vendor/bundle/ruby/2.7.0/gems/fastly-3.0.2/lib/fastly/client.rb:167: warning: previous definition of REQUEST_HAS_BODY was here
       /app/app/services/edge_cache/bust/nginx.rb:46: warning: already initialized constant Net::HTTP::Purge::RESPONSE_HAS_BODY
       /app/vendor/bundle/ruby/2.7.0/gems/fastly-3.0.2/lib/fastly/client.rb:168: warning: previous definition of RESPONSE_HAS_BODY was here
       app load success
=====> End of leewardslope release task (69c4b09c5) output
-----> App Procfile file found
=====> Processing deployment checks
       No CHECKS file found. Simple container checks will be performed.



----- Skipping => Entire log can be seen in comments -------



-----> Running post-deploy
-----> Configuring test.leewardslope.com...(using built-in template)
-----> Creating https nginx.conf
       Enabling HSTS
       Reloading nginx
-----> Renaming containers
       Found previous container(s) (b69dd1fc5aeb) named leewardslope.sidekiq_worker.1
       Renaming container (b69dd1fc5aeb) leewardslope.sidekiq_worker.1 to leewardslope.sidekiq_worker.1.1630646338
       Renaming container (bd6a2cbb3bf8) sleepy_wing to leewardslope.sidekiq_worker.1
       Found previous container(s) (4eaea067c9f2) named leewardslope.web.1
       Renaming container (4eaea067c9f2) leewardslope.web.1 to leewardslope.web.1.1630646339
       Renaming container (d981b4adfe33) nice_dijkstra to leewardslope.web.1
-----> Checking for postdeploy task
       No postdeploy task found, skipping
-----> Shutting down old containers in 60 seconds
=====> Application deployed:
       http://test.leewardslope.com
       https://test.leewardslope.com
Enter fullscreen mode Exit fullscreen mode

Updating an Existing Forem instance to load via new repo

It didn't exited with status 1, but have a working Forem.

       Using release configuration from last framework (Ruby).
-----> Discovering process types
       Procfile declares types -> release, sidekiq_worker, web
-----> Releasing forem...
-----> Deploying forem...
-----> Checking for predeploy task
       No predeploy task found, skipping
-----> Checking for release task
-----> Executing release task from Procfile: ./release-tasks.sh
=====> Start of forem release task (48159e5ed) output
       + [[ '' = \b\l\o\c\k\e\d ]]
       + STATEMENT_TIMEOUT=4500000
       + bundle exec rails app_initializer:setup
       == Preparing database ==
       == Performing setup tasks ==
       == Updating Data ==
       == Bust Caches ==
       + bundle exec rake fastly:update_configs
       + bundle exec rails runner 'puts '\''app load success'\'''



----- Skipping => Entire log can be seen in comments -------



-----> Running post-deploy
-----> Configuring app.leewardslope.com...(using built-in template)
-----> Creating https nginx.conf
       Enabling HSTS
-----> Configuring redirect for 75.119.143.54 to app.leewardslope.com via HTTP 301...
       Reloading nginx
-----> Renaming containers
       Found previous container(s) (95202fdca051) named forem.sidekiq_worker.1
       Renaming container (95202fdca051) forem.sidekiq_worker.1 to forem.sidekiq_worker.1.1630646260
       Renaming container (629bf973e5c9) adoring_wilson to forem.sidekiq_worker.1
       Found previous container(s) (26be38e39873) named forem.web.1
       Renaming container (26be38e39873) forem.web.1 to forem.web.1.1630646261
       Renaming container (c0b2d3ee2f79) compassionate_lederberg to forem.web.1
-----> Checking for postdeploy task
       No postdeploy task found, skipping
-----> Shutting down old containers in 60 seconds
=====> Application deployed:
       http://app.leewardslope.com
       https://app.leewardslope.com
Enter fullscreen mode Exit fullscreen mode

Top comments (4)

Collapse
 
akhil profile image
Akhil Naidu

Upgrading old Forem instace (old repo) to new Forem (new repo)

surprisingly, this didn't failed; but displaying few errors.

       Using release configuration from last framework (Ruby).
----------> Discovering process types
       Procfile declares types -> release, sidekiq_worker, web
----------> Releasing forem...
---------------> Deploying forem...
---------------> Checking for predeploy task
       No predeploy task found, skipping
---------------> Checking for release task
---------------> Executing release task from Procfile: ./release-tasks.sh
=====> Start of forem release task (48159e5ed) output
       + [[ '' = \b\l\o\c\k\e\d ]]
       + STATEMENT_TIMEOUT=4500000
       + bundle exec rails app_initializer:setup
       == Preparing database ==
       == Performing setup tasks ==
       == Updating Data ==
       == Bust Caches ==
       + bundle exec rake fastly:update_configs
       + bundle exec rails runner 'puts '\''app load success'\'''
       /app/app/services/edge_cache/bust/nginx.rb:44: warning: already initialized constant Net::HTTP::Purge::METHOD
       /app/vendor/bundle/ruby/3.0.0/gems/fastly-3.0.2/lib/fastly/client.rb:166: warning: previous definition of METHOD was here
       /app/app/services/edge_cache/bust/nginx.rb:45: warning: already initialized constant Net::HTTP::Purge::REQUEST_HAS_BODY
       /app/vendor/bundle/ruby/3.0.0/gems/fastly-3.0.2/lib/fastly/client.rb:167: warning: previous definition of REQUEST_HAS_BODY was here
       /app/app/services/edge_cache/bust/nginx.rb:46: warning: already initialized constant Net::HTTP::Purge::RESPONSE_HAS_BODY
       /app/vendor/bundle/ruby/3.0.0/gems/fastly-3.0.2/lib/fastly/client.rb:168: warning: previous definition of RESPONSE_HAS_BODY was here
       app load success
=====> End of forem release task (48159e5ed) output
---------------> App Procfile file found
---------------> DOKKU_SCALE file exists
=====> Processing deployment checks
       No CHECKS file found. Simple container checks will be performed.
       For more efficient zero downtime deployments, create a CHECKS file. See https://dokku.com/docs/deployment/zero-downtime-deploys/ for examples
WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
---------------> Attempting pre-flight checks (web.1)
       Waiting for 10 seconds ...
       Default container check successful!
       Scheduling old container shutdown for web.1 in 60 seconds
WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
---------------> Attempting pre-flight checks (sidekiq_worker.1)
       Waiting for 10 seconds ...
       Default container check successful!
       Scheduling old container shutdown for sidekiq_worker.1 in 60 seconds
---------------> Running post-deploy
---------------> Configuring app.leewardslope.com...(using built-in template)
---------------> Creating https nginx.conf
       Enabling HSTS
---------------> Configuring redirect for 75.119.143.54 to app.leewardslope.com via HTTP 301...
       Reloading nginx
---------------> Renaming containers
       Found previous container(s) (95202fdca051) named forem.sidekiq_worker.1
       Renaming container (95202fdca051) forem.sidekiq_worker.1 to forem.sidekiq_worker.1.1630646260
       Renaming container (629bf973e5c9) adoring_wilson to forem.sidekiq_worker.1
       Found previous container(s) (26be38e39873) named forem.web.1
       Renaming container (26be38e39873) forem.web.1 to forem.web.1.1630646261
       Renaming container (c0b2d3ee2f79) compassionate_lederberg to forem.web.1
---------------> Checking for postdeploy task
       No postdeploy task found, skipping
---------------> Shutting down old containers in 60 seconds
=====> Application deployed:
       http://app.leewardslope.com
       https://app.leewardslope.com
Enter fullscreen mode Exit fullscreen mode
Collapse
 
akhil profile image
Akhil Naidu • Edited

Fresh Installation with new Repo.

For some reason, the release got failed.

       Using release configuration from last framework (Ruby).
-----> Discovering process types
       Procfile declares types -> release, sidekiq_worker, web
-----> Releasing leewardslope...
----------> Checking for predeploy task
       No predeploy task found, skipping
----------> Checking for release task
----------> Executing release task from Procfile: ./release-tasks.sh
=====> Start of leewardslope release task (00a819ffb) output
       + [[ '' = \b\l\o\c\k\e\d ]]
       + STATEMENT_TIMEOUT=4500000
       + bundle exec rails app_initializer:setup
       == Preparing database ==
       == 20200731033002 DropUserOptionalFields: migrating ===========================
       [strong_migrations] DANGER: No lock timeout set
       -- drop_table(:user_optional_fields)
          -> 0.0037s
       -- index_exists?(:user_optional_fields, [:label, :user_id], {:unique=>true})
       rails aborted!
       StandardError: An error has occurred, this and all later migrations canceled:
       wrong number of arguments (given 3, expected 2)
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/schema_statements.rb:99:in `index_exists?'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:929:in `block in method_missing'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:897:in `block in say_with_time'
       /app/vendor/ruby-3.0.2/lib/ruby/3.0.0/benchmark.rb:293:in `measure'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:897:in `say_with_time'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:918:in `method_missing'
       /app/vendor/bundle/ruby/3.0.0/gems/hypershield-0.2.2/lib/hypershield/migration.rb:11:in `method_missing'
       /app/vendor/bundle/ruby/3.0.0/gems/strong_migrations-0.7.8/lib/strong_migrations/migration.rb:13:in `block in method_missing'
       /app/vendor/bundle/ruby/3.0.0/gems/strong_migrations-0.7.8/lib/strong_migrations/checker.rb:339:in `perform'
       /app/vendor/bundle/ruby/3.0.0/gems/strong_migrations-0.7.8/lib/strong_migrations/migration.rb:12:in `method_missing'
       /app/db/migrate/20200731033002_drop_user_optional_fields.rb:7:in `up'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:870:in `public_send'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:870:in `exec_migration'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:851:in `block (2 levels) in migrate'
       /app/vendor/ruby-3.0.2/lib/ruby/3.0.0/benchmark.rb:293:in `measure'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:850:in `block in migrate'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:462:in `with_connection'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:849:in `migrate'
       /app/vendor/bundle/ruby/3.0.0/gems/strong_migrations-0.7.8/lib/strong_migrations/migration.rb:5:in `migrate'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:1037:in `migrate'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:1329:in `block in execute_migration_in_transaction'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:1380:in `block in ddl_transaction'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `block in transaction'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/transaction.rb:319:in `block in within_new_transaction'
       /app/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
       /app/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
       /app/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
       /app/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
       /app/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `transaction'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/transactions.rb:209:in `transaction'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:1380:in `ddl_transaction'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:1328:in `execute_migration_in_transaction'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:1302:in `each'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:1302:in `migrate_without_lock'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:1251:in `block in migrate'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:1401:in `block in with_advisory_lock'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:1416:in `block in with_advisory_lock_connection'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:462:in `with_connection'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:1416:in `with_advisory_lock_connection'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:1397:in `with_advisory_lock'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:1251:in `migrate'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:1086:in `up'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:1061:in `migrate'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/tasks/database_tasks.rb:237:in `migrate'
       /app/vendor/bundle/ruby/3.0.0/gems/strong_migrations-0.7.8/lib/strong_migrations/database_tasks.rb:4:in `migrate'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/railties/databases.rake:363:in `block (3 levels) in <main>'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/railties/databases.rake:359:in `each'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/railties/databases.rake:359:in `block (2 levels) in <main>'
       /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
       /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
       /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
       /app/vendor/bundle/ruby/3.0.0/gems/honeycomb-beeline-2.6.0/lib/honeycomb/integrations/rake.rb:21:in `block in execute'
       /app/vendor/bundle/ruby/3.0.0/gems/honeycomb-beeline-2.6.0/lib/honeycomb/client.rb:62:in `start_span'
       /app/vendor/bundle/ruby/3.0.0/gems/honeycomb-beeline-2.6.0/lib/honeycomb/integrations/rake.rb:16:in `execute'
       /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
       /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
       /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
       /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
       /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:160:in `invoke_task'
       /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 levels) in top_level'
       /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
       /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
       /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
       /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
       /app/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.1/lib/rails/commands/rake/rake_command.rb:24:in `block (2 levels) in perform'
       /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
       /app/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.1/lib/rails/commands/rake/rake_command.rb:24:in `block in perform'
       /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/rake_module.rb:59:in `with_application'
       /app/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.1/lib/rails/commands/rake/rake_command.rb:18:in `perform'
       /app/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.1/lib/rails/command.rb:50:in `invoke'
       /app/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.1/lib/rails/commands.rb:18:in `<main>'
       /app/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
       /app/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
       /app/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
       /app/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
       /app/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
       Caused by:
       ArgumentError: wrong number of arguments (given 3, expected 2)
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/schema_statements.rb:99:in `index_exists?'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:929:in `block in method_missing'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:897:in `block in say_with_time'
       /app/vendor/ruby-3.0.2/lib/ruby/3.0.0/benchmark.rb:293:in `measure'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:897:in `say_with_time'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:918:in `method_missing'
       /app/vendor/bundle/ruby/3.0.0/gems/hypershield-0.2.2/lib/hypershield/migration.rb:11:in `method_missing'
       /app/vendor/bundle/ruby/3.0.0/gems/strong_migrations-0.7.8/lib/strong_migrations/migration.rb:13:in `block in method_missing'
       /app/vendor/bundle/ruby/3.0.0/gems/strong_migrations-0.7.8/lib/strong_migrations/checker.rb:339:in `perform'
       /app/vendor/bundle/ruby/3.0.0/gems/strong_migrations-0.7.8/lib/strong_migrations/migration.rb:12:in `method_missing'
       /app/db/migrate/20200731033002_drop_user_optional_fields.rb:7:in `up'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:870:in `public_send'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:870:in `exec_migration'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:851:in `block (2 levels) in migrate'
       /app/vendor/ruby-3.0.2/lib/ruby/3.0.0/benchmark.rb:293:in `measure'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:850:in `block in migrate'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:462:in `with_connection'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:849:in `migrate'
       /app/vendor/bundle/ruby/3.0.0/gems/strong_migrations-0.7.8/lib/strong_migrations/migration.rb:5:in `migrate'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:1037:in `migrate'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:1329:in `block in execute_migration_in_transaction'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:1380:in `block in ddl_transaction'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `block in transaction'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/transaction.rb:319:in `block in within_new_transaction'
       /app/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
       /app/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
       /app/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
       /app/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
       /app/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `transaction'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/transactions.rb:209:in `transaction'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:1380:in `ddl_transaction'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:1328:in `execute_migration_in_transaction'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:1302:in `each'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:1302:in `migrate_without_lock'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:1251:in `block in migrate'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:1401:in `block in with_advisory_lock'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:1416:in `block in with_advisory_lock_connection'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:462:in `with_connection'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:1416:in `with_advisory_lock_connection'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:1397:in `with_advisory_lock'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:1251:in `migrate'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:1086:in `up'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/migration.rb:1061:in `migrate'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/tasks/database_tasks.rb:237:in `migrate'
       /app/vendor/bundle/ruby/3.0.0/gems/strong_migrations-0.7.8/lib/strong_migrations/database_tasks.rb:4:in `migrate'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/railties/databases.rake:363:in `block (3 levels) in <main>'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/railties/databases.rake:359:in `each'
       /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/railties/databases.rake:359:in `block (2 levels) in <main>'
       /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
       /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
       /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
       /app/vendor/bundle/ruby/3.0.0/gems/honeycomb-beeline-2.6.0/lib/honeycomb/integrations/rake.rb:21:in `block in execute'
       /app/vendor/bundle/ruby/3.0.0/gems/honeycomb-beeline-2.6.0/lib/honeycomb/client.rb:62:in `start_span'
       /app/vendor/bundle/ruby/3.0.0/gems/honeycomb-beeline-2.6.0/lib/honeycomb/integrations/rake.rb:16:in `execute'
       /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
       /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
       /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
       /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
       /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:160:in `invoke_task'
       /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 levels) in top_level'
       /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
       /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
       /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
       /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
       /app/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.1/lib/rails/commands/rake/rake_command.rb:24:in `block (2 levels) in perform'
       /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
       /app/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.1/lib/rails/commands/rake/rake_command.rb:24:in `block in perform'
       /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/rake_module.rb:59:in `with_application'
       /app/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.1/lib/rails/commands/rake/rake_command.rb:18:in `perform'
       /app/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.1/lib/rails/command.rb:50:in `invoke'
       /app/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.1/lib/rails/commands.rb:18:in `<main>'
       /app/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
       /app/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
       /app/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
       /app/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
       /app/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
       Tasks: TOP => db:prepare
       (See full trace by running task with --trace)
       ++ notify
       +++ caller
       ++ FAILED_COMMAND='18 ./release-tasks.sh: STATEMENT_TIMEOUT=4500000 bundle exec rails app_initializer:setup'
       ++ bundle exec rails runner ReleasePhaseNotifier.ping_slack
       /app/app/services/edge_cache/bust/nginx.rb:44: warning: already initialized constant Net::HTTP::Purge::METHOD
       /app/vendor/bundle/ruby/3.0.0/gems/fastly-3.0.2/lib/fastly/client.rb:166: warning: previous definition of METHOD was here
       /app/app/services/edge_cache/bust/nginx.rb:45: warning: already initialized constant Net::HTTP::Purge::REQUEST_HAS_BODY
       /app/vendor/bundle/ruby/3.0.0/gems/fastly-3.0.2/lib/fastly/client.rb:167: warning: previous definition of REQUEST_HAS_BODY was here
       /app/app/services/edge_cache/bust/nginx.rb:46: warning: already initialized constant Net::HTTP::Purge::RESPONSE_HAS_BODY
       /app/vendor/bundle/ruby/3.0.0/gems/fastly-3.0.2/lib/fastly/client.rb:168: warning: previous definition of RESPONSE_HAS_BODY was here
=====> End of leewardslope release task (00a819ffb) output
 !     Execution of release task failed: ./release-tasks.sh
2021/09/03 04:42:55 exit status 1
 !     exit status 1
2021/09/03 04:42:55 exit status 1
2021/09/03 04:42:55 exit status 1
2021/09/03 04:42:55 exit status 1
2021/09/03 04:42:55 exit status 1
 !     exit status 1
Enter fullscreen mode Exit fullscreen mode
Collapse
 
akhil profile image
Akhil Naidu

Fresh installation with Old repository.

Here the ruby version was 2.7.2, It didn't failed.

----------> Releasing leewardslope...
----------> Checking for predeploy task
       No predeploy task found, skipping
---------------> Checking for release task
---------------> Executing release task from Procfile: ./release-tasks.sh
=====> Start of leewardslope release task (69c4b09c5) output
       + [[ '' = \b\l\o\c\k\e\d ]]
       + STATEMENT_TIMEOUT=4500000
       + bundle exec rails app_initializer:setup
       == Preparing database ==
       == Performing setup tasks ==
       == Updating Data ==
       == Bust Caches ==
       + bundle exec rake fastly:update_configs
       + bundle exec rails runner 'puts '\''app load success'\'''
       /app/app/services/edge_cache/bust/nginx.rb:44: warning: already initialized constant Net::HTTP::Purge::METHOD
       /app/vendor/bundle/ruby/2.7.0/gems/fastly-3.0.2/lib/fastly/client.rb:166: warning: previous definition of METHOD was here
       /app/app/services/edge_cache/bust/nginx.rb:45: warning: already initialized constant Net::HTTP::Purge::REQUEST_HAS_BODY
       /app/vendor/bundle/ruby/2.7.0/gems/fastly-3.0.2/lib/fastly/client.rb:167: warning: previous definition of REQUEST_HAS_BODY was here
       /app/app/services/edge_cache/bust/nginx.rb:46: warning: already initialized constant Net::HTTP::Purge::RESPONSE_HAS_BODY
       /app/vendor/bundle/ruby/2.7.0/gems/fastly-3.0.2/lib/fastly/client.rb:168: warning: previous definition of RESPONSE_HAS_BODY was here
       app load success
=====> End of leewardslope release task (69c4b09c5) output
---------------> App Procfile file found
=====> Processing deployment checks
       No CHECKS file found. Simple container checks will be performed.
       For more efficient zero downtime deployments, create a CHECKS file. See https://dokku.com/docs/deployment/zero-downtime-deploys/ for examples
---------------> Deploying leewardslope...
WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
---------------> Attempting pre-flight checks (sidekiq_worker.1)
       Waiting for 10 seconds ...
       Default container check successful!
       Scheduling old container shutdown for sidekiq_worker.1 in 60 seconds
WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
---------------> Attempting pre-flight checks (web.1)
       Waiting for 10 seconds ...
       Default container check successful!
       Scheduling old container shutdown for web.1 in 60 seconds
---------------> Running post-deploy
---------------> Configuring test.leewardslope.com...(using built-in template)
---------------> Creating https nginx.conf
       Enabling HSTS
       Reloading nginx
---------------> Renaming containers
       Found previous container(s) (b69dd1fc5aeb) named leewardslope.sidekiq_worker.1
       Renaming container (b69dd1fc5aeb) leewardslope.sidekiq_worker.1 to leewardslope.sidekiq_worker.1.1630646338
       Renaming container (bd6a2cbb3bf8) sleepy_wing to leewardslope.sidekiq_worker.1
       Found previous container(s) (4eaea067c9f2) named leewardslope.web.1
       Renaming container (4eaea067c9f2) leewardslope.web.1 to leewardslope.web.1.1630646339
       Renaming container (d981b4adfe33) nice_dijkstra to leewardslope.web.1
---------------> Checking for postdeploy task
       No postdeploy task found, skipping
---------------> Shutting down old containers in 60 seconds
=====> Application deployed:
       http://test.leewardslope.com
       https://test.leewardslope.com
Enter fullscreen mode Exit fullscreen mode
Collapse
 
tien profile image
Tien • Edited

Hi, I have the same problem with index_exists. Hope that it will be fixed soon.

My issue is here: forem.dev/tien/dependency-failed-f...