I have created the whole database and now also created a migration named "kmigrate" when i use the " rake db:schema:dump " command it doesnt pop up an error but when i log onto schema.rb file then it pops up this error : ActiveRecord::Schema.define(:version => 20110402024216) do # Could not dump table "kusers" because of following ArgumentError # invalid date end can somebody please help ? -- 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 April 2011 06:53, kaushikxkcd <iamkaushikkumar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have created the whole database and now also created a migration > named "kmigrate" > when i use the " rake db:schema:dump " command it doesnt pop up an > error but when i log onto > schema.rb file then it pops up this error :What do you mean log onto the file? What exactly are you doing to get the error? Colin> > > ActiveRecord::Schema.define(:version => 20110402024216) do > > # Could not dump table "kusers" because of following ArgumentError > # invalid date > > end > > can somebody please help ? > > -- > 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. > >-- 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.
Hey Colin, the problem that i am facing is that, after i have created the entire database and the migration, i use the rake db:schema:dump command. After using the rake command, the database should be visible in schema.rb as i see in the tutorials. But i am unable to do that. like if my database has columns like name,age,address. Then it should show in the schema.rb file. Instead, it shows the error as below : Could not dump table "kusers" because of following ArgumentError invalid date is there some kind of date validation that i am supposed to do ? if so, i am unaware of it. Can u guide me ? On Sat, Apr 2, 2011 at 6:28 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 2 April 2011 06:53, kaushikxkcd <iamkaushikkumar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I have created the whole database and now also created a migration > > named "kmigrate" > > when i use the " rake db:schema:dump " command it doesnt pop up an > > error but when i log onto > > schema.rb file then it pops up this error : > > What do you mean log onto the file? What exactly are you doing to get > the error? > > Colin > > > > > > > ActiveRecord::Schema.define(:version => 20110402024216) do > > > > # Could not dump table "kusers" because of following ArgumentError > > # invalid date > > > > end > > > > can somebody please help ? > > > > -- > > 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. > > > > > > -- > 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. > >-- 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 3 April 2011 07:42, Kaushik Kumar <iamkaushikkumar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hey Colin,Could you not top post please, it makes it difficult to follow the thread. Insert your reply at appropriate points in previous message. Thanks.> the problem that i am facing is that, after i have created the entire > database and the migration, i use the rake db:schema:dump command. > After using the rake command, the database should be visible in schema.rb as > i see in the tutorials. But i am unable to do that. > like if my database has columns like name,age,address. > Then it should show in the schema.rb file. > Instead, it shows the error as below : > Could not dump table "kusers" because of following ArgumentError > invalid dateThe error suggests that you have a date/time field with an invalid value;, but why it should notice that when you are dumping the schema I do not know. Can you post the complete output of the rake command please. Run it in the console then copy and paste the compete text (including the command you entered) into the message. 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.
Now, this is how i used the migrate command. and it shows that the migration is successful . Note that the name of migration is ''kmigrate'' while the table is ''kusers''. "Example" is the name of the project. I:\example>rake db:migrate (in I:/example) == Kmigrate: migrating ====================== Kmigrate: migrated (0.0000s) =========== == CreateKusers: migrating ================-- create_table(:kusers) -> 0.0625s == CreateKusers: migrated (0.0625s) ======= This is the code written in \db\migrate\create_kusers.rb file class CreateKusers < ActiveRecord::Migration def self.up create_table :kusers do |t| t.string "name", :limit =>25 t.string "address", :limit => 50 t.integer "age", :limit =>50 t.timestamps end end def self.down drop_table :kusers end end Now, now the above database should be mentioned in the schema.rb as it is loaded at run-time when DUMPED. but it hows an error as follows : ActiveRecord::Schema.define(:version => 20110402024216) do # Could not dump table "kusers" because of following ArgumentError # invalid date end instead of invalid date and could not dump in the schema file, it should be able to shows the fields in of the table kusers. other than that i possibly reverted thd migration and tried again, but no luck !! But that does say that migration and revert functions are working perfectly fine. On Apr 3, 3:20 pm, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 3 April 2011 07:42, Kaushik Kumar <iamkaushikku...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hey Colin, > > Could you not top post please, it makes it difficult to follow the > thread. Insert your reply at appropriate points in previous message. > Thanks. > > > the problem that i am facing is that, after i have created the entire > > database and the migration, i use the rake db:schema:dump command. > > After using the rake command, the database should be visible in schema.rb as > > i see in the tutorials. But i am unable to do that. > > like if my database has columns like name,age,address. > > Then it should show in the schema.rb file. > > Instead, it shows the error as below : > > Could not dump table "kusers" because of following ArgumentError > > invalid date > > The error suggests that you have a date/time field with an invalid > value;, but why it should notice that when you are dumping the schema > I do not know. > > Can you post the complete output of the rake command please. Run it > in the console then copy and paste the compete text (including the > command you entered) into the message. > > 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.
oh, about before i was replying through e-mails, sorry. On Apr 3, 3:20 pm, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 3 April 2011 07:42, Kaushik Kumar <iamkaushikku...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hey Colin, > > Could you not top post please, it makes it difficult to follow the > thread. Insert your reply at appropriate points in previous message. > Thanks. > > > the problem that i am facing is that, after i have created the entire > > database and the migration, i use the rake db:schema:dump command. > > After using the rake command, the database should be visible in schema.rb as > > i see in the tutorials. But i am unable to do that. > > like if my database has columns like name,age,address. > > Then it should show in the schema.rb file. > > Instead, it shows the error as below : > > Could not dump table "kusers" because of following ArgumentError > > invalid date > > The error suggests that you have a date/time field with an invalid > value;, but why it should notice that when you are dumping the schema > I do not know. > > Can you post the complete output of the rake command please. Run it > in the console then copy and paste the compete text (including the > command you entered) into the message. > > 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.
On 3 April 2011 12:07, kaushikxkcd <iamkaushikkumar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Now, this is how i used the migrate command. and it shows that the > migration is successful . > > Note that the name of migration is ''kmigrate'' while the table is > ''kusers''. "Example" is the name of the project. > > I:\example>rake db:migrate > (in I:/example) > == Kmigrate: migrating ====================> == Kmigrate: migrated (0.0000s) ===========> > == CreateKusers: migrating ================> -- create_table(:kusers) > -> 0.0625s > == CreateKusers: migrated (0.0625s) =======> > > This is the code written in \db\migrate\create_kusers.rb file > > class CreateKusers < ActiveRecord::Migration > def self.up > create_table :kusers do |t| > t.string "name", :limit =>25 > t.string "address", :limit => 50 > t.integer "age", :limit =>50 > t.timestamps > end > end > > def self.down > drop_table :kusers > end > end > > Now, now the above database should be mentioned in the schema.rb as it > is loaded at run-time when DUMPED. > but it hows an error as follows : > > ActiveRecord::Schema.define(:version => 20110402024216) do > > # Could not dump table "kusers" because of following ArgumentError > # invalid date > > endOK, I understand, it is the *contents* of schema.rb that contains the error. Googling for the error message led me quickly to https://github.com/brianmario/mysql2/issues#issue/71 I suggest you read write through that and see if it helps. The better solution is not to use Windows for Rails development. Use this problem as an excuse to switch to, for example, Ubuntu. You can set your PC up to dual boot Win and Ubuntu, or run Ubuntu as a virtual machine on windows, or the other way around. I found that after the initial learning curve of Ubuntu my world rapidly became almost a Windows free zone. It is great to feel in control of ones machine again. 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.
On 3 April 2011 12:08, kaushikxkcd <iamkaushikkumar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> oh, about before i was replying through e-mails, sorry.So am I, that does not stop you scrolling down to insert your reply. 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Oh, i have Ubuntu. In fact, i think i have Ubuntu 10.10 Meerkut Maverick. But its jsut that i am still not very familiar with ubuntu and its file classification and systems to work in it. Now, if windows is showing such problem then i think i will take ur advice and move on to Ubuntu. Thanks a lot, i will keep you posted. On Apr 3, 4:43 pm, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 3 April 2011 12:07, kaushikxkcd <iamkaushikku...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > > > Now, this is how i used the migrate command. and it shows that the > > migration is successful . > > > Note that the name of migration is ''kmigrate'' while the table is > > ''kusers''. "Example" is the name of the project. > > > I:\example>rake db:migrate > > (in I:/example) > > == Kmigrate: migrating ====================> > == Kmigrate: migrated (0.0000s) ===========> > > == CreateKusers: migrating ================> > -- create_table(:kusers) > > -> 0.0625s > > == CreateKusers: migrated (0.0625s) =======> > > This is the code written in \db\migrate\create_kusers.rb file > > > class CreateKusers < ActiveRecord::Migration > > def self.up > > create_table :kusers do |t| > > t.string "name", :limit =>25 > > t.string "address", :limit => 50 > > t.integer "age", :limit =>50 > > t.timestamps > > end > > end > > > def self.down > > drop_table :kusers > > end > > end > > > Now, now the above database should be mentioned in the schema.rb as it > > is loaded at run-time when DUMPED. > > but it hows an error as follows : > > > ActiveRecord::Schema.define(:version => 20110402024216) do > > > # Could not dump table "kusers" because of following ArgumentError > > # invalid date > > > end > > OK, I understand, it is the *contents* of schema.rb that contains the > error. Googling for the error message led me quickly tohttps://github.com/brianmario/mysql2/issues#issue/71 > I suggest you read write through that and see if it helps. > The better solution is not to use Windows for Rails development. Use > this problem as an excuse to switch to, for example, Ubuntu. You can > set your PC up to dual boot Win and Ubuntu, or run Ubuntu as a virtual > machine on windows, or the other way around. I found that after the > initial learning curve of Ubuntu my world rapidly became almost a > Windows free zone. It is great to feel in control of ones machine > again. > > 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.