Development

Guides for various platforms

Emails

Snibox uses Mailtrap to send development emails. You need them just for 'reset password' feature.

Follow steps below to setup them:

  • Create account on Mailtrap
  • Copy .env.development.sample to .env:
cp .env.development.sample .env
  • Fill .env file with MAILTRAP_* variables from your account

macOS

  1. Setup macOS environment.

  2. Setup database:

./bin/rake db:setup
  1. Precompile assets:
./bin/rake assets:precompile
  1. Launch development server:
./bin/rails s

To launch webpack-dev-sever:

./bin/webpack-dev-server

Visit http://localhost:3000/ to view the project!

Ubuntu

  1. Setup Ubuntu environment.

  2. Create postgres role if you don't have one:

sudo -u postgres createuser --superuser <paste-your-username>
  1. Setup database:
./bin/rake db:setup
  1. Compile frontend packs:
./bin/rake assets:precompile
  1. Launch development server:
./bin/rails s

To launch webpack-dev-server:

./bin/webpack-dev-server

Visit http://localhost:3000/ to view the project!

Vagrant

  1. Launch virtual machine:
vagrant up
  1. SSH into the machine:
vagrant ssh
  1. Go to the project directory:
cd /vagrant
  1. Launch Rails server:
./bin/rails s

To launch Webpack dev server:

./bin/webpack-dev-server

Visit http://localhost:3000/ to view the project!