You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
I'd like to ask you - how to avoid database existence check when performing rails g rolify Role? I'd like to use rolify in my rails app template, but because DB isn't created yet everytime I run my generator I see an error
❯ rails g rolify Role
Running via Spring preloader in process 37095
invoke active_record
create app/models/role.rb
insert app/models/role.rb
/Users/alec/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activerecord-6.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:81:in `rescue in new_client': FATAL: database "test_app_development" does not exist (ActiveRecord::NoDatabaseError)
from /Users/alec/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activerecord-6.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:77:in `new_client'
from /Users/alec/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activerecord-6.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in `postgresql_connection'
from /Users/alec/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activerecord-6.1.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:882:in `public_send'
from /Users/alec/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activerecord-6.1.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:882:in `new_connection'
from /Users/alec/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activerecord-6.1.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:926:in `checkout_new_connection'
from /Users/alec/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activerecord-6.1.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:905:in `try_to_checkout_new_connection'
from /Users/alec/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activerecord-6.1.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:866:in `acquire_connection'
from /Users/alec/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activerecord-6.1.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:588:in `checkout'
from /Users/alec/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activerecord-6.1.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:428:in `connection'
from /Users/alec/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activerecord-6.1.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:1128:in `retrieve_connection'
from /Users/alec/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activerecord-6.1.4/lib/active_record/connection_handling.rb:327:in `retrieve_connection'
from /Users/alec/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/activerecord-6.1.4/lib/active_record/connection_handling.rb:283:in `connection'
from (erb):14:in `migration_template'
from /Users/alec/.rbenv/versions/3.0.1/lib/ruby/3.0.0/erb.rb:905:in `eval'
from /Users/alec/.rbenv/versions/3.0.1/lib/ruby/3.0.0/erb.rb:905:in `result'
Hi!
I'd like to ask you - how to avoid database existence check when performing
rails g rolify Role
? I'd like to use rolify in my rails app template, but because DB isn't created yet everytime I run my generator I see an errorBTW: you can check my template here
The text was updated successfully, but these errors were encountered: