cancel
Showing results for 
Search instead for 
Did you mean: 

authorize-net gem broken in rails 3

I have Rails 3.0.0.rc2 and Ruby 1.9.2p180.  I setup the gem following the websites instructions.  Now the app fails to launch due to deprecated code found in line 1 of the generated config/initilizers/authorize_net.rb.

 

It appears to be because of the use of the RAILS_ROOT constant.  I have tried substituting Rails.root and Rails.root.to_s with out any success.  Are there any known work arounds or planned fixes?

 

Thanks

 

ps I am trying to use direct post in case it helps.  And the gem I downloaded is version 1.5.2 per the "15 minute" instructions.

brett
Member
3 REPLIES 3

Here is the fix:

 

Replace all occurrences of RAILS_ROOT with Rails.root and RAILS_ENV with Rails.env.  The gem should be updated because it isn't the type of deprecation warning that spits out a warning but still works...  it is the kind of warning that prevents the application from launching period.

brett
Member

It looks like the generator still has not been fixed.  I'm following the "15 minute" instructions, and using the latest (only) version of the gem (1.5.2), and I'm still seeing the exact same error that Brett saw 18 months ago.

 

We're evaluating Authorize.net, and I won't be able to recommend it if the gem is dead.

 

Please advise.

Hello?  Any ruby devs on this forum?