Skip to content

Setup Linux or Mac OS

Nathan Broadbent edited this page Mar 13, 2012 · 21 revisions

Installation on Linux or Mac OS

Set Up Configuration (Database & Settings)

Fat Free CRM supports PostGreSQL, MySQL and SQLite databases. The source code comes with
sample database configuration files, such as:

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

Based on your choice of database, create config/database.yml:

cp config/database.mysql.yml config/database.yml
  • Edit config/database.yml and specify database names and authentication details.
  • Then, edit your Gemfile and uncomment only your chosen database.

Install Gem Dependencies

After you have uncommented the right database adapter in your Gemfile,
run the following command from the application’s root directory:

bundle install --without heroku

Create Database

Now you are ready to create the database:

rake db:create

Configure Application (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.
  • Commit config/settings.yml to the git repo with the following commands:
git add -f config/settings.yml
git commit -m "Added config/settings.yml"

Example:

If all you want to do is change the language to French, your config/settings.yml file only needs to contain the following line:

:locale: "fr"

Set Up Admin User

Run the following rake task:

rake ffcrm:setup

The previous command will prompt you for an admin user, password and email.
If you want to run this task without any user input, you can set the following variables:

rake ffcrm:setup USERNAME=admin PASSWORD=password [email protected]

Load Demo Data (Optional)

You can test drive Fat Free CRM by loading sample records that are generated
on the fly mimic the actual use.

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

rake ffcrm:demo:load

Among other things the demo generator creates 8 sample user records with the
following usernames: aaron, ben, cindy, dan,
elizabeth, frank, george, and heather.
You can log in with any of these names using the name as password.
The demo site at http://demo.fatfreecrm.com provides access as a sample user as well.

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

rake 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