I'm having an issue getting my app to start up in production. After spending a lot of time trying to troubleshoot differences between production and development servers, I set up a clean Ubuntu 14.04 server on EC2. Everything runs fine in the development environment, but as soon as I try to do anything in the production environment, it fails immediately with no errors and no logs (that I can find). See below for what I'm getting on the command line when trying to start the server or create the database.
Starting server in Development:
ubuntu@ip-172-31-27-6:~/myapp$ RAILS_ENV=development rake db:create db:schema:load
-- enable_extension("plpgsql")
-- create_table("clients", {:force=>:cascade})
-- add_index("clients", ["user_id"], {:name=>"index_clients_on_user_id", :using=>:btree})
-- create_table("pieces", {:force=>:cascade})
-- add_index("pieces", ["user_id"], {:name=>"index_pieces_on_user_id", :using=>:btree})
-- create_table("rentals", {:force=>:cascade})
-- add_index("rentals", ["client_id"], {:name=>"index_rentals_on_client_id", :using=>:btree})
-- add_index("rentals", ["piece_id"], {:name=>"index_rentals_on_piece_id", :using=>:btree})
-- create_table("users", {:force=>:cascade})
-- add_index("users", ["email"], {:name=>"index_users_on_email", :unique=>true, :using=>:btree})
-- add_foreign_key("clients", "users")
-- add_foreign_key("pieces", "users")
-- initialize_schema_migrations_table()
0/0: [==================================================================================================] 100% Time: 00:00:00, Time: 00:00:00
In this case, the production database is created, but the tables aren't.
Basically, running any command seems to stop after getting the message "Abort testing: Your Rails environment is running in production mode!" I've tried pointing to the already-created dev database in database.yml and running the server, but I get the same problem. I've tried using WEBrick, puma and unicorn. All end up with the same issue. I even copied environments/development.rb to environments/production.rb, with no luck.
I'm new to RoR and this kind of development environment. I don't even know where to begin troubleshooting this, so any help would be appreciated.