Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

[Ruby 3] Wrong number of arguments (given 2, expected 1) #44

Open
lucascaton opened this issue Aug 24, 2021 · 1 comment
Open

[Ruby 3] Wrong number of arguments (given 2, expected 1) #44

lucascaton opened this issue Aug 24, 2021 · 1 comment

Comments

@lucascaton
Copy link

Hi there,

When I was upgrading a Rails 6.1 app from Ruby v2 to v3, migrations stopped working. Here's an example:

create_table :my_table, id: :uuid, default: nil do |t|
  # ...
end

And here's the output:

== 20210000000000 CreateMyTable: migrating =========================
-- create_table(:my_table, {:id=>:uuid, :default=>nil})
rails aborted!
StandardError: An error has occurred, this and all later migrations canceled:

wrong number of arguments (given 2, expected 1)

./db/migrate/20210000000000_create_my_table.rb:3:in `change'
./bin/rails:5:in `<top (required)>'

By removing the zero_downtime_migrations gem, everything works as expected :)

Cheers.

@lucascaton
Copy link
Author

Ah, I think #43 might potentially fix this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant