Forum: Ruby on Rails Problem with migrate

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
3ca863d85ab70fae3b4f01e075d231a9?d=identicon&s=25 Jhon (Guest)
on 2007-06-05 00:12
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

    # only for db-based files
    # create_table :db_files, :force => true do |t|
    #      t.column :data, :binary
    # end

  def self.down
    drop_table :videos

    # only for db-based files
    # drop_table :db_files

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?
83ca41657a99b65d99889abe712ba5e2?d=identicon&s=25 Jason Roelofs (Guest)
on 2007-06-05 00:47
(Received via mailing list)
Did you use script/generate migration? Migrations need to be under

3ca863d85ab70fae3b4f01e075d231a9?d=identicon&s=25 Jhon (Guest)
on 2007-06-05 00:50
it is under migrate
B01fdd12039d82427a4af02360ef5571?d=identicon&s=25 cammo (Guest)
on 2007-06-06 11:24
(Received via mailing list)
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.
This topic is locked and can not be replied to.