I dropped my old development db to get a fresh one on my rails 3.1.3 application. But, when i run bundle exec rake db:seed --trace
I get the following error:
rafael@WALL-A:~/workspace/media-choice$ bundle exec rake db:seed --trace
** Invoke db:seed (first_time)
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment (first_time)
** Invoke disable_rails_admin_initializer (first_time)
** Execute disable_rails_admin_initializer
** Execute environment
[DEPRECATION WARNING] Nested I18n namespace lookup under "activerecord.models.delayed_upload_error" is no longer supported
** Execute db:abort_if_pending_migrations
** Execute db:seed
rake aborted!
stack level too deep
/home/rafael/.rvm/gems/ruby-1.9.3-p0@media-choice/gems/rake-0.9.2.2/lib/rake/task.rb:162
Tasks: TOP => db:seed
rafael@WALL-A:~/workspace/media-choice$
I've read here that it could a sass-3.1.5 problem and a downgrade to 3.1.4 would fix it. But, for me it didn't work. Also I read here it could be a rvm gemset issue. So I've uninstalled my rvm and reinstalled and all my rubies and gems. But the problem still here.
I also thought it could be my mistake on the seeds file, but I don't see no problem here:
# -*- encoding : utf-8 -*-
occupation = Occupation.create!(name: 'Estudante')
sponsor = Sponsor.create!(name: 'PROAC', logo: File.open('db/seeds/proac.jpg'))
contest = Contest.create!(name: 'Tema Livre', description: 'descrição', start_date: Date.today - 1.month, end_date: Date.today + 1.month,
call_text: 'call text', logo: File.open('db/seeds/freesubject.jpg'), enabled: true, show_in_upload: true )
contest.sponsors << sponsor
contest.content_types.create!(name: 'video')
contest.content_types.create!(name: 'audio')
contest.content_types.create!(name: 'wording')
contest.content_types.create!(name: 'photo')
user = User.new(first_name: 'José', last_name: 'da Silva', email: 'email@email.com', password: 'senhasenha',
country: 'Brasil', state: 'SP', city: 'São Paulo', gender: 'Masculino', birthdate: Date.today - 30.years,
commercialize_videos: true)
user.occupation = occupation
user.confirm!
user.save!
user2 = User.new(first_name: 'José', last_name: 'da Silva', email: 'email2@email.com', password: 'senhasenha',
country: 'Brasil', state: 'SP', city: 'São Paulo', gender: 'Masculino', birthdate: Date.today - 30.years,
commercialize_videos: true)
user2.occupation = occupation
user2.confirm!
user2.save!
user3 = User.new(first_name: 'José', last_name: 'da Silva', email: 'email3@email.com', password: 'senhasenha',
country: 'Brasil', state: 'SP', city: 'São Paulo', gender: 'Masculino', birthdate: Date.today - 30.years,
commercialize_videos: true)
user3.occupation = occupation
user3.confirm!
user3.save!
Anyone have any tip?
Thank you!