Denis Barushev

Email: barushev@gmail.com

-bash: __git_ps1: command not found

If you use homebrew and have updated your git to 1.7.12 you should see this annoying message instead of your beautiful prompt:

-bash: __git_ps1: command not found

To solve the problem just add this line to your ~/.profile ( ~/.bash_profile, ~/.bashrc) before setting PS1:

source /usr/local/share/git-core/contrib/completion/git-prompt.sh

Update: The issue was fixed in the latest version of the git homebrew formula:

brew update
brew uninstall git
brew install git

RSpec Rails be_a_new matcher

Passes if the object is a Widget and returns true for new_record?:

object.should be_a_new(Widget)

Reset Heroku Database and Reload Seeds

Since heroku rake db:migrate:reset doesn’t work you should run:

heroku pg:reset SHARED_DATABASE --confirm <APP_NAME>
heroku rake db:migrate