Help Center
Installation on Mac for Development
Written by Miguel Michelson
updated
So you want to set up Chaskiq on macOS to hack on and develop with?
First. you will need to install the following requirements for installation.
Now that we have installed Chaskiq dependencies, let’s move on to installing Chaskiq itself.
Clone the Chaskiq repository in ~/chaskiq folder:
git clone https://github.com/chaskiq/chaskiq.git ~/chaskiq
~ indicates home folder, so Chaskiq source code will be available in your home folder.
Switch to your Chaskiq folder:
cd ~/chaskiq
Note that you will need to set up some environment variables first, the example file is located a .env.example in the root folder. Rename that to .env and add your variables for development.
Your file should look like this:
HOST=http://localhost:3000 ASSET_HOST=http://localhost:3000 WS=ws://localhost:3000/cable SES_ADDRESS= SES_USER_NAME= SES_PASSWORD= AWS_ACCESS_KEY_ID= AWS_SECRET_ACCESS_KEY= AWS_S3_BUCKET= AWS_S3_REGION= ADMIN_EMAIL=your@email.com ADMIN_PASSWORD=123456 SNS_CONFIGURATION_SET=metrics DEFAULT_SENDER_EMAIL=
Important things are: your HOST and WS vars and ADMIN_EMAIL and ADMIN_PASSWORD for initial admin generation
Install the needed gems
bundle install
Now that you have successfully installed gems, run these commands:
bundle exec rails db:setup
Try running the specs:
bundle exec rspec
All the tests should pass.
To fully configure development in Chaskiq you will need to run it in a subdomain. That subdomain has to be declared in your /etc/hosts file, and declared in your .env file.
Example:
/etc/hosts
127.0.0.1 app.chaskiq.test
chaskiq/.env
HOST=http://app.chaskiq.test:3000 ASSET_HOST=http://app.chaskiq.test:3000 WS=ws://app.chaskiq.test/cable
bundle exec rails server
You should now be able to connect with your Chaskiq app on http://app.chaskiq.test:3000 - try it out!
If you want to run the app asset precompilation in parallel in another terminal tab run the following:
yarn start
to run the service background tasks like email sending, file processing. you will need to run
bundle exec sidekiq
The rails admin_generator task will create an admin user for you, you will need to have an ADMIN_EMAIL and ADMIN_PASSWORD on your .env try these credentials:
rails admin_generator
Happy hacking! And to get started with that, see Beginner Guide to develop Chaskiq plugins.