postgresql 9.3.5 및 apartment gem을 사용하는 멀티 테넌트 레일 3.2 응용 프로그램이 있습니다. 내 지역에서는 모든 것이 잘 작동하고 "레일 -e 생산"을 실행하더라도 여전히 작동합니다. 또한 AWS에서 "레일 c 제작"을 사용할 때도 작동합니다. 나는 레일 콘솔을 통해 DB와 상호 작용할 수 있습니다. VPC를 사용하고 있습니다. 내 레일 앱은 ec2에 있고 db는 RDS에 있습니다.Amazon AWS로 이동 한 후 Postgresql 스키마를 찾을 수 없습니다.
AWS에 배포 할 때 브라우저에서이 오류가 발생합니다.
Apartment::SchemaNotFound
One of the following schema(s) is invalid: ec2-54-169-xxx-xxx, "public"
여객 로그 :
App 9023 stderr: Apartment::SchemaNotFound (One of the following schema(s) is invalid: ec2-54-169-xxx-xxx, "public"):
App 9023 stderr: apartment (0.25.2) lib/apartment/adapters/postgresql_adapter.rb:92:in `rescue in connect_to_new'
App 9023 stderr: apartment (0.25.2) lib/apartment/adapters/postgresql_adapter.rb:85:in `connect_to_new'
App 9023 stderr: apartment (0.25.2) lib/apartment/adapters/abstract_adapter.rb:100:in `switch'
App 9023 stderr: apartment (0.25.2) lib/apartment/elevators/generic.rb:20:in `call'
ec2-54-169-XXX-XXX 난 그냥 X 일부를 대체 내 EC2의 IP를 포함하고 있습니다.