Questions tagged [apartment-gem]

Database multi-tenancy for Rack (and Rails) applications

Apartment provides tools to help you deal with multiple tenants in your Rails application. It helps you to have certain data sequestered based on account or company, but still allow some data to exist in a common tenant.

Resources:

176 questions
0
votes
1 answer

Subdomain not working on heroku and namecheap for rails app

I am currently building a SaaS application using rails and I want each branch of the company to have its own subdomain. I use the apartment gem to achieve this and it works great locally but it's a nightmare in production. I can't seem to get any…
Fatimah
  • 722
  • 7
  • 16
0
votes
2 answers

Elasticsearch, Chewy, Postgres, and Apartment Multi-Tenancy

I have a multi-tenant rails-api project with rails 4.2.3 and ruby 2.2.2. I found lots of resources out there for dealing with multi-tenancy with rails and postgres, but not much regarding elasticsearch and more specifically the chewy gem. I posted…
0
votes
0 answers

Devise: User exists when using apartment gem

I have setup the Apartment gem, and have a user table in each tenant, but if I tries to create a user with the same email in two different tenants, I get "User exists" when I tries to create the user in the second tenant. No user data is saved to…
Mads E
  • 163
  • 2
  • 12
0
votes
2 answers

Mailer in Ruby on Rails

I am migrating an ROR3 application to ROR4. And I am very new to this and I am learning along with the migration. I got stuck in the first step it self I am getting an error Net::SMTPAuthenticationError in ClientsController#create 534-5.7.14…
0
votes
1 answer

Rails apartment with merit gem

I use the reputation engine Merit and I have added apartment for multitenancy. I want to exclude the merit models and tables. the following line generates an error: config.excluded_models= {Merit::Badge} undefined method `table_name' for…
0
votes
2 answers

How to enable and create 2nd level subdomains with Apartment gem?

I'm quite noob in this: Question part 1: As I understand then FirstSubdomain class can be used to enable second level subdomains, but where and how should I declare it to enable it? Question part 2: If you make a new schema with Apartment like…
Andres
  • 2,099
  • 3
  • 22
  • 39
0
votes
1 answer

Postgresql Schema not found after moving to Amazon AWS

I have a multi-tenant rails 3.2 app that uses postgresql 9.3.5 and apartment gem. Everything works fine in my local and even when I ran "rails s -e production" it still works. Also when I use "rails c production" in AWS, its working. I can intercat…
0
votes
0 answers

Postgresql default privileges for new schema in multi-tenant Rails application

In my Rails 4 multi-tenant application, I create new schemas in Postgresql with the gem Apartment. It works very well but I have a problem with the privileges for new schemas. In Postgresql, I created a "backup" user to backup my database. I defined…
-1
votes
1 answer

ruby create an apartment tenant with a button in a view

I've just create a new app with users (devise) and a model entreprise (a user could have many entreprise). This model entreprise has an attribute called subdomain. Each subdomain will have a tenant in Apartment I would not like to create the tenant…
-1
votes
1 answer

Rails requests in all apartment subdomains

I have an application with subdomain per organization. A user can be part of more than one organization. I use apartment to create tenants. How can I check if a user is in more than one subdomain after he logs in?
-1
votes
1 answer

Rails - Session Variable Not Persisting Through Apartment Switch

I have a situation. >rails -v Rails 4.2.4 >ruby -v ruby 2.1.8p440 (2015-12-16 revision 53160) [i386-mingw32] I am building a multi-tenant Time Entry solution using the Apartment gem. Here's the flow. I'm stuck. 1) User arrives at the signup page,…
1 2 3
11
12