2013-04-24 1 views
0

다른 포트에서 실행되는 2 개의 레일 앱이 있습니다. 한 응용 프로그램에서 다른 응용 프로그램의 API를 사용하려고합니다. 다음은 APP_1에있는 Product.rb 모델의 코드입니다.레일에서 나머지 API 소비하기 3.2.13

class Product < ActiveResource::Base 
    self.site = "https://localhost:3000" 
    self.ssl_options = {:cert   => OpenSSL::X509::Certificate.new(File.open(pem_file)), 
         :key   => OpenSSL::PKey::RSA.new(File.open(pem_file)), 
         :ca_path  => "/path/to/OpenSSL/formatted/CA_Certs", 
         :verify_mode => OpenSSL::SSL::VERIFY_PEER} 
end 

제품 모델에 컨트롤러와 경로가 설정되어 있습니다. 내가

undefined local variable or method `pem_file' for Product:Class 

사람은 PEM 파일을 작성하는 방법에 대해 말해 줄 수 얻을 APP_1 실행할 때 PEM 파일은 무엇인가?

답변