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

db directory is created automatically when custom other path is specified #181

Closed
Pysis868 opened this issue Nov 15, 2023 · 0 comments · Fixed by #182
Closed

db directory is created automatically when custom other path is specified #181

Pysis868 opened this issue Nov 15, 2023 · 0 comments · Fixed by #182

Comments

@Pysis868
Copy link
Contributor

Pysis868 commented Nov 15, 2023

Fix the lingering problem I was having: #170 (comment)

Possibly not yet handled because of a Rails upgrade?

If I explored this correctly, after a rake, Rails app, and configuration load, migrate, then dump the schema, and this dump creates the incorrect folder that I encountered.

In addition to the location mentioned in the stacktrace:

  • lib/active_record/tasks/database_tasks.rb

The other mkdir locations were in:

  • lib/active_record/migration.rb
  • lib/active_record/connection_adapters/sqlite3_adapter.rb
  • lib/active_record/connection_adapters/schema_cache.rb
[6] pry(primary)> backtrace
--> #0  ActiveRecord::Tasks::DatabaseTasks.dump_schema(db_config#ActiveRecord::DatabaseConfigurations::HashConfig, format#Symbol) at /home/<username>/.local/share/gem/ruby/3.2.0/gems/activerecord-7.0.8/lib/active_record/tasks/database_tasks.rb:431
    #1  block (4 levels) in block (4 levels) in <top (required)> at /home/<username>/.local/share/gem/ruby/3.2.0/gems/activerecord-7.0.8/lib/active_record/railties/databases.rake:461
    ͱ-- #2  Array.each at /home/<username>/.local/share/gem/ruby/3.2.0/gems/activerecord-7.0.8/lib/active_record/railties/databases.rake:457
    #3  block (3 levels) in block (3 levels) in <top (required)> at /home/<username>/.local/share/gem/ruby/3.2.0/gems/activerecord-7.0.8/lib/active_record/railties/databases.rake:457
    #4  block in Rake::Task.block in execute(args#Rake::TaskArguments) at /home/<username>/.local/share/gem/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:281
    ͱ-- #5  Array.each at /home/<username>/.local/share/gem/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:281
    #6  Rake::Task.execute(args#Rake::TaskArguments) at /home/<username>/.local/share/gem/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:281
    #7  block in Rake::Task.block in invoke_with_call_chain(task_args#Rake::TaskArguments, invocation_chain#Rake::InvocationChain::EmptyInvocationChain) at /home/<username>/.local/share/gem/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:219
    ͱ-- #8  Monitor.synchronize at /home/<username>/.local/share/gem/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:199
    #9  Rake::Task.invoke_with_call_chain(task_args#Rake::TaskArguments, invocation_chain#Rake::InvocationChain::EmptyInvocationChain) at /home/<username>/.local/share/gem/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:199
    #10 Rake::Task.invoke(*args#Array) at /home/<username>/.local/share/gem/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:188
    #11 block (2 levels) in block (2 levels) in <top (required)> at /home/<username>/.local/share/gem/ruby/3.2.0/gems/activerecord-7.0.8/lib/active_record/railties/databases.rake:113
    #12 block in Rake::Task.block in execute(args#Rake::TaskArguments) at /home/<username>/.local/share/gem/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:281
    ͱ-- #13 Array.each at /home/<username>/.local/share/gem/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:281
    #14 Rake::Task.execute(args#Rake::TaskArguments) at /home/<username>/.local/share/gem/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:281
    #15 block in Rake::Task.block in invoke_with_call_chain(task_args#Rake::TaskArguments, invocation_chain#Rake::InvocationChain::EmptyInvocationChain) at /home/<username>/.local/share/gem/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:219
    ͱ-- #16 Monitor.synchronize at /home/<username>/.local/share/gem/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:199
    #17 Rake::Task.invoke_with_call_chain(task_args#Rake::TaskArguments, invocation_chain#Rake::InvocationChain::EmptyInvocationChain) at /home/<username>/.local/share/gem/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:199
    #18 Rake::Task.invoke(*args#Array) at /home/<username>/.local/share/gem/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:188
    #19 block (2 levels) in block (2 levels) in <top (required)> at /home/<username>/.local/share/gem/ruby/3.2.0/gems/activerecord-7.0.8/lib/active_record/railties/databases.rake:105
    #20 block in Rake::Task.block in execute(args#Rake::TaskArguments) at /home/<username>/.local/share/gem/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:281
    ͱ-- #21 Array.each at /home/<username>/.local/share/gem/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:281
    #22 Rake::Task.execute(args#Rake::TaskArguments) at /home/<username>/.local/share/gem/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:281
    #23 block in Rake::Task.block in invoke_with_call_chain(task_args#Rake::TaskArguments, invocation_chain#Rake::InvocationChain::EmptyInvocationChain) at /home/<username>/.local/share/gem/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:219
    ͱ-- #24 Monitor.synchronize at /home/<username>/.local/share/gem/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:199
    #25 Rake::Task.invoke_with_call_chain(task_args#Rake::TaskArguments, invocation_chain#Rake::InvocationChain::EmptyInvocationChain) at /home/<username>/.local/share/gem/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:199
    #26 Rake::Task.invoke(*args#Array) at /home/<username>/.local/share/gem/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:188
    #27 Rake::Application.invoke_task(task_string#String) at /home/<username>/.local/share/gem/ruby/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:182
    #28 block (2 levels) in Rake::Application.block (2 levels) in top_level at /home/<username>/.local/share/gem/ruby/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:138
    ͱ-- #29 Array.each at /home/<username>/.local/share/gem/ruby/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:138
    #30 block in Rake::Application.block in top_level at /home/<username>/.local/share/gem/ruby/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:138
    #31 Rake::Application.run_with_threads at /home/<username>/.local/share/gem/ruby/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:147
    #32 Rake::Application.top_level at /home/<username>/.local/share/gem/ruby/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:132
    #33 block in Rake::Application.block in run(argv#Array) at /home/<username>/.local/share/gem/ruby/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:83
    #34 Rake::Application.standard_exception_handling at /home/<username>/.local/share/gem/ruby/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:208
    #35 Rake::Application.run(argv#Array) at /home/<username>/.local/share/gem/ruby/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:80
    #36 <top (required)> at /home/<username>/.local/share/gem/ruby/3.2.0/gems/rake-13.1.0/exe/rake:27
    ͱ-- #37 Kernel.load at /home/<username>/bin/rake:25
    #38 <main> at /home/<username>/bin/rake:25
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

Successfully merging a pull request may close this issue.

1 participant