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

NoMethodError (undefined method decode' for URI:Module): lib/rescued_tenant_elevator.rb:10:in block in call' lib/rescued_tenant_elevator.rb:10:in `call' on ruby 3.0.0 #202

Closed
AlbiTabaku opened this issue May 10, 2022 · 1 comment
Labels

Comments

@AlbiTabaku
Copy link

Steps to reproduce

move from ruby 2.7.4 to 3.0.0

Expected behavior

Should switch correctly to tenants

Actual behavior

Cannot switch to tenant, problem in the generic.rb file on @app.call(env) undefined method `decode' for URI:Module)

System configuration

  • Database: (Tell us what database and its version you use.)

  • Apartment version:
    2.11.0

  • Apartment config (in config/initializers/apartment.rb or so):
    require 'apartment/elevators/subdomain'

class RescuedTenantElevator < ::Apartment::Elevators::Subdomain
def call(env)
super
rescue Apartment::TenantNotFound
[302, { 'Content-Type' => 'text/hml', 'Location' => Rails.application.routes.url_helpers.root_url }, self]
end

needed to work

def each
end
end

  • use_schemas: (true or false)

  • Rails (or ActiveRecord) version:
    6.0.4.1

  • Ruby version:
    3.0.0

@AlbiTabaku
Copy link
Author

@mnovelo mnovelo added the stale label Oct 29, 2024
@mnovelo mnovelo closed this as completed Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants