Фиксим выполнив
select setval('lastsearches_id_seq', (select max(id) + 1 from lastsearches));
И все - заработало.
Еще один вариант
REINDEX INDEX lastsearches_pkey;
Зарубки оставляю на своем пути что б потом не искать
REINDEX INDEX lastsearches_pkey;
dima@~/project/mp3cms$ rake db:migrate --trace
(in /home/dima/project/mp3cms)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
cannot remove Object::ClassMethods
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:603:in `remove_const'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:603:in `remove_constant'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:603:in `instance_eval'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:603:in `remove_constant'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:549:in `new_constants_in'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_suppor/dependencies.rb:549:in `each'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:549:in `new_constants_in'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
unless names.last.to_s =~ /ClassMethods/
parent।instance_eval { remove_const names।last }
end