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
-- 
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 [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
-~----------~----~----~----~------~----~------~--~---

Reply via email to