Install Flux on MacOS (Lion)

Install MySQL 5.1.59

Change MySQL root password. Replace pw whith a better one.

mysql -u root
mysql> set password for 'root'@'localhost' = PASSWORD('pw');
mysql> set password for 'root'@'127.0.0.1' = PASSWORD('pw');
mysql> set password for 'root'@'silver.local' = PASSWORD('pw');
mysql> exit

Create database and user for that database. Replace pw with a better one.

mysql -u root -p mysql
mysql> create database flux_production;
mysql> create database flux_development;
mysql> grant all privileges on flux_production.* to 'peter'@'localhost' identified by 'pw';
mysql> grant all privileges on flux_development.* to 'peter'@'localhost' identified by 'pw';
mysql> exit
mysql> mysql -u peter -p'pw' flux_development
mysql> exit

Install ruby gems

Install rails

$ sudo gem update --system
$ sudo gem install -v="2.3.14" rails

Install MySQL gem

$ sudo gem install mysql

Install other dependent gems

$ sudo gem install mysql
$ gem install rdoc
$ sudo rake gems:install

Install mongrel_rails

$ sudo gem install mongrel

Install ImageScience

Install using Homebrew, MacPorts, fink or similar.

$ brew install freeimage
$ sudo gem install image_science

See image_science

Migrate flux database

$ rake db:migrate RAILS_ENV="production"
$ rake db:migrate RAILS_ENV="development"

Start Flux Application

sudo mongrel_rails start

Go to http://localhost:3000/main