ResaSystem

perchmysteriousData Management

Nov 30, 2012 (4 years and 7 months ago)

193 views







EIP Manager

Technical Documentation

Guillaume Joye

2011_TD1_EN_RESASYSTEM.docx


FA/EIP/FR/ET/002


Version 2.0

Ept4








2

Sommaire







Application diagram

p.3




Flux diagram

p.4




Interaction description

p.
5




Installation manual

p.
6




Bug references

p.
11




References
.1
1




DB schema
p.1
2


3


Application diagram


Members





Customers




4


Flux diagram


Application flux are the same for every website of this kind, there is the connexion time,
the analysis of the user’s rights and the différents actions possible thanks to this rights.













5

Interaction description





Each us
ers connects to be able
to do
search, he fill different thing
s

wich sort the ads
posted by the owners. When
rooms are find, the book is effective and with the grant of
the owner, user pay for it.


6


Installation manual

Windows package

Folder description


-

MySQL


contains the
MySQL database server installer

-

PostgreSQL


contains the PostgreSQL database server installer

-

Ruby


contains the Ruby environment


all required RubyGems


all required DLLs for Ruby

-

resasystem


contains ResaSystem


Installation/Configuration

MySQL


Installation:

-

Launch the installer in the folder

-

when asked choose "Typical" installation type

-

Next/Install

-

On "Wizard Completed" screen check only "Configure the MySQL Server now"

-

configuration wizard opens

-

Choose "Detailed configuratio
n"

-

Choose "Server Machine"

-

Choose "Multifunctional Database"

-

Choose InnoDB path (you can leave the default setting)

-

Choose "Decision Support"

-

Leave "TCP/IP Networking" and "Enable Strict Mode" checked

-

Choose "Manual Seelcted Default Character
Set" and set it to "utf8"

-

Leave "Install As Windows Service" checked and check Include Bin Directory in Windows
PATH"

-

set root password

-

Next/Execute/Finish



Configuration:

-

In Windows "Start" menu, launch MySQL > MySQL Server > MySQL Command Line
C
lient

-

Prompt window opens, type in the root password choosen during the installation

-

mysql prompt appears

-

to create 'resasystem' database and user


7

mysql> CREATE DATABASE resasystem;

mysql> USE mysql;

mysql> CREATE USER 'resasystem'@'localhost' IDENTI
FIED BY 'choose_a_password';

mysql> GRANT SELECT, UPDATE, INSERT, DELETE, CREATE, DROP, ALTER,
INDEX, TRIGGER

-
> ON resasystem.* TO 'resasystem'@'localhost';



if MySQL is already installed and you need to recover the root password

-

Stop your MySQL server completely. This can be done by accessing the Services window

inside Windows XP and Windows Server 2003, where you can stop the MySQL service.

-

Open your MS
-
DOS command prompt using "cmd" inside the Run window. Inside it
navig
ate to your MySQL bin folder, such as C:
\
MySQL
\
bin using the cd command.

-

Execute the following command in the command prompt: mysqld.exe
-
u root
--
skip
-
grant
-
tables

-

Leave the current MS
-
DOS command prompt as it is, and open a new MS
-
DOS command
prompt
window.

-

Navigate to your MySQL bin folder, such as C:
\
MySQL
\
bin using the cd command.

-

Enter "mysql" and press enter.

-

You should now have the MySQL command prompt working. Type "use mysql;" so that we
switch to the "mysql" database.

mysql> USE mysql;

mysql> UPDATE user SET Password = PASSWORD('new password here') WHERE User =
'root';

-

create 'resasystem' database and user if needed

-

Close both prompt windows, relaunch the MySQL service



PostgreSQL


Installation:

-

Launch the installer

-

Choose paths

-

set postgres account password

-

Choose the port if needed

-

Choose the locale if needed

-

Uncheck "Launch Stack Builder as exit"

-

Finish


Configuration:

-

In Windows "Start" menu, launch PostgreSQL > pgAdmin

-

right click on localhost server on the lef
t > "connect"

-

put in the postgres password

-

expand the server

-

right click on "Login Roles" > "New Login Role"

Role Name : resasystem

Choose password

OK


-

right click on "Databases" > "New database"


8

Name : resasystem

Owner: resasystem

Encoding: UTF8

OK


To recover postgres passwrord

-

edit pg_hba.conf (by default in C:
\
Program Files
\
PostgreSQL
\
8.3
\
data)

change line

"host all all 127.0.0.1/32 md5"

to

"host all all 127.0.0.1/32 trust"

-

in Start menu > PostgreSQL > Reload Configuration

-

in Start menu >

PostgreSQL > pgAdmin

-

right click on the local server, connect, leave password field blank

-

right click on "postgres" in "Login Roles" > "Properties..."

-

change the password, "OK"

-

close pgAdmin

-

revert pg_hba.conf file

-

restart PostgreSQL server



