У меня проблемы, пытаясь добавить статический поддомен, а также работает квартира камень ..Добавление статического субдомен за пределами квартиры арендатора рельсами 4
По сути я хочу сделать что-то вроде:
constraints subdomain: 'docs' do
get 'some/page'
end
однако когда я помещаю этот код в свой файл маршрутов и попытаться перейти к docs.mysite.co я получаю следующее сообщение об ошибке:
Apartment::TenantNotFound at/
One of the following schema(s) is invalid: "docs" "public", "shared_extensions"
мой весь маршруты файл следующим образом:
class SubdomainPresent
def self.matches?(request)
request.subdomain.present?
end
end
class SubdomainBlank
def self.matches?(request)
request.subdomain.blank?
end
end
Rails.application.routes.draw do
constraints subdomain: 'docs' do
get 'some/page'
end
constraints(SubdomainPresent) do
mount ImageUploader::UploadEndpoint => "/images/upload"
root 'account_dashboard#index'
devise_for :users
devise_scope :user do
get 'login', to: 'devise/sessions#new'
end
resources :accounts
end
constraints(SubdomainBlank) do
require 'sidekiq/web'
mount Sidekiq::Web => '/sidekiq'
root 'visitor#index'
resources :accounts, only: [:new, :create]
end
end
Любая помощь здесь будет принята с благодарностью! Пожалуйста, дайте мне знать, если мне нужно добавить дополнительную информацию!
EDIT # 1 Прибавляет Application.rb
require_relative 'boot'
require 'rails/all'
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
module PatrolVault20161116Web
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
config.active_job.queue_adapter = :sidekiq
end
end
Вы можете показать свое приложение.rb? – titan
Извините @titan, плохо добавьте, что теперь ДОБАВЛЕНО. –