Fix for following issue:
$ psql
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
Article: https://github.com/puma/puma/blob/master/docs/systemd.md | |
#1 nano /etc/systemd/system/puma.service | |
#2 paste from puma.service | |
Commands: | |
# After installing or making changes to puma.service | |
systemctl daemon-reload | |
# Enable so it starts on boot | |
systemctl enable puma.service |
pg_dump is a nifty utility designed to output a series of SQL statements that describes the schema and data of your database. You can control what goes into your backup by using additional flags.
Backup: pg_dump -h localhost -p 5432 -U postgres -d mydb > backup.sql
Restore: psql -h localhost -p 5432 -U postgres -d mydb < backup.sql
-h is for host.
-p is for port.
-U is for username.
-d is for database.
Container's IP Address
Container IP address using docker-compose
Stop and remove all container
Also check this helpful gist.
For every other project, the requirement of using SSL HTTPS crops up. And I’m sure, just like me, you were annoyed that there doesn’t seem to be a simple way to test your SSL stuff in your local development environment.
Well: Not any more. Here’s how you set up your local Rails environment so that you can use SSL in development if you want or need to.
Note: I’m assuming you don’t want to mess with your local Apache but want to use the regular Rails server command.
This is a brief description of how to get CircleCI builds deployed to an Engine Yard hosted staging environment automatically.
We're essentially asking CircleCI to execute commands on the Engine Yard gem to ask EY to deploy a Rails app.
CircleCI needs an SSH key and an API token to talk to Engine Yard, at that point you can execute the deploy command on the gem when the build succeeds.
# | |
# Config file for sSMTP sendmail | |
# | |
# The person who gets all mail for userids < 1000 | |
# Make this empty to disable rewriting. | |
[email protected] | |
# The place where the mail goes. The actual machine name is required no | |
# MX records are consulted. Commonly mailhosts are named mail.domain.com | |
mailhub=smtp.mandrillapp.com:587 |
NOTE: This post now lives (and kept up to date) on my blog: http://hakunin.com/rails3-load-paths
Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.