This project is an API to access information from a uber_pickups dataset. I found this open-source dataset on :
https://www.kaggle.com/fivethirtyeight/uber-pickups-in-new-york-city
xcode-select --install
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew doctor
brew install postgresql
ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
brew install rbenv
rbenv init
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
apt-get -y install postgresql postgresql-contrib libpq-dev
sudo apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
mkdir -p ~/.rbenv/plugins
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bashrc
source ~/.bashrc
git clone https://github.com/Grawta/partner_uber_API.git
cd partner_uber_API
rbenv install
rbenv rehash
gem install bundler
rbenv rehash
bundle install
rbenv rehash
rails db:setup
rails s
Browse to http://localhost:3000
For this part I decide to host my API on heroku. The deployment instruction are :
heroku create
git push heroku master
heroku open
heroku run rake db:seed