If you get schema.rb:16: syntax error, unexpected ','
when you do a rake environment db:setup
it may be because the ActiveRecord task that builds this file happens to use the Ruby print
statement.
So if you have a default separator set up by using
$\ = ','
somewhere in your code that gets executed before a rake task (e.g. in the header of a class) then schema.rb
will end up with stray commas interspersed with the code that gets generated.
Obviously this effect will depend on the default delimiter you've configured but if it's not whitespace, prepare for trouble.