In your rails project very often, after creating a new migration, you have to run the migration in the development database and then in the test database.
A neat way to combine both these steps as one, taken from the book Rails 4 in Action, is to create an alias in your ~/.bashrc configuration file with the following, so that you only have to run migrate after each migration that would apply the migration in both development and test databases:
alias migrate='bin/rake db:migrate && bin/rake db:test:prepare'
You would like to have both www.domain.name and domain.name server by Apache.
In your vhost configuration add the following two lines:
You want to be able to login to different servers with ssh, but don’t want to be using your password every time.
We assume that you already have installed ssh and have created ssh public keys in your local machine.
- Run the following in your local machine:
ssh-copy-id -i ~/.ssh/id_rsa.pub user_name@remote_host
- If you want to add aliases in your bash profile so you don’t have to type the whole address of the remote host, edit your .bashrc and add:
alias short_name="ssh user_name@remote_host"
- Restart your X server, or simply start a new terminal session
- You should be able to login with ssh without using your password by typing in your command prompt in your local machine: