You need to sign in to do that
Don't have an account?
Skip K
ruby on rails integrated with salesforce
I'm new to salesforce and ruby. Is there a helloworld tutorial that someone could point me to? I'm having trouble with the configuration in rails to make the connection to salesforce
I have installed:
ruby 1.9.3p125 (2012-02-16) [i386-mingw32]
Rails 3.2.1
Thanks!
Skip
I figured it out. I had to add this line to my databasedotcom.yml:
https://groups.google.com/group/activesalesforce/browse_thread/thread/40a06f8444bcada5/800c3487feb68cb7?lnk=raot&pli=1
Thanks to all who pitched in.
All Answers
Skip,
There are many options to integrate a rails project with Salesforce. However using an already written gem might be easier.
Here is one we wrote.
Salesforce Bulk Gem:
http://rubygems.org/gems/salesforce_bulk
Instructions
http://rubydoc.info/gems/salesforce_bulk/0.0.5/frames
You might also want to check out the databasedotcom gem if you don't need bulk operations.
Thanks,
Jason Stafford
Software Allies
http://www.softwareallies.com
Thanks for the reply. I'm currently using the databasedotcom gem as called for in this tutorial:
http://techblog.appirio.com/2012/01/tutorial-getting-started-with-rails.html
Any idea on setup, either on salesforce or rails that I need to implement?
I have a databasedotcom.yml that looks like this:
host: login.salesforce.com
client_secret: <client secret>
client_id: <client key>
debugging: true
username: reuel3@gmail.com
password: <password with secure token>
There was really no other configuration suggested.
Can I use those instructions for this gem too, or is there another that you could point me to?
Any help is appreciated as I've been stuck on this for too long.
Thanks,
Skip
Skip,
First you need to add databasedotcom to your gemfile
I've done all of that and I'm still getting an error. Is there something I need to do in sf to allow access? I think it may have something to do with password. I'm entering passwordtoken where my password is the one I use to login to sf.
I'm running out of ideas.
More info. This is what I get when trying to connect to sf.
I'm also using rails 3.2.3 now.
I'm begging for help!
Started GET "/" for 127.0.0.1 at 2012-05-14 13:48:11 -0400
Processing by AccountsController#index as HTML
Completed 500 Internal Server Error in 89ms
OpenSSL::SSL::SSLError (SSL_connect returned=1 errno=0 state=SSLv3 read server c
ertificate B: certificate verify failed):
app/controllers/accounts_controller.rb:6:in `index'
Rendered c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.3
/lib/action_dispatch/middleware/templates/rescues/_trace.erb (4.0ms)
Rendered c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.3
/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (2.0
ms)
Rendered c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.3
/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues
/layout (279.0ms)
[2012-05-14 13:48:18] WARN Could not determine content-length of response body.
Set content-length of the response or set Response#chunked = true
Skip - I just had this same problem, there's not much documentation out there!
Luckily I got my app up and running, and I wrote a little blog post about some handy steps and other gems to use. The last link provided in the post is a good link to a solution that has working authentication - you might want to fork their github repo. Here's the post:
http://blog.touchpointcrm.com/2012/05/building-a-mobile-rails-app-with-salesforce/
let me know if you have any specific questions, I'll see what I can do
Thanks for the reply! I was afraid no one was out there.
What did you change to get around the ssl issue? In the tutorial I'm working through it said that it didn't use ssl but I couldn't figure out how to call it using just http. I would like to understand how to get it to work with and without ssl.
Thanks for your help,
Skip
I figured it out. I had to add this line to my databasedotcom.yml:
https://groups.google.com/group/activesalesforce/browse_thread/thread/40a06f8444bcada5/800c3487feb68cb7?lnk=raot&pli=1
Thanks to all who pitched in.