Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial DB migration fails #20

Open
WardBenjamin opened this issue Sep 18, 2018 · 1 comment
Open

Initial DB migration fails #20

WardBenjamin opened this issue Sep 18, 2018 · 1 comment

Comments

@WardBenjamin
Copy link
Contributor

WardBenjamin commented Sep 18, 2018

The first time you run bundle exec rake db:migrate, it fails with the following message:

Warning: using Pathological, but no Pathfile was found.
rake aborted!
Sequel::MassAssignmentRestriction: method email= doesn't exist
/home/ubuntu/.rvm/gems/ruby-2.3.7/gems/sequel-4.31.0/lib/sequel/model/base.rb:2159:in `block in set_restricted'
/home/ubuntu/.rvm/gems/ruby-2.3.7/gems/sequel-4.31.0/lib/sequel/model/base.rb:2146:in `each'
/home/ubuntu/.rvm/gems/ruby-2.3.7/gems/sequel-4.31.0/lib/sequel/model/base.rb:2146:in `set_restricted'
/home/ubuntu/.rvm/gems/ruby-2.3.7/gems/sequel-4.31.0/lib/sequel/model/base.rb:1575:in `set'
/home/ubuntu/.rvm/gems/ruby-2.3.7/gems/sequel-4.31.0/lib/sequel/model/base.rb:2102:in `initialize_set'
/home/ubuntu/.rvm/gems/ruby-2.3.7/gems/sequel-4.31.0/lib/sequel/model/base.rb:1177:in `initialize'
db/migrations/011_add_starting_user.rb:7:in `new'
db/migrations/011_add_starting_user.rb:7:in `block (2 levels) in <top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.3.7/gems/sequel-4.31.0/lib/sequel/extensions/migration.rb:102:in `instance_eval'
/home/ubuntu/.rvm/gems/ruby-2.3.7/gems/sequel-4.31.0/lib/sequel/extensions/migration.rb:102:in `apply'
/home/ubuntu/.rvm/gems/ruby-2.3.7/gems/sequel-4.31.0/lib/sequel/extensions/migration.rb:538:in `block (2 levels) in run'
/home/ubuntu/.rvm/gems/ruby-2.3.7/gems/sequel-4.31.0/lib/sequel/extensions/migration.rb:468:in `checked_transaction'
/home/ubuntu/.rvm/gems/ruby-2.3.7/gems/sequel-4.31.0/lib/sequel/extensions/migration.rb:537:in `block in run'
/home/ubuntu/.rvm/gems/ruby-2.3.7/gems/sequel-4.31.0/lib/sequel/extensions/migration.rb:534:in `each'
/home/ubuntu/.rvm/gems/ruby-2.3.7/gems/sequel-4.31.0/lib/sequel/extensions/migration.rb:534:in `run'
/home/ubuntu/.rvm/gems/ruby-2.3.7/gems/sequel-4.31.0/lib/sequel/extensions/migration.rb:393:in `run'
/home/ubuntu/vexu_parts/Rakefile:16:in `block (2 levels) in <top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.3.7/bin/ruby_executable_hooks:15:in `eval'
/home/ubuntu/.rvm/gems/ruby-2.3.7/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)

Subsequent tries results in a clean(er):

Warning: using Pathological, but no Pathfile was found.

Everything seems to work regardless, but I have only been able to repro this problem by re-running the migration on a new, clean database table.

@emmercm
Copy link

emmercm commented Jun 3, 2021

Seeing the same problem here, fresh MySQL instance. Running the command like this gets me past the problem:

bundle exec rake db:migrate || true
bundle exec rake db:migrate

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

No branches or pull requests

2 participants