Try doing:
cd ~/discourse source ~/.bashrc bundle install bundle exec rake db:migrate db:test:prepare db:seed_fu