Tuesday, January 14, 2014

First Day at WeBrand with Kurtis

Yak Shaving Day at WeBrand

Installing RVM again https://rvm.io/rvm/install hope I don't have to implode it again. Last time it broke everything but I was unclear how to even use it so this time I am hoping to learn it properly.

Signing the contract!!

Installing RVM https://rvm.io/rvm/install

Cloning

List remote branches: git remote branch -v   http://gitready.com/intermediate/2009/02/13/list-remote-branches.html

Installing Mysql
  Because I run Linux Ubuntu I had to follow these directions:
    http://ariejan.net/2007/12/12/how-to-install-mysql-on-ubuntudebian/
  When I ran bundle install the mysql2 gem wouldn't work so:
    I did a gem install mysql2 -v '0.3.13'
    That didn't work so I contacted Lars and Kurtis found this link:
      http://stackoverflow.com/questions/3608287/error-installing-mysql2-failed-to-build-gem-native-extension
     I ran $ sudo apt-get install libmysql-ruby libmysqlclient-dev
       Lars' directions: $ apt-get install build-essential libmysqlclient-dev
       if it still complains then try the
       $ apt-get install libmysql-ruby
   and when I ran the bundle install it worked this time.

Seeding the Database:
These are rake commands:
$ SEED_DATA=product bundle exec rake db:create db:migrate db:seed

$ SEED_DATA=pointlessmerch_entries bundle exec rake db:seed

$ SEED_DATA=pointlessmerch bundle exec rake db:seed

Tried to bundle install again and ran into a postgress error:
  PG::Error (fe_sendauth: no password supplied
So I used these directions: http://stackoverflow.com/questions/12452073/trying-to-set-up-postgres-for-ror-app-getting-error-fe-sendauth-no-password
    sudo gvim /etc/postgresql/9.1/main/pg_hba.conf
Lars says: $ sudo su - postgres
                 Then psql

I changed the pg_hba.conf  methods to trust.
Once I did that I restarted $ sudo service postgresql restart

Set up a user in pg
I get this error:createuser: could not connect to database postgres: FATAL:  role "root" does not exist

Google:postgres setup root user
This solved it:
sudo -s -u postgres
createuser -d

Then I seeded the database 
$ SEED_DATA=product bundle exec rake db:create db:migrate db:seed

$ SEED_DATA=pointlessmerch_entries bundle exec rake db:seed

$ SEED_DATA=pointlessmerch bundle exec rake db:seed

I ran $ bundle exec rails s   and it worked.

I now have a local copy of webrand.

No comments:

Post a Comment