#43 ✓resolved

Creating users via migration in production or test environment

Reported by iwakura-taro | February 15th, 2009 @ 11:34 AM

I have application with authlogic.
There are migration for creating initial user

class CreateInitialUserAccount < ActiveRecord::Migration def self.up admin = User.new(:login => 'admin', :password => 'admin', :password_confirmation => 'admin', :admin => true, :proxies_to_buy => 0, :proxies_to_buy_limit_day => 0) admin.save end def self.down User.delete_all end end

It works in development environment,
but in production environment it works only after second try.

Attaching trace.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Object based authentication solution that handles all of the non sense for you. It's as easy as ActiveRecord is with a database.

People watching this ticket