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 withMAILTRAP_*
variables from your account
macOS
Setup macOS environment.
Setup database:
./bin/rake db:setup
- Precompile assets:
./bin/rake assets:precompile
- Launch development server:
./bin/rails s
To launch webpack-dev-sever:
./bin/webpack-dev-server
Visit http://localhost:3000/
to view the project!
Ubuntu
Setup Ubuntu environment.
Create postgres role if you don't have one:
sudo -u postgres createuser --superuser <paste-your-username>
- Setup database:
./bin/rake db:setup
- Compile frontend packs:
./bin/rake assets:precompile
- Launch development server:
./bin/rails s
To launch webpack-dev-server:
./bin/webpack-dev-server
Visit http://localhost:3000/
to view the project!
Vagrant
- Launch virtual machine:
vagrant up
- SSH into the machine:
vagrant ssh
- Go to the project directory:
cd /vagrant
- Launch Rails server:
./bin/rails s
To launch Webpack dev server:
./bin/webpack-dev-server
Visit http://localhost:3000/
to view the project!