Clone my repo:
cd
git clone https://github.com/selfup/DevOpsOne.git
Clone your favorite app and go into the directory of your app:
cd favorite_app_directory
Run the ruby script that will take a command line argument after the .rb
This will set up a valid database.yml for you (the most painfull process of hooking up a rails app)
For Ubuntu server
ruby ~/DevOpsOne/create_db_yml_server.rb a_password_you_will_remember
For Ubuntu Desktop
ruby ~/DevOpsOne/create_db_yml_desktop.rb a_password_you_will_remember
For Ubuntu Vagrant VM
ruby ~/DevOpsOne/create_db_yml_vagrant.rb a_password_you_will_remember
Please check your .gitignore and run git status
to make sure the script properly added the correct files to your .gitignore
Now we go into the postgres console and input the password we gave to the ruby script as an ARGV[0]
sudo -u postgres psql
\password name_of_favorite_app
\q
Now you can run development/test/production
rake db:setup
RAILS_ENV=production rake db:setup
RAILS_ENV=production rake assets:precompile
RAILS_ENV=production rails s
All done!