Showing posts with label AWS. Show all posts
Showing posts with label AWS. Show all posts

Tuesday, March 29, 2016

AWS EC2, RoR, ruby...

Created an Ubuntu EC2 instance, then followed https://gorails.com/setup/ubuntu/14.04 to install and setup ruby on rails.
Also, https://www.digitalocean.com/community/tutorials/how-to-setup-ruby-on-rails-with-postgres
for the postgres setup:
in config/database.yml set:
production:
  <<: *default
  database: myrailsapp_production
  username: <linux user account here, also create user with same user name in postgres db for "create role" command>
  password: <db password from "create role" command>

Added a security group "custom tcp rule" to permit port 3000 inbound. Wasn't getting a response from ruby on rails after running 'rails server'. netstat -tulpn showed it was listening on 127.0.0.1. To make listen on all ports followed https://fullstacknotes.com/make-rails-4-2-listen-to-all-interface/ , i.e. do instead: rails server -b 0.0.0.0

should try this later.