OS X 10.5.3
Gem: 1.0.1
Rails: 1.2.6
Ruby: 1.8.6
I've followed all of the steps in the "how to deploy" tutorial, and I'm trying to run my migration files to create and populate my database tables.
I'm running this command:
rake db:migrate RAILS_ENV=production
This is the output:
(in /home/USERNAME/MYAPPNAME)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
== CreateUsers: migrating =====================================================
-- create_table(:users)
-> 0.0019s
-- add_index(:users, :username)
-> 0.0029s
rake aborted!
druby://localhost:9010 - #<Errno::ETIMEDOUT: Connection timed out - connect(2)>
Here is this migration file (I've altered the info, but the structure is the same):class CreateUsers < ActiveRecord::Migration
def self.up
create_table :users do |t|
t.column :username, :string
t.column :email, :string
t.column :hashed_password, :string, :limit => 64
t.column :temp, :string, :limit => 8
end
add_index :users, :username
User.create(:username => 'testuser',
:email => 'fake@test.com',
:password => 'pass123',
:password_confirmation => 'pass123')
end
def self.down
drop_table :users
end
end
if I remove the User.create statement it run's fine until it get's to a migration which looks for that user.I do have a migration which seems to run fine that has a create statement. it populates a table with state names, here's a sample of that migration:
class CreateStates < ActiveRecord::Migration
def self.up
create_table :states do |t|
t.column :abv, :string
t.column :name, :string
t.column :region, :string
end
State.create(:abv => 'AL',
:name => 'Alabama',
:region => 'South')
State.create(:abv => 'AK',
:name => 'Alaska',
:region => 'Pacific')
State.create(:abv => 'AZ',
:name => 'Arizona',
:region => 'West')
end
def self.down
drop_table :states
end
end
like I said above, this whole migration process run's fine locally, any idea's where I'm going wrong?