2009-01-06 11:49:19 +01:00
|
|
|
README for DEVELopment Project Setup
|
|
|
|
====================================
|
|
|
|
|
2009-01-26 23:30:42 +01:00
|
|
|
Gratulations, you have successfully cloned the foodsoft project
|
|
|
|
from the git repository. Now you are only a few steps away from
|
|
|
|
trying it out and then jumping into development. (This manual presumes
|
|
|
|
you have ruby and rails setup.)
|
2009-01-06 11:49:19 +01:00
|
|
|
|
2009-01-26 23:30:42 +01:00
|
|
|
(1) Configure datebase
|
|
|
|
----------------------
|
|
|
|
Create the database configuration from the default:
|
2009-01-06 11:49:19 +01:00
|
|
|
|
2009-01-26 23:30:42 +01:00
|
|
|
cp config/database.yml.SAMPLE config/database.yml
|
2009-01-06 11:49:19 +01:00
|
|
|
|
2009-01-26 23:30:42 +01:00
|
|
|
If you are fine with using a file-based sqlite database you are all set.
|
|
|
|
The sqlite files (development/test/production) will reside in the "db" directory.
|
|
|
|
You might still need to install sqlite and the respective gem, i.e. on Ubuntu do:
|
|
|
|
|
|
|
|
sudo aptitude install sqlite3 libsqlite3-dev
|
|
|
|
sudo gem install sqlite3-ruby
|
|
|
|
|
|
|
|
Otherwise you would want to edit database.yml to suit your needs (MySQL whatever).
|
2009-01-06 11:49:19 +01:00
|
|
|
|
|
|
|
|
2009-01-26 23:30:42 +01:00
|
|
|
(2) Configure development environment
|
|
|
|
-------------------------------------
|
|
|
|
Again, you need to create your own copy of the default configuration:
|
2009-01-06 11:49:19 +01:00
|
|
|
|
|
|
|
cp config/environments/development.rb.SAMPLE config/environments/development.rb
|
|
|
|
|
2009-01-26 23:30:42 +01:00
|
|
|
Edit development.rb to specify your settings (at least the ActionMailer SMTP settings).
|
|
|
|
If you just leave the file as is, emails will not work but everything else should be okay.
|
2009-01-06 11:49:19 +01:00
|
|
|
|
|
|
|
|
2009-01-26 23:30:42 +01:00
|
|
|
(3) Foodsoft settings
|
|
|
|
---------------------
|
2009-01-06 11:49:19 +01:00
|
|
|
You need to create your own copy of the foodsoft configuration settings:
|
|
|
|
|
2009-01-20 15:59:06 +01:00
|
|
|
cp config/app_config.yml.SAMPLE config/app_config.yml
|
2009-01-06 11:49:19 +01:00
|
|
|
|
2009-01-26 23:30:42 +01:00
|
|
|
Edit app_config.yml to suit your needs or just keep the defaults for now.
|
2009-01-06 11:49:19 +01:00
|
|
|
|
|
|
|
|
2009-01-26 23:30:42 +01:00
|
|
|
(4) Required gems
|
|
|
|
-------------------
|
|
|
|
In addition to the standard Ruby on Rails gems you will need to install
|
|
|
|
the additional gems required by running:
|
|
|
|
|
|
|
|
sudo gem sources -a http://gems.github.com
|
|
|
|
sudo gem install haml fastercsv prawn rubyist-aasm
|
|
|
|
|
|
|
|
|
|
|
|
(5) Create database schema
|
|
|
|
--------------------------
|
2009-01-06 11:49:19 +01:00
|
|
|
rake db:schema:load
|
|
|
|
|
|
|
|
|
2009-01-26 23:30:42 +01:00
|
|
|
(6) Create user "admin" with password "secret"
|
|
|
|
----------------------------------------------
|
2009-01-06 11:49:19 +01:00
|
|
|
rake foodsoft:create_admin
|
|
|
|
|
|
|
|
|
2009-01-26 23:30:42 +01:00
|
|
|
(7) Try it out!
|
|
|
|
---------------
|
2009-01-06 11:49:19 +01:00
|
|
|
Start the WEBrick server to try it out:
|
|
|
|
|
2009-01-20 15:59:06 +01:00
|
|
|
script/server
|