Skip to content

Setup Linux or Mac OS

Steve Kenworthy edited this page Aug 28, 2024 · 21 revisions

Installation on Linux or Mac OS

Prerequisites

  • Ruby 3
  • MySQL / PostgreSQL / sqlite
  • PostgreSQL development libraries (to build pg gem)
    • postgresql-devel (RedHat)
    • libpq-dev (Debian)

Installation

git clone [email protected]:fatfreecrm/fat_free_crm.git fat_free_crm
cd fat_free_crm

Configure Database & Settings

Fat Free CRM supports PostgreSQL, MySQL and SQLite databases. The source code comes with
sample database configuration files. You will need to copy the config for your chosen db:

  • MySQL: cp config/database.mysql.yml config/database.yml
  • PostgreSQL: cp config/database.postgres.yml config/database.yml
  • SQLite: cp config/database.sqlite.yml config/database.yml

Edit config/database.yml and specify database names and authentication details.

  • Then, create an environment variable (e.g. DB=mysql) with your chosen database or change the default within the else clause in the top of your Gemfile
case ENV['CI'] && ENV['DB']
when 'sqlite'
  gem 'sqlite3', '~> 1.3.13'
when 'mysql'
  gem 'mysql2'
when 'postgres'
  gem 'pg'
else
  gem 'pg'
end

Create and Seed the Database

bundle install
rails db:create
rails db:schema:load
rails ffcrm:setup

Settings Configuration (Optional)

You can configure Fat Free CRM settings, such as your host, base URL, language (locale),
menu structures, default colors, and email authentication.

Fat Free CRM settings are stored in three places, and are loaded in the following order:

  1. config/settings.default.yml
  2. config/settings.yml (if exists)
  3. ‘settings’ table in database (if exists)

Settings loaded last have the highest priority, and override any settings from the previous sources.

To override any settings:

  • Create a blank file at config/settings.yml
  • Copy the settings that you want to override from config/settings.default.yml,
    and configure the values.

Load Demo Data (Optional)

You can test drive Fat Free CRM by loading sample records.

IMPORTANT: Loading demo will delete all existing data from your database.

rails ffcrm:demo:load

Among other things the demo generator creates 8 sample user records with the following usernames:

Username Password
aaron aaron
ben ben
cindy cindy
dan dan
elizabeth elizabeth
frank frank
george george
heather heather

Note: You can reset the database and reload demo data at any time by using rails ffcrm:demo:reload

Run the App

Now you should be able to launch the Rails server and point your web browser
to http://localhost:3000

rails server
Clone this wiki locally