- Install RVM:
$ curl -sSL https://get.rvm.io | bash -s stable
- Install Ruby via RVM:
$ rvm install 2.2.2
- Install dependency software:
brew install postgresql
brew install mongodb
brew install redis
brew install memcached
brew install git-flow
and install heroku-toolbelt
Clone source code from bitbucket:
$ git clone https://bitbucket.org/pollios/pollios
$ cd pollios
$ git checkout develop
Update your Gemfile:
$ gem install bundler
$ bundle
Update your db/schema.rb
file to match the stucture of your database:
$ rake db:create
$ rake db:migrate
Start Sidekiq for queuing:
$ redis-server /usr/local/etc/redis.conf
$ bundle exec sidekiq
Start Memcached for caching
$ memcached -d
Run a guard script for testing
$ bundle exec guard
Start server
$ rails s
Go to web browser: localhost:3000
Clone data from your backups file(.dump) to local.
$ pg_restore --verbose --clean --no-acl --no-owner -h localhost -d pollios_development latest.dump
Setup git-flow
to manage work on git:
$ git flow init
Check out this link for information: A successful Git branching model
Install all dependencies
npm install
Run gulp to take care of parsing SCSS and bundle JS
gulp
- Add the remote to development server on heroku.
$ git remote add development [email protected]:codeapp-polliosdev.git
- Push your code to the heroku remote.
$ git push development develop:master
- Add the remote to production server on heroku.
$ git remote add production [email protected]:codeapp-pollios.git
- Push your code to the heroku remote.
$ git push production master
Push your code to the bitbucket remote.
$ git push -u bitbucket --all
Pull your code from bitbucket.
$ git pull origin master