The Spotify API key was intentionally included in this repository. Generally, this is bad practice, but felt acceptable for the purposes of app and its relative lack of sensitivity.
- Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Install Postgres
brew install postgres
- Start Postgres:
postgres -D /usr/local/var/postgres
- In a new terminal tab, create a database:
createdb `whoami`
- Start a Postgres session:
psql
- Create user:
CREATE ROLE record_collection superuser; ALTER ROLE record_collection WITH LOGIN;
- Exit psql shell with ^D
- Configure Postgres to auto start (if you want and are ona mac)
mkdir -p ~/Library/LaunchAgents ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
- Install Redis
brew install redis
- Test your install:
redis-cli ping
(should result in PONG) - Set redis to autostart:
ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents
(if you want)
- Set up the record colletion app
- Set up git: https://help.github.com/articles/set-up-git/
- Clone the repo
- Install
ruby
&bundler
with rbenv
brew install rbenv
rbenv init
- Add the following to your .bash_profile or .zshenv
export PATH="$HOME/.rbenv/bin:/usr/local/bin:$PATH" eval "$(rbenv init -)"
source ~/.bash_profile
orsource ~/.zshenv
- Check the
Gemfile
for the current version of ruby and install it with rbenvrbenv install 2.4.3 rbenv rehash rbenv global 2.4.3
- From the root directory of your local repo, run
rbenv LOCAL 2.4.3
- Install bundler:
gem install bundler rbenv rehash
- Run bundler:
bundle install
- Create the database:
rake db:create:all
- Run the migrations:
rake db:migrate
- Run populate:
rake db:populate
- This will take a moment as it creates some smaple data for artists who had a lot of albums. Don't use this if you only want your own data.
- In a seperate console, start redis with
redis-server
- Launch the application:
foreman start -p 3000
- Visit http://localhost:3000/
rake db:test:prepare
rspec spec