Help Center


Install Chaskiq on Ubuntu for Development

https://app.chaskiq.io/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBbXdEIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--827f2d0b5794f7bb660c48b79e228655bd857bed/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCem9MWm05eWJXRjBTU0lJYW5CbkJqb0dSVlE2RkhKbGMybDZaVjkwYjE5c2FXMXBkRnNIYVdscGFRPT0iLCJleHAiOm51bGwsInB1ciI6InZhcmlhdGlvbiJ9fQ==--cf24ea7784b3789671bb09c4029aca003c26b32d/me.jpg

Written by Miguel Michelson

updated

So you want to set up Chaskiq on Ubuntu to hack on and develop with? We’ll assume that you don’t have Ruby/Rails/Postgre/Redis installed on your Ubuntu system. Let’s begin!.

Although this guide assumes that you are using Ubuntu, but the set-up instructions will work fine for any Debian based distribution.

Install Chaskiq Dependencies

As regular user run this script in terminal, to setup Rails development environment:

bash <(wget -qO- https://raw.githubusercontent.com/techAPJ/install-rails/master/linux)

This will install following new packages on your system:

In case you have any of this package pre-installed and don’t want to run entire script, see the script and pick the packages you don’t have currently installed. The script is fine-tuned for Discourse, and includes all the packages required for Chaskiq installation.
Now that we have installed Chaskiq dependencies, let’s move on to install Chaskiq itself.

Clone Chaskiq

Clone the Chaskiq repository (or your fork) in ~/chaskiq folder:

git clone https://github.com/chaskiq/chaskiq.git ~/chaskiq

Setup Database

Create role with the same name as your ubuntu system username:

sudo -u postgres createuser -s "$USER"

Bootstrap Chaskiq

Switch to your Chaskiq folder:

cd ~/chaskiq

Install the needed gems

bundle install

Now that you have successfully configured database connection, run these commands:

bundle exec rake db:create 
bundle exec rake db:schema:load
bundle exec rake db:seed
RAILS_ENV=test bundle exec rake db:test:clone

Now, try running the specs:

bundle exec rake rspec

Start rails server: (to have it available only on localhost)

bundle exec rails server

You should now be able to connect to chaskiq app on http://localhost:3000 - try it out!

Create New Admin

To create a new admin, run the following command:

RAILS_ENV=development bundle exec rake admin_generator

Follow the prompts, and a new admin account will be created.