将ROS公寓宝石与Ruby 3.0.0
从2.7.4 =&gt更新Ruby版本后; 3.0.0似乎ROS-隔间宝石无法在租户之间切换。
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'
在搜索Ros-aptment的文档文档之后,该问题是在致电 @app.call(env)
我的班级以切换租户的
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
任何想法后的通用调用中的问题吗?
After updating ruby version from 2.7.4 => 3.0.0 seems that ros-apartment gem cannot switch between tenants.
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'
After searching in documentation of ros-apartment seems that the problem is on generic call after calling @app.call(env)
My class for switching tenants
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
Any idea ??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
直到公寓宝石释放我修复的任何更改
Until apartment gem release any change about that i fixed it re-adding the URI methods in init