I had the Salted Login Hash Generator working at one point and then it
just stoped working. It was around the time that I changed hosts and I
think that it just might not be able to connect to the new server. I
have tried everything though and it just doesn''t seem to work out.
I''m
now thinking that maybe it has to do with something else that I changed
in the project.
Is there an easy way to see if ActionMailer is actually connecting to
the mail server and logining in?
The error that I get when I try to create a new account is:
Error creating account: confirmation email not sent
It comes from this function:
def signup
generate_blank
case @request.method
when :get
@user = User.new(@params[''user''])
else
@params[''user''].delete(''form'')
@user = User.new(@params[''user''])
begin
User.transaction(@user) do
@user.new_password = true
if @user.save
key = @user.generate_security_token
url = url_for(:action => ''welcome'')
url += "?user[id]=#{@user.id}&key=#{key}"
UserNotify.deliver_signup(@user,
@params[''user''][''password''], url)
flash[''notice''] = l(:user_signup_succeeded)
redirect_to :action => ''login''
end
end
rescue
flash.now[''message''] =
l(:user_confirmation_email_error)
end
end
end
I can''t find the function ''transaction'' anywhere.
Could it be that?
Any ideas would be greatly appreciated.
Thanks,
Eric
I got a bit more info now, I took out the resue so I am getting the
proper error.
I also commented out this line so that it wouldn''t even send the mail
and I still get his error.
if @user.save
key = @user.generate_security_token
url = url_for(:action => ''welcome'')
url += "?user[id]=#{@user.id}&key=#{key}"
#UserNotify.deliver_signup(@user,
@params[''user''][''password''], url)
#<<--- Took this line out
flash[''notice''] = l(:user_signup_succeeded)
redirect_to :action => ''login''
end
|/app/controllers/user_controller.rb:44:in `signup''
/app/controllers/user_controller.rb:42:in `transaction''
/app/controllers/user_controller.rb:42:in `signup''
||c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/usermonitor.rb:16:in
`create''
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/base.rb:1139:in
`create_or_update_without_callbacks''
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/callbacks.rb:249:in
`create_or_update''
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/base.rb:965:in
`save_without_validation''
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/validations.rb:650:in
`save_without_transactions''
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/transactions.rb:128:in
`save''
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/transactions.rb:128:in
`transaction''
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/transactions.rb:93:in
`transaction''
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/transactions.rb:120:in
`transaction''
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/transactions.rb:128:in
`save''
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/transactions.rb:93:in
`transaction''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:756:in
`send''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:756:in
`perform_action_without_filters''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/filters.rb:295:in
`perform_action_without_benchmark''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in
`perform_action_without_rescue''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in
`measure''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in
`perform_action_without_rescue''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/rescue.rb:80:in
`perform_action''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:356:in
`send''
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:356:in
`process''
c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/dispatcher.rb:32:in
`dispatch''
c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:105:in
`handle_dispatch''
c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:71:in
`service''
c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service''
c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run''
c:/ruby/lib/ruby/1.8/webrick/server.rb:155:in `start_thread''
c:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start''
c:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start_thread''
c:/ruby/lib/ruby/1.8/webrick/server.rb:94:in `start''
c:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `each''
c:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `start''
c:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start''
c:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start''
c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:57:in
`dispatch''|
> I had the Salted Login Hash Generator working at one point and then it
> just stoped working. It was around the time that I changed hosts and I
> think that it just might not be able to connect to the new server. I
> have tried everything though and it just doesn''t seem to work out.
I''m
> now thinking that maybe it has to do with something else that I
> changed in the project.
>
> Is there an easy way to see if ActionMailer is actually connecting to
> the mail server and logining in?
>
> The error that I get when I try to create a new account is:
> Error creating account: confirmation email not sent
>
> It comes from this function:
> def signup
> generate_blank
> case @request.method
> when :get
> @user = User.new(@params[''user''])
> else
> @params[''user''].delete(''form'')
> @user = User.new(@params[''user''])
>
> begin
> User.transaction(@user) do
> @user.new_password = true
> if @user.save
> key = @user.generate_security_token
> url = url_for(:action => ''welcome'')
> url += "?user[id]=#{@user.id}&key=#{key}"
> UserNotify.deliver_signup(@user,
> @params[''user''][''password''], url)
> flash[''notice''] = l(:user_signup_succeeded)
> redirect_to :action => ''login''
> end
> end
> rescue
> flash.now[''message''] =
l(:user_confirmation_email_error)
> end
> end
> end
>
> I can''t find the function ''transaction''
anywhere. Could it be that?
> Any ideas would be greatly appreciated.
> Thanks,
> Eric
>
>
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
Ok ... I''m slowly figuring this out myself. It now has to do with usermonitor trying to update the created_by and updated_by fields, but the user isn''t created yet so it dying. Any ideas on how to disable this while creating a new user? Cheers, Eric :> I got a bit more info now, I took out the resue so I am getting the > proper error. > I also commented out this line so that it wouldn''t even send the mail > and I still get his error. > > if @user.save > key = @user.generate_security_token > url = url_for(:action => ''welcome'') > url += "?user[id]=#{@user.id}&key=#{key}" > #UserNotify.deliver_signup(@user, > @params[''user''][''password''], url) #<<--- Took this line out > flash[''notice''] = l(:user_signup_succeeded) > redirect_to :action => ''login'' > end > > > |/app/controllers/user_controller.rb:44:in `signup'' > /app/controllers/user_controller.rb:42:in `transaction'' > /app/controllers/user_controller.rb:42:in `signup'' > > ||c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/usermonitor.rb:16:in > `create'' > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/base.rb:1139:in > `create_or_update_without_callbacks'' > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/callbacks.rb:249:in > `create_or_update'' > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/base.rb:965:in > `save_without_validation'' > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/validations.rb:650:in > `save_without_transactions'' > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/transactions.rb:128:in > `save'' > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/transactions.rb:128:in > `transaction'' > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/transactions.rb:93:in > `transaction'' > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/transactions.rb:120:in > `transaction'' > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/transactions.rb:128:in > `save'' > c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.11.1/lib/active_record/transactions.rb:93:in > `transaction'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:756:in > `send'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:756:in > `perform_action_without_filters'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/filters.rb:295:in > `perform_action_without_benchmark'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in > `perform_action_without_rescue'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in > `measure'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/benchmarking.rb:41:in > `perform_action_without_rescue'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/rescue.rb:80:in > `perform_action'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:356:in > `send'' > c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/base.rb:356:in > `process'' > c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/dispatcher.rb:32:in > `dispatch'' > c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:105:in > `handle_dispatch'' > c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:71:in > `service'' > c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' > c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' > c:/ruby/lib/ruby/1.8/webrick/server.rb:155:in `start_thread'' > c:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start'' > c:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'' > c:/ruby/lib/ruby/1.8/webrick/server.rb:94:in `start'' > c:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `each'' > c:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `start'' > c:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'' > c:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'' > c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:57:in > `dispatch''| > > >> I had the Salted Login Hash Generator working at one point and then >> it just stoped working. It was around the time that I changed hosts >> and I think that it just might not be able to connect to the new >> server. I have tried everything though and it just doesn''t seem to >> work out. I''m now thinking that maybe it has to do with something >> else that I changed in the project. >> >> Is there an easy way to see if ActionMailer is actually connecting to >> the mail server and logining in? >> >> The error that I get when I try to create a new account is: >> Error creating account: confirmation email not sent >> >> It comes from this function: >> def signup >> generate_blank >> case @request.method >> when :get >> @user = User.new(@params[''user'']) >> else >> @params[''user''].delete(''form'') >> @user = User.new(@params[''user'']) >> >> begin >> User.transaction(@user) do >> @user.new_password = true >> if @user.save >> key = @user.generate_security_token >> url = url_for(:action => ''welcome'') >> url += "?user[id]=#{@user.id}&key=#{key}" >> UserNotify.deliver_signup(@user, >> @params[''user''][''password''], url) >> flash[''notice''] = l(:user_signup_succeeded) >> redirect_to :action => ''login'' >> end >> end >> rescue >> flash.now[''message''] = l(:user_confirmation_email_error) >> end >> end >> end >> >> I can''t find the function ''transaction'' anywhere. Could it be that? >> Any ideas would be greatly appreciated. >> Thanks, >> Eric >> >> >> _______________________________________________ >> Rails mailing list >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails > > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails