Skip to content

Setup theblog on the new Rails application

Nickolay Kondratenko edited this page Nov 30, 2015 · 5 revisions

Setup theblog on the new Rails application

First you have to setup the new Rails application:

rails new test_theblog

Then open the Gemfile and add the following line:

gem 'theblog'

and one more at the begin of the Gemfile:

source 'https://rails-assets.org'

and run bundle install.

Then add the following lines to your config/routes.rb:

mount Incarnator::Engine, at: "/auth"

mount Theblog::Engine, at: "/blog"

Run

rake db:create rake db:migrate

For now user registration is not implemented so create the confirmed user in the rails console (rails c)

Incarnator::Account.create email: 'fake@mail.com', user_name: 'username', password: 'password', confirmed_at: Time.now

Follow /blog/admin to access the admin dashboard and /blog to access the blog frontend