Reply
Casual DocuSign User
Posts: 3
Registered: ‎09-09-2011
Accepted Solution

Ruby on Rails DocuSignSample

I'm trying to get the sample RoR app to run. I entered my credentials in the docusign.yml file, started the server, and out-of-the-box I get 

 

OpenSSL::X509::StoreError in LoginsController#new
system lib
Rails.root: /Volumes/SugarPod/Dropbox/source/DocuSign-eSignature-SDK/Ruby/DocuSignSample
Application Trace | Framework Trace | Full Trace
app/controllers/logins_controller.rb:30:in `new'

 

I'm using Ruby 1.8.7 and Rails 3.0.4

 

Anything obvious I should look at first?

DocuSign Guru
Posts: 255
Registered: ‎05-19-2011

Re: Ruby on Rails DocuSignSample

Yes, if you look at the

/config/initializers/docusign.rb

 

 you'll need to change lines

Docusign::Config[:ca_file] = '/usr/lib/ssl/certs/ca-certificates.crt'

 to reflect where your CA file is stored. 

Casual DocuSign User
Posts: 3
Registered: ‎09-09-2011

Re: Ruby on Rails DocuSignSample

Thanks, that was the ticket! For future reference (for anyone with this same issue) I had to create an SSL cert with openssl on Mac OSX like this--

 

sudo openssl req -out CSR.csr -new -newkey rsa:2048 -nodes -keyout privateKey.key 

sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout privateKey.key -out ca-certificates.crt

 

I had to sudo create the path /usr/lib/ssl/certs

 

Anyway, works now. Looking forward to checking it out.

Casual DocuSign User
Posts: 5
Registered: ‎10-01-2011

Re: Ruby on Rails DocuSignSample

I've added this to my config/initializers/docusign.rb file but it doesn't seem to be loading in that configuration because I'm still getting the certificate verify failed. I have a ca-certificates file that it's pointing to and am using for another connection, what does your connection function look like? Is the Docusign::Config[:ca_file] value used anywhere besides setting it in that initializer?

Casual DocuSign User
Posts: 5
Registered: ‎10-01-2011

Re: Ruby on Rails DocuSignSample

I can see that the Docusign::Config hash has everything in there properly just not following where it gets passed over to soap4r. Any tips?

Casual DocuSign User
Posts: 3
Registered: ‎09-09-2011

Re: Ruby on Rails DocuSignSample

Here's my docusign.rb initializer--

 

require 'docusign'

Docusign::Config = HashWithIndifferentAccess.new(YAML.load_file("#{Rails.root}/config/docusign.yml")[Rails.env])

Docusign::Config[:verify_mode] = OpenSSL::SSL::VERIFY_PEER Docusign::Config[:ca_file] = '/usr/lib/ssl/certs/ca-certificates.crt'