11155
(-- --)
November 13, 2010, 5:11pm
1
hi
i use rails 3.0.1,mysql2 and ruby 1.9.2 on windows 7,but i met invalid
date error in many places,for example,when add index,the error happens,i
cancel index,but when activate user account using restful_authentication
plugin,the error happens again.
so how to fix it? or can you recommend the stable rails version to
use.it seems to be a problem for a few people.
11155
(-- --)
November 14, 2010, 4:36am
2
can you give some suggestions?
DK11
(DK)
November 14, 2010, 4:57am
3
can you give some suggestions?
Can you provide specific code examples and resulting errors… that would allow someone here to attempt to help you.
11155
(-- --)
November 14, 2010, 5:19am
4
David Kahn wrote in post #961291:
DK11
(DK)
November 14, 2010, 5:35am
5
David Kahn wrote in post #961291:
can you give some suggestions?
Can you provide specific code examples and resulting errors… that
would
allow someone here to attempt to help you.
I have copied the code examples in the attached file,thank you for your
help.
Attachments:
http://www.ruby-forum.com/attachment/5365/invalid_date.txt
The error seems to be in users_controller.rb line 32… can you show the code of this line and the surrounding method:
ArgumentError (invalid date):
app/controllers/users_controller.rb:32:in `activate'
11155
(-- --)
November 14, 2010, 6:02am
6
The error seems to be in users_controller.rb line 32.... can you show
the
code of this line and the surrounding method:
ArgumentError (invalid date):
app/controllers/users_controller.rb:32:in `activate'
line 32 is following:
user = User.find_by_activation_code(params[:activation_code]) unless
params[:activation_code].blank?
the surrounding methods are in attached file.
the activate is method invoked by a link in email template which is sent
successfully by an observer.
the route for activate method:
match '/activate/:activation_code' => 'users#activate', :as =>
:activate, :activation_code => nil
11155
(-- --)
November 14, 2010, 6:09am
7
The error seems to be in users_controller.rb line 32.... can you show
the
code of this line and the surrounding method:
ArgumentError (invalid date):
app/controllers/users_controller.rb:32:in `activate'
line 32 is following:
user = User.find_by_activation_code(params[:activation_code]) unless
params[:activation_code].blank?
the surrounding methods are in attached file.
the activate is method invoked by a link in email template which is sent
successfully by an observer.
the route for activate method:
match '/activate/:activation_code' => 'users#activate', :as =>
:activate, :activation_code => nil
Attachments:
http://www.ruby-forum.com/attachment/5366/surrounding_and_method_itself.txt
11155
(-- --)
November 14, 2010, 7:55am
8
I created an user and read it in my rails console,the same error
happened,it seems mysql2 has bug,but i don't know how to manage it?
please see the attachment.
Attachments:
http://www.ruby-forum.com/attachment/5367/invalid_date.PNG
11155
(-- --)
November 14, 2010, 8:48am
9
hi
I have resolved the problem by uninstalling mysql2 and using the old
mysql gem.Thank you David.