Ruby

Launch the installer

-

Check Enable RubyGems

-

Choose path if needed

-

Finish the installation


-

In the "Start" menu, Ruby > RubyGems > RubyGems Package Manager

-

prompt window opens

-

with Internet connection

Ruby> gem install rubygems
-
update

Ruby>
update_rubygems

Ruby> gem update
--
system

Ruby> gem update

Ruby> gem install
--
no
-
ri
--
no
-
rdoc <gem_name> (when required, with
-
v=needed_version)

gems to install:

-

rails 2.3.5

-

mysql

-

ruby
-
postgres

-

sqlite3
-
ruby

-

rack 1.0.1


-

without Internet

Ruby>
gem install
--
no
-
ri
--
no
-
rdoc "path to ResaSystem
-
X
-
win32
\
Ruby
\
RS_win_rubygems_sysupdate
\
rubygems
-
update
-
1.3.6.gem"

Ruby> update_rubygems

Ruby> gem install
--
no
-
ri
--
no
-
rdoc "path to ResaSystem
-
X
-
win32
\
Ruby
\
RS_win_rubygems_sysupdate
\
*.gem"

Ruby> gem instal
l
--
no
-
ri
--
no
-
rdoc "path to ResaSystem
-
X
-
win32
\
Ruby
\
RS_win_rubygems
\
*.gem"


9

-

Copy all the DLLs from ResaSystem
-
X
-
win32
\
Ruby
\
RS_win_rubydlls
\

to C:
\
Ruby
\
bin




ResaSystem

-

copy somewhere resasytem folder

-

go to resasystem
\
config

-

choose the
database.dbtype.yml file depending on the database you are using

-

replace the original database.yml with yours

-

edit the database.yml

-

change the connection section accordingly to the configuration of the database

-

in windows command prompt

prompt> cd
"path to resasystem"

resasystem> rake db:schema:load

resasystem> "path to ruby.exe" script
\
server

ruby.exe default path : C:
\
Ruby
\
bin

server should start

-

in a web browser open
http://localhost:3000


Debian package

Folder description


-

Debian

contains the necesseray packages

-

Ruby

contains the necessary Ruby gems

-

resasystem

contains ResaSystem



Installation/Configuration

MySQL

To recover MySQL root password, as system root do the following in a terminal

-

stop t
he mysql daemon

#/etc/init.d/mysql(d) stop


-

relaunch the daemon with new option

#mysqld
--
skip
-
grant
-
tables &


-

launch mysql prompt

#mysql

mysql> USE mysql;

mysql> UPDATE user SET Password = PASSWORD('new password here') WHERE User = 'root';

create
'resasystem' database and user if needed


-

relaunch the daemon

#/etc/init.d/mysql(d) restart

or

#/etc/init.d/mysql(d) stop

#/etc/init.d/mysql(d) start


10



PostgreSQL

To recover PostgreSQL password, as root

log in as postgres

#su
-

postgres


as postgres user
, launch PosgreSQL prompt

$psql
-
d template1


template1=# ALTER USER postgres WITH PASSWORD 'new password';

template1=#
\
q


Ruby

install as root

#dpkg
-
i Debian/debs/*.deb


#gem install
--
no
-
ri
--
no
-
rdoc rubygems
-
update.gem

#/var/lib/gems/1.8/bin/update_rubygems


#gem install
--
no
-
ri
--
no
-
rdoc Ruby/gems/*.gem


ResaSystem

-

copy somewhere resasystem folder

-

go to resasystem
\
config

-

choose the database.dbtype.yml file depending on the database you are using

-

replace the orig
inal database.yml with yours

-

edit the database.yml

-

change the connection section accordingly to the configuration of the database

-

in a terminal, navigate to resasystem folder

$ cd path/to/resasystem

$ rake db:schema:load

$ ruby script/server

server s
hould start

-

in a web browser open
http://localhost:3000


11

Bugs

references

-

Bug

G
em
«

Devise

»

:


When user try to login in the member part of the website with a Customer
account, if he select «

log as member

» the
redirection target
«

after_sign_in_path_for

» and then crash the application.

-

Bug Gem «

Paperclip

»

:


This gem doesn’t work on Windows and there is a problem on the configuration
file
when using «

imagemagick

».



Refe
rence
s

-

Official website of the
ruby langage
:
http://www.ruby
-
lang.org/fr/
.

-

Documentations of the Framework
Ruby
-
on
-
Rails

:

http://rubyonrails.org/

.

-

Documentations of the développement manager app
lication

Github

:
http://help.github.com/

-

Documentations of the hosting website for rails application
Heroku:

:
http://docs.heroku.com/

-

Official documentation of the web
development environment

Aptana

:
http://docs.aptana.com/docs/index.php/Main_Page

-

Website with many Podcast about

Ruby
-
on
-
rails


development
:
http://railscasts.com/


12


D
B Scheme