Monday, February 3, 2014

Git Auto Completion

You need git-autocompletion!  Especially if you are using something like git-flow.

Make sure you have brew.

brew install git bash-completion

Edit your bash_profile...

vim ~/.bash_profile

...and add this:

  if [ -f $(brew --prefix)/etc/bash_completion ]; then
    . $(brew --prefix)/etc/bash_completion


Save and restart your terminal or run source to make sure it works.

source ~/.bash_profile

Experience the bliss that is git autocompletion.

ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked:

Pesky rails debugger.  I leave the computer for half an hour to clear out some snow.  while in debug mode an my sqlite test database gets locked.  No fear.

If your dev server is affected you try opening up the console 

rails c
and running
ActiveRecord::Base.connection.execute("BEGIN TRANSACTION; END;")

...or if your test db is affected, just run

rake db:test:prepare
in the terminal.