- Update pg_hba.conf (most likely in /etc/postgresql/9.4/main) with -
- host all all 0.0.0.0/0 trust
 
- Update postgresql.conf to use listen_addresses = '*'
- Be sure to sudo service postgresql restart
Configure Vagrant
| # Test the result of config.assets.precompile | |
| # | |
| # Check which files will be regarded as "manifests" and thus precompiled and be | |
| # available for standalone use via the /assets/<asset> URL when in production. | |
| # Execute this code in your Rails console. | |
| # First, you'll probably be in development mode, so add here your | |
| # additional production precompile patterns you want to test against. | |
| precompile = Rails.configuration.assets.precompile + [/^.+\.css$/, 'active_admin.js'] | 
| # A commented nginx configuration file for Ruby on Rails | |
| # | |
| # Author: Tommaso Pavese | |
| # [email protected] | |
| # http://tommaso.pavese.me | |
| # | |
| # License: http://www.wtfpl.net/ | |
| # | |
| # | |
| # Tested with: | 
| # A commented nginx configuration file for Ruby on Rails | |
| # | |
| # Author: Tommaso Pavese | |
| # [email protected] | |
| # http://tommaso.pavese.me | |
| # | |
| # License: http://www.wtfpl.net/ | |
| # | |
| # | |
| # Tested with: | 
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |