Difference between revisions of "User:Rfs/Installing wobble motions"
< User:Rfs
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
Install necessary pacakages: | Install necessary pacakages: | ||
sudo aptitude install rails rubygems postgresql-8 | sudo aptitude install rails rubygems postgresql-8 | ||
+ | |||
Trying to start the server, I got a message that said to do this as well: | Trying to start the server, I got a message that said to do this as well: | ||
sudo gem install -v=1.1.6 rails | sudo gem install -v=1.1.6 rails | ||
+ | |||
Get the application(s) from the svn server: | Get the application(s) from the svn server: | ||
Line 9: | Line 11: | ||
''(??? actually I need to get motions which is a sub-project of wobble.)'' | ''(??? actually I need to get motions which is a sub-project of wobble.)'' | ||
+ | |||
+ | |||
+ | Check the configuration file for the username and password. (Edit these to suit yourself.) | ||
+ | rfs@boq:~/wobble/motions/trunk$ cat config/database.yml | ||
+ | |||
Create a user for the database: | Create a user for the database: | ||
Line 16: | Line 23: | ||
CREATE ROLE | CREATE ROLE | ||
postgres@boq:~$ | postgres@boq:~$ | ||
+ | |||
Set the user's password: | Set the user's password: | ||
Line 30: | Line 38: | ||
ALTER ROLE | ALTER ROLE | ||
template1=# | template1=# | ||
+ | |||
Create the databases (empty for now): | Create the databases (empty for now): | ||
Line 38: | Line 47: | ||
rfs@boq:~/wobble/motions/trunk$ createdb motions_prioduction | rfs@boq:~/wobble/motions/trunk$ createdb motions_prioduction | ||
CREATE DATABASE | CREATE DATABASE | ||
+ | |||
Populate the database: | Populate the database: | ||
Line 50: | Line 60: | ||
''(Hmmm.. that's a problem.)'' | ''(Hmmm.. that's a problem.)'' | ||
+ | |||
Start the server: | Start the server: | ||
Line 59: | Line 70: | ||
[2007-10-08 10:19:56] INFO ruby 1.8.5 (2006-08-25) [i486-linux] | [2007-10-08 10:19:56] INFO ruby 1.8.5 (2006-08-25) [i486-linux] | ||
[2007-10-08 10:19:56] INFO WEBrick::HTTPServer#start: pid=7392 port=3000 | [2007-10-08 10:19:56] INFO WEBrick::HTTPServer#start: pid=7392 port=3000 | ||
+ | |||
Using a browser, go to: | Using a browser, go to: | ||
http://localhost:3000 | http://localhost:3000 | ||
+ | |||
Click on a link, which will take you to a log in page. Log in: | Click on a link, which will take you to a log in page. Log in: | ||
Line 70: | Line 83: | ||
TCP/IP connections on port 5433? | TCP/IP connections on port 5433? | ||
− | ''(OK. That needs fixing too.)'' | + | ''(OK. That needs fixing too. Probably same problem as above.)'' |
Revision as of 10:56, 8 October 2007
Install necessary pacakages:
sudo aptitude install rails rubygems postgresql-8
Trying to start the server, I got a message that said to do this as well:
sudo gem install -v=1.1.6 rails
Get the application(s) from the svn server:
svn co svn+ssh://dev.freegeek.org/svn/wobble/trunk wobble/trunk
(??? actually I need to get motions which is a sub-project of wobble.)
Check the configuration file for the username and password. (Edit these to suit yourself.)
rfs@boq:~/wobble/motions/trunk$ cat config/database.yml
Create a user for the database:
rfs@boq:~/wobble/motions/trunk$ sudo su - postgres postgres@boq:~$ createuser rfs Shall the new role be a superuser? (y/n) y CREATE ROLE postgres@boq:~$
Set the user's password:
rfs@boq:~/wobble/motions/trunk$ psql template1 Welcome to psql 8.2.5, the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for help with psql commands \g or terminate with semicolon to execute query \q to quit template1=# ALTER USER rfs password 'PUT_THE_PASSWORD_HERE'; ALTER ROLE template1=#
Create the databases (empty for now):
rfs@boq:~/wobble/motions/trunk$ createdb motions_test CREATE DATABASE rfs@boq:~/wobble/motions/trunk$ createdb motions_development CREATE DATABASE rfs@boq:~/wobble/motions/trunk$ createdb motions_prioduction CREATE DATABASE
Populate the database:
rfs@boq:~/wobble/motions/trunk$ rake db:migrate (in /home/rfs/wobble/motions/trunk) rake aborted! could not connect to server: Connection refused Is the server running on host "localhost" and accepting TCP/IP connections on port 5433?
(See full trace by running task with --trace)
(Hmmm.. that's a problem.)
Start the server:
rfs@boq:~/wobble/motions/trunk$ ./script/server => Booting WEBrick... => Rails application started on http://0.0.0.0:3000 => Ctrl-C to shutdown server; call with --help for options [2007-10-08 10:19:56] INFO WEBrick 1.3.1 [2007-10-08 10:19:56] INFO ruby 1.8.5 (2006-08-25) [i486-linux] [2007-10-08 10:19:56] INFO WEBrick::HTTPServer#start: pid=7392 port=3000
Using a browser, go to:
http://localhost:3000
Click on a link, which will take you to a log in page. Log in:
PGError in LoginController#login could not connect to server: Connection refused
Is the server running on host "localhost" and accepting TCP/IP connections on port 5433?
(OK. That needs fixing too. Probably same problem as above.)