Error Installing activerecord-activesalesforce-adapter

129 views
Skip to first unread message

jeffdonthemic

unread,
Feb 22, 2011, 6:51:35 AM2/22/11
to ActiveSalesforce
Guys, I'm trying to run Raymond and Josh's "Getting Started with the
Force.com Toolkit for Ruby" article but am running into some
installation issues.

Running script/console throws the error:

/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/
connection_adapters/abstract/connection_specification.rb:76:in
`establish_connection':RuntimeError: Please install the
activesalesforce adapter: `gem install activerecord-activesalesforce-
adapter` (no such file to load -- facets/openhash)


However, when I try and install the activerecord-activesalesforce-
adapter gem, I get:

root@ubuntu:gem install activerecord-activesalesforce-adapter
ERROR: Error installing activerecord-activesalesforce-adapter:
activemodel requires builder (~> 2.1.2, runtime)


I'm running ruby 1.8.7 and rails 2.3.8 and my gem list reports:

actionmailer (2.3.8)
actionpack (2.3.8)
activerecord (2.3.8)
activerecord-activesalesforce-adapter (2.0.0)
activeresource (2.3.8)
activesupport (3.0.4, 2.3.8)
asf-soap-adapter (1.3.0)
builder (3.0.0)
bundler (1.0.10)
facets (2.9.1)
hpricot (0.8.3)
i18n (0.5.0)
rack (1.1.0)
rails (2.3.8)
rake (0.8.7)
rdoc (3.5.3)
rforcedotcom (20.0.0)
sqlite3 (1.3.3)
sqlite3-ruby (1.3.3)

I'm wondering if it has something to do with Facets? According to the
article, "..toolkit requires the Facets to use 2.8.4..". However, I
got the following message when installing facets 2.8.4:

root@ubuntu:/home/jeff/rubygems-1.3.7# gem install facets –v 2.8.4
Successfully installed facets-2.9.1
ERROR: Could not find a valid gem '–v' (>= 0) in any repository
ERROR: Could not find a valid gem '2.8.4' (>= 0) in any repository
1 gem installed
Installing ri documentation for facets-2.9.1...
Installing RDoc documentation for facets-2.9.1...

Any ideas?

Thanks
Jeff

Siva Shanmukh Vetcha

unread,
Feb 22, 2011, 7:56:09 AM2/22/11
to activesa...@googlegroups.com
Jeff,

http://wiki.developerforce.com/index.php/Getting_Started_with_the_Force.com_Toolkit_for_Ruby

If you tried the above article, I tried that article too and got the same error.

The following 3 lines should help you fix your issue.

gem install hpricot
gem uninstall facets
gem install -v=2.8.4 facets

if (you are not able to install hpricot directly) {
try it with platform parameter.
Eg. 'gem install hpricot --platform=mswin32' (I don't know the value that platform takes in case of mac)

if (it doesn't work with platform parameter) {
the best way to install it is by installing devkit from here
it gets installed if the devkit is installed and configured as explained in the above link.
}
}

Like you pointed out, the facets version wasn't correct. I am not sure what else is not correct in that page. But this particular post worked just perfect for me. If you want to try afresh, I suggest that you follow this one instead.

http://blog.sforce.com/sforce/2010/12/setting-up-your-ruby-on-rails-environment-for-forcecom-.html

Not sent from my iPhone or my Blackberry or anyone else's



--
You received this message because you are subscribed to the Google Groups "ActiveSalesforce" group.
To post to this group, send email to activesa...@googlegroups.com.
To unsubscribe from this group, send email to activesalesfor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/activesalesforce?hl=en.


Siva Shanmukh Vetcha

unread,
Feb 22, 2011, 8:08:41 AM2/22/11
to activesa...@googlegroups.com
Jeff,

Let me know if it worked for you.

Siva.


Not sent from my iPhone or my Blackberry or anyone else's


Siva Shanmukh Vetcha

unread,
Feb 22, 2011, 8:13:29 AM2/22/11
to activesa...@googlegroups.com
One more thing is that I don't have activerecord-activesalesforce-adapter in my gem list. If the solution, I mentioned above, didn't work for you, then try uninstalling that gem as well.


Not sent from my iPhone or my Blackberry or anyone else's


Jeff Douglas

unread,
Feb 22, 2011, 9:14:50 AM2/22/11
to activesa...@googlegroups.com, Siva Shanmukh Vetcha
Bingo!

Thanks for the help Siva! Your 3 lines worked like a charm and now I'm able to successfully return a list of Account from my DE org. Really appreciate the help!

Thanks!

Jeff Douglas
google voice: (941) 227-4843
mobile: (941) 809-3455
email: je...@appirio.com
blog: http://blog.jeffdouglas.com



Appirio, Inc. 
Accelerating On-Demand in the Enterprise
http://www.appirio.com

Raymond Gao

unread,
Feb 22, 2011, 9:27:14 AM2/22/11
to activesa...@googlegroups.com, Jeff Douglas, Siva Shanmukh Vetcha
Hi guys,

The problem is due to a change in the Rforce GEM. That GEM has since removed the 'facets' dependency which provides the class 'openhash'. I suggest you install the 1.1 version of the gem, e.g.

sudo gem install asf-soap-adapter -v=1.1

That should solve the problem, since my 1.1 version has specified explicitly the dependency on 'facets' 2.8.4 gem.

By the way, I am currently working on the ASF-REST-Adapter, which has caching capability build right into the adapter. It will be available for alpha sometimes next weeks.

best,

-Ray 

raygao-gmail

unread,
Feb 22, 2011, 9:25:16 AM2/22/11
to activesa...@googlegroups.com
Hi guys,

The problem is due to a change in the Rforce GEM. That GEM has since removed the 'facets' dependency which provides the class 'openhash'. I suggest you install the 1.1 version of the gem, e.g.

sudo gem install asf-soap-adapter -v=1.1

That should solve the problem, since my 1.1 version has specified explicitly the dependench on 'facets' 2.8.4 gem.

By the way, I am currently working on the ASF-REST-Adapter, which has caching capability build right into the adapter. It will be available for alpha sometimes next weeks.

best,

-Ray

Siva Shanmukh Vetcha

unread,
Feb 22, 2011, 10:20:53 AM2/22/11
to activesa...@googlegroups.com
Nice to hear about the ASF-REST-ADAPTER. But before that, I am interested in incorporating the metadata changes into the asf-soap-adapter so that we can have rake db:migrate working.

Also can any of you help me understand if I can use model files like we do for mysql/sqlite.

@Jeff
I understand you are working towards your third post on ror. I am eagerly waiting for your post and intend to use it as a base for a session I am planning ahead.

Thanks,
Siva


Not sent from my iPhone or my Blackberry or anyone else's


Naveen kumar

unread,
Feb 22, 2011, 3:26:44 PM2/22/11
to ActiveSalesforce
Hi Siva & Jeff,

Finally good to see atleast one post which said that salesforce
is working with rails.
I wanted to know if the above discussion is applicable for Rails3.0.3
& Ruby 1.9.2.
Because I'm facing some problems on integrating salesforce with
Rails3.0.3.
Can you please clarify regarding this?

Regards,
Naveen Kumar B.V


On Feb 22, 8:20 pm, Siva Shanmukh Vetcha <siva.shanm...@gmail.com>
wrote:
> Nice to hear about the ASF-REST-ADAPTER. But before that, I am interested in
> incorporating the metadata changes into the asf-soap-adapter so that we can
> have rake db:migrate working.
>
> Also can any of you help me understand if I can use model files like we do
> for mysql/sqlite.
>
> @Jeff
> I understand you are working towards your third post on ror. I am eagerly
> waiting for your post and intend to use it as a base for a session I am
> planning ahead.
>
> Thanks,
> Siva
>
> Not sent from my iPhone or my Blackberry or anyone else's
>

Jeff Douglas

unread,
Feb 22, 2011, 5:49:45 PM2/22/11
to activesa...@googlegroups.com, Naveen kumar
Naveen,

I'm not sure the specifics on compatibility so you may want to post this to the Ruby message board. I have been seeing alot of discussions regarding Ruby and Salesforce.com lately so there is definitely a lot going on. Check out this post for more info.

Thanks!

Jeff Douglas
google voice: (941) 227-4843
mobile: (941) 809-3455
email: je...@appirio.com
blog: http://blog.jeffdouglas.com



Appirio, Inc. 
Accelerating On-Demand in the Enterprise
http://www.appirio.com




Siva Shanmukh Vetcha

unread,
Feb 23, 2011, 12:43:13 AM2/23/11
to activesa...@googlegroups.com
Naveen,

Like the reply you got on that thread in the forum, asf-soap-adapter is not rails 3.0.3 ready. Infact a lot of gems are not rails 3.0.3 ready. Even I tried a lot to get it working with 3.0.3, but realized that I am not going to use the hot additions to 3.0.3 which weren't there in rails 2.3.8 yet. and rolled back to 2.3.8 instead of 3.0.3.

In any case, the ruby version shouldn't effect this much. So you don't need to go down on ruby's version.

Siva.


Not sent from my iPhone or my Blackberry or anyone else's


Reply all
Reply to author
Forward
0 new messages