On 3 April 2011 12:07, kaushikxkcd <[email protected]> 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 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

