Archive for 'Commands'

rails server fails to start – bin/rails:6: warning: previous definition of APP_PATH was here

If rails server fails to start for you due to APP_PATH issue below: I was able to fix the above issue in two ways: You can either comment out the spring gem or do the following instead, which I recommend: From within your project directory, do the following: Do the following at your own risk!!! […]

.rvm/scripts/functions/support: line 490: 10144 Trace/BPT trap: 5 issue

When I was trying to install ruby-2.1.3 via RVM (rvm install 2.1.3), I got the following error: I resolved this issue by reinstalling ruby 2.1.3 with –disable-binary option:

rsync copy while displaying progress

To copy a file where source and destination are on the same host: To copy a file where source is on a server and destination is on your local host:

Rails and rake db:migrate in Production Mode

There are some inconsistencies when running rails server, rails console and rake db:migrate in production mode. There really should be a standard way to let the rails and rake commands know you want to execute them in production mode. Starting Rails Server in Production Mode Starting Rails Console in Production Mode rake db:migrate in Production […]

Clearing All Rails Log Files with Rake Task

In order to clear all of your Rails log files development.log, production.log, server.log and test.log with a rake task, type: This is mainly useful while under development. Be careful with this as it will clear out your production.log file as well!

Search and Replace a Word in all Files within Directory

Use the following at your own risk. Save off your files within your directory somewhere first before running the following command. I’m posting these notes so I can refer back to them. If you want to search and replace a word in all files within a specified directory in Unix, do the following: For example, […]