views:

117

answers:

2

I'm working with ruby on rails 2.3.4 and I yesterday I found out I cannot send emails any more.

The email-related credentials are ok because I could send emails until I upgraded my rails version about two weeks ago.

The error message I get is the following:

ArgumentError in UsersController#create

wrong # of arguments(3 for 2)

D:/Proyectos/Cursometro/www/vendor/plugins/action_mailer_tls/lib/smtp_tls.rb:8:in `check_auth_args'
D:/Proyectos/Cursometro/www/vendor/plugins/action_mailer_tls/lib/smtp_tls.rb:8:in `do_start'
C:/Program Files (x86)/NetBeans 6.8/ruby2/jruby-1.4.0/lib/ruby/1.8/net/smtp.rb:525:in `start'
C:/Program Files (x86)/NetBeans 6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/actionmailer-2.3.4/lib/action_mailer/base.rb:682:in `perform_delivery_smtp'
C:/Program Files (x86)/NetBeans 6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/actionmailer-2.3.4/lib/action_mailer/base.rb:523:in `deliver!'
C:/Program Files (x86)/NetBeans 6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/actionmailer-2.3.4/lib/action_mailer/base.rb:395:in `method_missing'
D:/Proyectos/Cursometro/www/app/models/user_observer.rb:3:in `after_create'
D:/Proyectos/Cursometro/www/app/controllers/users_controller.rb:221:in `create_new_user'
D:/Proyectos/Cursometro/www/app/controllers/users_controller.rb:101:in `create'

Please, help!

A: 

Based on the stack trace, it looks like you have a plugin action_mailer_tls that is not working with 2.3.4. You may be required to update that.

You may also want to upgrade to at least Rails 2.3.5 as that was current for some time, or Rails 2.3.8 which is the new current release. If you're going to invest the time to troubleshoot an upgrade, might as well kick it as far forward as you can.

tadman
Well, I updated all the gems and not only it didn't solve my problem, but it threw me the following error when I try to start the application: Missing the Rails 2.3.4 gem. Please `gem install -v=2.3.4 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed. I installed back 2.3.4 version but no luck. Also tried to run the command of the error message but it didn't work either. What's wrong? Help!
Brian Roisentul
It's standard practice to freeze your Rails to keep it from falling out of sync (rake rails:freeze:edge RELEASE=2.3.4) although that's just a precaution. I think it's your action_mailer_tls plugin that is causing the problem. Have you updated that?
tadman
That's its last version. Anyway, I can't run any rake due to this "version" problem I'm getting. I'm searching through the whole internet to find this out but I can't solve this. Apart from that, when I run "getm list" I don't see the same versions I see using Net Beans...maybe it's listing a different directory?(I have NetBeans 6.8 and 6.7 installed, I used the last one before).
Brian Roisentul
Make sure that your config/environment.rb has a proper declaration. It should have a version in sync with what you have installed or you will have trouble like that.
tadman
It's sync. The only weird thing I see is activesupport 2.3.8 installed(when I updated) but I can't roll it back to its previous version. How do I do that?
Brian Roisentul
Usually to roll it back you remove the newer version from your local gems folder either using the gem command, or manually.
tadman
Well, I got this working by changing the gem path for my Built-in Jruby 1.4.0 platform, pointing to the gems' directory of Ruby, instead of NetBeans(as it was before). Now back to the problem...I don't see it working. I tried this but it didn't work either: http://forums.site5.com/showthread.php?t=26335
Brian Roisentul
A: 

I guess this was happening due to a conflict between my gems environments. I adjusted some things and now it's solved.

Brian Roisentul