Hi, there. I wrote an application in Windows and tried to run it in Ubuntu 10.04 64-bit. The app works fine in windows but I found a strange problem when I tested it in Ubuntu. Two tables in database have a column with date type and sqlite3 is able to display the data in the column. However, as I run it from the browser or rails console, all data in the column becomes nil. The ROR settings are the same in both OS except that fact that it''s running sqlite3 3.6.22 in Ubuntu and 3.6.17 in Windows. I wonder if it has something to do with the setting in Ubuntu. Thank you in advance. Ichiro -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 2 March 2011 23:24, Ichiro Saga <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hi, there. I wrote an application in Windows and tried to run it in > Ubuntu 10.04 64-bit. The app works fine in windows but I found a > strange problem when I tested it in Ubuntu. Two tables in database have > a column with date type and sqlite3 is able to display the data in the > column. However, as I run it from the browser or rails console, all > data in the column becomes nil. The ROR settings are the same in both > OS except that fact that it''s running sqlite3 3.6.22 in Ubuntu and > 3.6.17 in Windows. I wonder if it has something to do with the setting > in Ubuntu. Thank you in advance.I think you will have to give us a lot more information. Post the section from db/schema.rb for the offending table, post the model.rb (remove any irrelevant methods you have included, but if you have included a method with a name like the column that does not work then include that) and post the result of entering, in the console, model.first or something similar which should fetch a valid record. 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
> I think you will have to give us a lot more information. Post the > section from db/schema.rb for the offending table, post the model.rb > (remove any irrelevant methods you have included, but if you have > included a method with a name like the column that does not work then > include that) and post the result of entering, in the console, > model.first or something similar which should fetch a valid record. > > ColinThanks for your reply, Colin. I found the workaround that''s to change the type from date to datetime. It''s so strange that even if I created a new app in Ubuntu with date type in the model, same problem occurred. Ichiro -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.