0

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를 포함하고 있습니다.

답변

0

마지막으로 나는 고칠 수있었습니다. 나는 AWS에서 제공 한 공개 DNS를 사용하여 테스트했습니다. 내 앱이 하위 도메인을 청취 중이기 ​​때문에 오류가 발생한 것 같습니다. EC2의 ip를 사용해 보았을 때 효과가있었습니다. 그래서 저는 Route53에서 바로 브라우저의 도메인 이름을 통해 액세스했습니다. 그런 다음 이미 작동했습니다.

관련 문제