-
Notifications
You must be signed in to change notification settings - Fork 461
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
Trying to switch on tld #276
Comments
The default #
# Apartment Configuration
#
Apartment.configure do |config|
# ...
config.tld_length = 2
# ...
end |
Thanks closing I had to set #......
class Application < Rails::Application
#......
config.action_dispatch.tld_length = 2
#......
end
#........ too. |
For people arrived this thread years later: Apartment's own If both # config/initializers/apartment.rb
...
elevator = Apartment::Elevators::Subdomain
elevator.excluded_subdomains = ['savannahacademia']
Rails.application.config.middleware.insert_before Warden::Manager, elevator |
The gem is trying to switch based on the tld and am using the subdomain elevetor
http://savannahacademia.co.ke/
Apartment::TenantNotFound (One of the following schema(s) is invalid: "savannahacademia" "public"):
18:08:07 web.1 | vendor/bundle/ruby/2.0.0/gems/apartment-1.0.2/lib/apartment/adapters/postgresql_adapter.rb:92:in
rescue in connect_to_new' 18:08:07 web.1 | vendor/bundle/ruby/2.0.0/gems/apartment-1.0.2/lib/apartment/adapters/postgresql_adapter.rb:85:in
connect_to_new'18:08:07 web.1 | vendor/bundle/ruby/2.0.0/gems/apartment-1.0.2/lib/apartment/adapters/abstract_adapter.rb:84:in
switch!' 18:08:07 web.1 | vendor/bundle/ruby/2.0.0/gems/apartment-1.0.2/lib/apartment/elevators/generic.rb:21:in
call'18:08:07 web.1 | vendor/bundle/ruby/2.0.0/gems/pdfkit-0.6.2/lib/pdfkit/middleware.rb:17:in
call' 18:08:07 web.1 | vendor/bundle/ruby/2.0.0/gems/warden-1.2.3/lib/warden/manager.rb:35:in
block in call'18:08:07 web.1 | vendor/bundle/ruby/2.0.0/gems/warden-1.2.3/lib/warden/manager.rb:34:in
catch' 18:08:07 web.1 | vendor/bundle/ruby/2.0.0/gems/warden-1.2.3/lib/warden/manager.rb:34:in
call'18:08:07 web.1 | vendor/bundle/ruby/2.0.0/gems/rack-1.6.0/lib/rack/etag.rb:24:in
call' 18:08:07 web.1 | vendor/bundle/ruby/2.0.0/gems/rack-1.6.0/lib/rack/conditionalget.rb:25:in
call'The text was updated successfully, but these errors were encountered: