On 7 March 2012 15:33, Ryan Chin <ryanac...@gmail.com> wrote: Please don't top post, it makes it difficult to follow the thread, insert you reply into the previous post at appropriate points. Thanks.
> They're using different environments - development is on my PC, production > is on Heroku. And the answers to my other questions? Colin > > On Wed, Mar 7, 2012 at 1:07 AM, Colin Law <clan...@googlemail.com> wrote: >> >> On 7 March 2012 05:29, yellowreign <ryanac...@gmail.com> wrote: >> > I'm using Authlogic with Rails 3.0 and I'm having an issue where my >> > users >> > can't login. I have a customer model and a user model and in production >> > my >> > customer login works, but my user login doesn't (in development both >> > work >> > fine). Someone please help, users generally frown upon not being able to >> > login. >> >> When you say it works in development mode is that in the same >> environment or are you comparing development on one system with >> production on another? >> >> > >> > What happens is that when user_sessions tries to save it fails. >> > Specifically, my Heroku logs say: >> > >> > Started POST "user_sessions" >> > POST myapp.com/user_sessions >> > ArgumentError (invalid date) >> > config/initializers/american_date_monkey_patch.rb:11:in 'to_date' >> > config/initializers/american_date_monkey_patch.rb:17:in >> > 'fallback_string_to_date' >> > app/controllers/user_sessions_controller.rb:in 'create' >> > >> > american_date_monkey_patch.rb >> > >> > if RUBY_VERSION >= '1.9' >> >> Are you sure you are using the same version of ruby in production and >> development? If not then the difference may be whether this code is >> getting invoked. >> >> > class String >> > def to_date >> > if self.blank? >> > nil >> > elsif self =~ /(\d{1,2})\/(\d{1,2})\/(\d{4})/ >> > ::Date.civil($3.to_i, $1.to_i, $2.to_i) >> > else >> > ::Date.new(*::Date._parse(self, false).values_at(:year, :mon, >> > :mday)) >> >> One of the two lines above is failing (not sure which as not sure >> which as line 11 (from the error) does not seem to match either of >> them exactly. If you still can't work out what is going on then put >> some debug in to work it out. See the Rails Guide on debugging for >> clues on how to do that. >> >> Colin >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To post to this group, send email to rubyonrails-talk@googlegroups.com. >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> > > > > -- > Thanks, > Ryan > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. -- gplus.to/clanlaw -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.