I know there are lots of discussion regarding this error but sorry to say that I'm unable to find any working solution over there.

I'm developing a ecommerce site using [ShareTribe](https://github.com/sharetribe/sharetribe).I'm trying to implement Paypal as payment gateway.So I'm using [Activemerchant](https://github.com/activemerchant/active_merchant).

Everything works fine on development machine but when I deploy my rails app to production It throws 

> 
> OpenSSL::SSL::SSLError (SSL\_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed)
> 
> 
> 

I'm initializing my Activemerchant as 

```
 config.after_initialize do
    ActiveMerchant::Billing::Base.mode = :test
    paypal_options = {
        login: "bla bla",
        password: "bla bla",
        signature: "bla bla",
        appid: "APP-80W284485P519543T"
    }
    ::EXPRESS_GATEWAY = ActiveMerchant::Billing::PaypalExpressGateway.new(paypal_options)

  end

```

I'm trying to add Paypal Pem certificates on production but don't have any idea how to link this file with Activemerchant.Any Appreciation will be appreciated.
Thank you