- DocuSign Community
- :
- Dev Zone
- :
- DocuSign API Integration (Ruby, Salesforce and Other)
- :
- Re: Ruby on Rails DocuSignSample
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Ruby on Rails DocuSignSa mple
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-09-2011 10:50 AM
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-eSignatu
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?
Solved! Go to Solution.
Re: Ruby on Rails DocuSignSa mple
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-09-2011 12:29 PM
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.
Re: Ruby on Rails DocuSignSa mple
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-09-2011 01:13 PM
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.
Re: Ruby on Rails DocuSignSa mple
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-01-2011 06:34 AM
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?
Re: Ruby on Rails DocuSignSa mple
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-01-2011 06:35 AM
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?
Re: Ruby on Rails DocuSignSa mple
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-01-2011 08:54 PM
Here's my docusign.rb initializer--
require 'docusign'
Docusign::Config = HashWithIndifferentAccess.new(YAML.load_file("#{Ra
Docusign::Config[:verify_mode] = OpenSSL::SSL::VERIFY_PEER Docusign::Config[:ca_file] = '/usr/lib/ssl/certs/ca-certificates.crt'
although I don't think I had to change that. Once I added the cert file I could just run the Rails app as expected. In docusign.yml make sure you are using your email address for the user_name valuep.
Re: Ruby on Rails DocuSignSa mple
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-02-2011 05:47 PM
Thanks for the reply, this issue has been driving me crazy. My docusign.rb initializer looks the same I'm just not seeing where the docusign gem actually picks up or uses that information, does it need to be in the connection somewhere? Is there another method that utilizes the ca_path? It's strange because open-uri picks up on my ca certificates file without pointing it somewhere but I know that's part of the problem with soap4r.
Gems:
soap4r-1.5.8
docusign-0.8.0
def docusign_connection
@docusign_connection ||= Docusign::Base.login(
:integrators_key => Docusign::Config[:integrator_key],
:email => current_account.docusign_username,
:password => current_account.docusign_password,
:endpoint_url =>Docusign::Config[:default_endpoint_url],
:wiredump_dev => STDOUT
)
end
Re: Ruby on Rails DocuSignSa mple
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-03-2011 10:59 AM
You need the docusignsdk gem instead of docusign. We modified the old docusign gem to include the ca_cert configuration (so that it can run on Heroku).
Re: Ruby on Rails DocuSignSa mple
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-03-2011 05:30 PM
Great, thank you! I'll try that out today. I saw the docusignsdk gem in a couple articles but it was unclear if that was just renamed to the docusign gem since all of the github pages and everything 404. Any plans on getting this added into the official docusign gem? Accepting pull requests?
Re: Ruby on Rails DocuSignSa mple
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
10-03-2011 05:32 PM
Definitely accepting pull requests! The current docusignsdk gem is at https://github.com/nicholasareed/docusignsdk
