From 80287aeea4ff1dff9fb780ab79fda2101ee15383 Mon Sep 17 00:00:00 2001 From: lasse Date: Tue, 27 Jan 2009 06:30:42 +0800 Subject: [PATCH] Updating README_DEVEL and fixing environment.rb so foodsoft runs on a clean system. Signed-off-by: bennibu --- README_DEVEL | 61 +++++++++++++++++++++++++++---------------- config/environment.rb | 2 +- 2 files changed, 40 insertions(+), 23 deletions(-) diff --git a/README_DEVEL b/README_DEVEL index 6cc0cb3e..363b31e4 100644 --- a/README_DEVEL +++ b/README_DEVEL @@ -1,50 +1,67 @@ README for DEVELopment Project Setup ==================================== -Gratulations, you have successfully checked out the foodsoft project -form the subversion repository. Now you are only a few steps away from -trying it out and then jumping into development. +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.) +(1) Configure datebase +---------------------- +Create the database configuration from the default: -Configure datebase ------------------- -If you are fine with sqlite you can skip this point. Otherwise .. + cp config/database.yml.SAMPLE config/database.yml - cp config/database.yml.SAMPLE config/database.yml - -Edit database.yml to specify connection parameters. +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). -Configure Development Environment ---------------------------------- -You need to create your own copy of the development environment configuration: +(2) Configure development environment +------------------------------------- +Again, you need to create your own copy of the default configuration: cp config/environments/development.rb.SAMPLE config/environments/development.rb -Edit development.rb to specify your settings (e.g. ActionMailer SMTP settings). +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. -Configure Foodsoft ------------------- +(3) Foodsoft settings +--------------------- You need to create your own copy of the foodsoft configuration settings: cp config/app_config.yml.SAMPLE config/app_config.yml -Edit app_config.yml to suit your needs. +Edit app_config.yml to suit your needs or just keep the defaults for now. -Create database schema ----------------------- +(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 +-------------------------- rake db:schema:load -Create user admin with password secret --------------------------------------- +(6) Create user "admin" with password "secret" +---------------------------------------------- rake foodsoft:create_admin -Try it out ----------- +(7) Try it out! +--------------- Start the WEBrick server to try it out: script/server \ No newline at end of file diff --git a/config/environment.rb b/config/environment.rb index 90da918f..fc8465ad 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -67,7 +67,7 @@ Rails::Initializer.run do |config| # library for parsing/writing files from/to csv-file config.gem "fastercsv" config.gem "prawn" - config.gem "rubyist-aasm", :version => '2.0.5', :source => "http://gems.github.com" # acts_as_statemachine + config.gem "rubyist-aasm", :lib => 'aasm', :version => '2.0.5', :source => "http://gems.github.com" # acts_as_statemachine # The internationalization framework can be changed to have another default locale (standard is :en) or more load paths. # All files from config/locales/*.rb,yml are added automatically.