Synatx error while running migration

hello to all,
i am getting weird syntax error while running the rake db:migrate
syntax error, unexpected tSYMBEG, expecting kDO or ‘{’ or ‘(’

Apparently i am creating an engine in my main application using
‘ruby script/generate plugin’ command in rails 2.3.0 with engine having
its own separate database define in database.yml of main application
something like this
#database of my main application
development:
adapter: mysql
encoding: utf8
database: user_development
pool: 5
username: root
password: root123
host: localhost

#database of the engine
PMS:
adapter: mysql
database: pms
username: root
password: root123
host: localhost

i have also define the necessary code inside my all engine models and
migration files
like this
code of
project.rb

class Project < ActiveRevcord::Base
self.establish_connection :pms
end

/db/migrate/20090715172542_create_projects.rb

class CreateProjects < ActiveRecord::Migration
  def self.connection

Project.connection
end

   def self.up
     create_table :projects do |t|
      t.string :name
      t.text :description
      t.integer :manager_id

       t.timestamps
    end
   end

    def self.down
      drop_table :projects
    end
   end

and one finale thing is that i have also setup many-to-many association
between Model of my main application and Model of my engine
i.e between User model of main application and Project Model of engine

The point of telling all this is i am starting to think whether i done
something wrong somewhere cuz the databases is created but i always get
the error define above while running migrations

Hey Virendra,

Run rake db:migrate --trace to see what line in what source file the
error
is.

Regards,
Gustav P.

On Tue, Jul 21, 2009 at 7:39 PM, Virendra N. <

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs