I've got an app for which I'd like to use the comfy cms. I did the following:
- added gem "comfortable_mexican_sofa", "~> 2.0.0"
- bundle install
- rails g comfy:cms
When I try to migrate I get the following error:
ArgumentError: wrong number of arguments (given 1, expected 0)
/Users/.../.rvm/gems/ruby-3.0.2/gems/comfortable_mexican_sofa-2.0.19/lib/comfortable_mexican_sofa/routes/cms_admin.rb:5:in `comfy_route_cms_admin'
Here is my routes.rb
class SubdomainConstraint
def self.matches?(request)
request.subdomain.present? && !Apartment::Elevators::Subdomain.excluded_subdomains.include?(request.subdomain)
end
end
Rails.application.routes.draw do
constraints SubdomainConstraint do
root "static_pages#welcome", as: 'team_root'
resources :groups
resources :bookings
resources :time_tables
resources :access_codes
resources :business_hours
devise_for :users, controllers: {invitations: "users/invitations", registrations: 'users/registrations', sessions: 'users/sessions', confirmations: 'users/confirmations', omniauth_callbacks: 'users/omniauth_callbacks'}
end
...
root "static_pages#index"
comfy_route :cms_admin, path: "/admin"
# Ensure that this route is defined last
comfy_route :cms, path: "/"
end
When I uncomment comfy_route :cms_admin, path: "/admin", I can migrate and start the server. So I think there is something wrong with my routes, but I don't know what. I also use the apartment gem for multi tenancy.