Noob question - using ActiveMerchant with Rails 2.3

148 views
Skip to first unread message

MattS

unread,
Feb 20, 2011, 10:41:55 PM2/20/11
to Active Merchant
Hi all,

I can't find the answer to this. I have an existing Rails 2.3.10 app
that now needs credit card processing. I've installed the latest
version of the ActiveMerchant (AM) repo from github. However when I
startup the app it complains because AM has activesupport 3.0.3
dependencies in it. So, how do I force the plugin installation to an
older version that is compatible with my version of rails? I've
searched all over the net, have found nothing about dealing with
versioning for AM, and am mystified by how to do this. Any help is
much appreciated. Thank you.

Matt

Error message when starting my server:

/Users/matt/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/
rubygems.rb:233:in `activate': can't activate activesupport (= 3.0.3,
runtime) for [], already activated activesupport-2.3.10 for
["rails-2.3.10"] (Gem::LoadError)

Morgan Christiansson

unread,
Feb 21, 2011, 6:30:22 AM2/21/11
to activem...@googlegroups.com, MattS
Hi Matt,

We've also run into this and a relatively easy way to deal with this
problem is to start using bundler. It will sort out all these
load/dependency problems for you and in Rails3 it's used by default.

Setting it up in Rails 2.3 is as easy as following this guide:
http://gembundler.com/rails23.html

Regards,
Morgan

Lenny Marks

unread,
Feb 21, 2011, 8:42:40 AM2/21/11
to activem...@googlegroups.com, MattS

On Feb 21, 2011, at 6:30 AM, Morgan Christiansson wrote:

> Hi Matt,
>
> We've also run into this and a relatively easy way to deal with this problem is to start using bundler. It will sort out all these load/dependency problems for you and in Rails3 it's used by default.
>
> Setting it up in Rails 2.3 is as easy as following this guide:
> http://gembundler.com/rails23.html
>
> Regards,
> Morgan

I mentioned this in another post but even with Bundler, I had problems with the 1.11.0 release of ActiveMerchant in Rails 2.3. The release notes indicate that it should be compatible but..

<paste [Active Merchant] Re: ActiveMerchant 1.11.0 released>
I don't think 1.11.0 works with Rails 2.3 at all.

activemerchant-1.11.0/lib/active_merchant.rb" line 35 of 51

require 'active_support/core_ext/module/deprecation'

active_support/core_ext/module/deprecation doesn't exist in Rails
2.3(at least not in 2.3.8 or 2.3.11). In Rails 3, that file adds
Module#deprecate but I don't see any references to that method in the
active merchant code anyway. Can that require safely be removed?
</paste>

A potential workaround is to create an empty active_support/core_ext/module/deprecation.rb in your app's lib directory. Although, I'd like to confirm that it doesn't serve any purpose.

-lenny

>
> On 21/02/11 03:41, MattS wrote:
>> Hi all,
>>
>> I can't find the answer to this. I have an existing Rails 2.3.10 app
>> that now needs credit card processing. I've installed the latest
>> version of the ActiveMerchant (AM) repo from github. However when I
>> startup the app it complains because AM has activesupport 3.0.3
>> dependencies in it. So, how do I force the plugin installation to an
>> older version that is compatible with my version of rails? I've
>> searched all over the net, have found nothing about dealing with
>> versioning for AM, and am mystified by how to do this. Any help is
>> much appreciated. Thank you.
>>
>> Matt
>>
>> Error message when starting my server:
>>
>> /Users/matt/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/
>> rubygems.rb:233:in `activate': can't activate activesupport (= 3.0.3,
>> runtime) for [], already activated activesupport-2.3.10 for
>> ["rails-2.3.10"] (Gem::LoadError)
>>
>

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

MattS

unread,
Feb 21, 2011, 1:02:43 PM2/21/11
to Active Merchant
Thank you both, guys. I'll give your suggestions a try and report
back. Your help is much appreciated.
Best,
Matt

MattS

unread,
Feb 21, 2011, 1:04:29 PM2/21/11
to Active Merchant
P.S. Does anyone know how to figure out which version of
ActiveMerchant is compatible with which version of Rails. The release
notes on github don't seem to indicate the version compatibility from
what I saw.
Thanks.
Mat

Kapslok

unread,
Feb 25, 2011, 5:56:46 AM2/25/11
to Active Merchant
Using Bundler solved this problem for me. Thanks.


On Feb 21, 9:30 pm, Morgan Christiansson

Dennis

unread,
Mar 1, 2011, 11:56:02 AM3/1/11
to Active Merchant
Sorry about these incompatibility problems with Rails 2, guys!
This has been fixed in the latest version 1.12.0 which is available
now on rubygems.

Cheers, Dennis
Reply all
Reply to author
Forward
0 new messages