help with: database error - parse error, unexpected $, expecting kEND

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • soidariti
    New Member
    • Apr 2007
    • 1

    #1

    help with: database error - parse error, unexpected $, expecting kEND

    database error - parse error, unexpected $, expecting kEND

    AddUserAuthoris ationToUsers.rb migration file

    1. class AddUserAuthoris ationToUsers < ActiveRecord::M igration
    2. def self.up
    3. drop_table :users
    4.
    5. create_table :users, :options => 'ENGINE=InnoDB DEFAULT CHARSET=utf8' do |t|
    6. t.column :first_name, :string
    7. t.column :last_name, :string
    8. t.column :login, :string, :limit => '80', :null => false
    9. t.column :salted_passwor d, :string, :limit => '40', :null => false
    10. t.column :email, :string, :null => false
    11. t.column :salt, :string, :limit => '40', :null => false
    12. t.column :verified, :integer, :default => '0'
    13. t.column :role, :string, :limit => '40', :default => ''
    14. t.column :security_token , :string, :limit => '40', :default => ''
    15. t.column :token_expiry, :datetime, :default => ''
    16. t.column :deleted, :integer, :default => '0'
    17. t.column :delete_after, :datetime, :default => ''
    18. end
    19. end
    20.
    21. def self.down
    22. drop_table :users
    23. end


    keeps displaying this error:
    1. rake aborted!
    2. ./db/migrate//012_add_user_au thorisation_to_ users.rb:24: parse error, unexpected $, expecting kEND

    Any ideas?
  • improvcornartist
    Recognized Expert Contributor
    • May 2007
    • 303

    #2
    The 'unexpected $, expecting kEND' error usually means you are missing an 'end' somewhere. In this case, the class is never closed with 'end'. Just add 'end' to the end of the class and that should take care of it.

    Comment

    Working...