Skip to content

Install on Linux or Mac

Kun Yang edited this page Oct 5, 2017 · 10 revisions

Learn how to install mCard on a Mac or Linux from YouTube:

How to Install

Instructions:

  1. install Ruby and MySQL, and start MySQL server
  2. git clone https://github.com/KunYang99/mCard.git
  3. create MySQL database and load default data (e.g. ~/databases/mCard/dumps/seed.sql) You can use Sequel Pro, MySQL Workbench, or command-line to manage MySQL databases and tables
  4. go to mCard folder, for example: cd ~/databases/mCard
  5. bundle install
  6. create config/database.yml to link mCard to MySQL database. An example of database.yml
  development:
     adapter: mysql2
     encoding: utf8
     reconnect: false
     database: mcard_dev
     pool: 5
     username: root
     password: root
     hostname: localhost
     socket: /tmp/mysql.sock
  1. rails s puma
  2. Congrats, your own mCard system is online: http://localhost:3000. You will see a page like this:
  3. The default username and password for administrator is root:root. You can change the password via "Manage Your Account" or "Administration Portal".
  4. Now you are ready to use mCard to manage your own data.

Important

If it is the first time that you install mCard on the computer or the address of mCard is changed, you need to update reCAPTCHA settings. To set up reCAPTCHA:

  • Go to: https://www.google.com/recaptcha/admin#list

  • Register new site follow instructions on the page. When choosing the type of reCAPTCHA, select reCAPTCHA V2 (validate users with the "I am not a robot" checkbox)

  • After registration, you will get the new key and secret

  • Update environment variables. Add or update the following two lines in ~/.bashrc:

    export reCAPTCHA_key="YOUR_KEY"
    
    export reCAPTCHA_secret="YOUR_SECRET"
    
  • reload configuration: source ~/.bashrc

  • start or restart mCard

Learn how to set up reCAPTCHA from YouTube: How to set up reCAPTCHA for mCard