Skip to content
Andrey Nikiforov edited this page Sep 22, 2020 · 1 revision

Steps to start project locally

Clone project

git clone git@github.com:phusion/juvia.git

Install gems

Run

bundle install

You may need to install some additional stuff to make it work:

  • mysql (development package for mysql gem)
  • postgresql (development package for pg gem)
  • firefox and geckodriver for selenium-webdriver

Create and edit configs in config directory

Copy database.yml.example to database.yml and fill it with your local machine database settings. Copy application.yml.example to application.yml. You also need to setup secrets.yml as following:

development:
  secret_key_base: SECRET_STRING
  secret_token: SECRET_STRING

test:
  secret_key_base: SECRET_STRING
  secret_token: SECRET_STRING

production:
  secret_key_base: SECRET_STRING
  secret_token: SECRET_STRING

Use bundle exec rake secret to generate SECRET_STRING

Setup devise

Using bundle exec rake secret for SECRET_STRING, add following to config/initializers/devise.rb inside the Devise.setup block, like so:

Devise.setup do |config|
  ...
  config.secret_key = 'SECRET_STRING'
end

Setup database

Run

bundle exec rake db:create db:schema:load

Run server

Now run

bundle exec rails s -p 3000

It should start server in development mode on localhost:3000. That's it!