I have the following file named 001_create_videos.rb under db folder, and it contains this: class CreateVideos < ActiveRecord::Migration def self.up create_table :videos do |t| t.column "texto", :string t.column "content_type", :string t.column "filename", :string t.column "size", :integer # used with thumbnails, always required t.column "parent_id", :integer t.column "thumbnail", :string end # only for db-based files # create_table :db_files, :force => true do |t| # t.column :data, :binary # end end def self.down drop_table :videos # only for db-based files # drop_table :db_files end end and when I do a db:migrate it tells me this: don''t know how to build task ''001_create_videos.rb'' I also tried with rake db:migrate without luck. Can anybody help me? -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Did you use script/generate migration? Migrations need to be under db/migrate. Jason On 6/4/07, Jhon <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > I have the following file named 001_create_videos.rb under db folder, > and it contains this: > > class CreateVideos < ActiveRecord::Migration > def self.up > create_table :videos do |t| > t.column "texto", :string > t.column "content_type", :string > t.column "filename", :string > t.column "size", :integer > > # used with thumbnails, always required > t.column "parent_id", :integer > t.column "thumbnail", :string > end > > # only for db-based files > # create_table :db_files, :force => true do |t| > # t.column :data, :binary > # end > end > > def self.down > drop_table :videos > > # only for db-based files > # drop_table :db_files > end > end > > > and when I do a db:migrate it tells me this: don''t know how to build > task ''001_create_videos.rb'' > I also tried with rake db:migrate without luck. > Can anybody help me? > > -- > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
it is under migrate -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
that migration is perfectly fine, I gather it''s been made my acts_as_attachment or attachment_foo plugin??? Anyhow, I have the exact same migration(without the "texto" column and it runs no problems, so it might be a different problem. Is your database.yml connected? When you start the sever and go to the index page, does rails have the db adapter field filled in? Sounds to me like it can''t connect to the db. On Jun 5, 8:50 am, Jhon <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> it is under migrate > > -- > Posted viahttp://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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---