423,850 Members | 1,074 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,850 IT Pros & Developers. It's quick & easy.

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

P: 1
database error - parse error, unexpected $, expecting kEND

AddUserAuthorisationToUsers.rb migration file

1. class AddUserAuthorisationToUsers < ActiveRecord::Migration
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_password, :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_authorisation_to_users.rb:24: parse error, unexpected $, expecting kEND

Any ideas?
Apr 8 '07 #1
Share this Question
Share on Google+
1 Reply


Expert 100+
P: 303
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.
Jul 8 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.