Closed adelnabiullin closed 1 year ago
Hi @adelnabiullin - thanks for reporting this issue!
I suspect that there are two different issues you've discovered:
Errno::ENOENT: No such file or directory @ rb_sysopen
error - I can't reproduce this issue but it could be related to this change. Do you have a db/schema.rb
directory/file? It seems like the two tasks are complaining that you don't have it. Could you also try running the commands --trace
option and sharing the trace?
Don't know how to build task 'db:structure:load'
- this is due to Rails removing the deprecated task db:structure:load
in Rails 7.0 (which is probably why you see it in both 9.0.0 and 9.1.0 of the gem). Since db:structure:load:with_data
invokes the removed task, we see that error.
@adelnabiullin we just released 9.1.1 that should address this. Can you give it a try?
@ngan it works with 9.1.1, thanks 👍🏻
I'm seeing
Don't know how to build task 'db:structure:load' (See the list of available tasks with `rake --tasks`)
Did you mean? db:structure:load:with_data
with version 9.3.0
.
Also seeing it with version 9.1.1
.
The error location is different than OP's, however: /tasks/databases.rake:184
Adding a monkey patch:
namespace :db do
namespace :structure do
desc "monkey patch for task deprecated in Rails 7"
task :load do
end
end
end
resolved this issue for me.
rake data:schema:load
andrake db:schema:load:with_data
raise errors in v9.1.0 (works fine with v9.0.0).Error examples:
Also tried
db:structure:load:with_data
, it does not recognise the command (with both 9.0.0 and 9.1.0 versions ofdata_migrate
gem):System: