How to install a ruby build - dependent on mysql

Download the build from SVN .

Pre-requisite

Tortoise svn is setup and is working properly.
Ruby and rake are installed.

Steps

1. In any directory, create a new folder. Rename it to something like "Test build version 0.5 build 1".
2. Right click on the folder and select "SVN checkout" from the menu.
3. In the pop-up "Checkout", make sure the "URL of repository" field has the correct data.
4. Now in the "Revision" heading, select the "Revision" check box and enter the revision number (say "333").
5. Click on "ok".

Result:
The build gets downloaded to the new directory you created in step 1.

Configuring the build.

1.  Now go to the directory
"Test build version 0.5 build 1". Navigate to config->database.yml
2. Edit the file "database.yml".
3. Under the heading "development", change the database field to something like "Testdatabase_05_2".
4. Change the password to current password of "mysql database".
5. Save the file.

Creating the above database in mysql.

1. Open a command prompt and type the following command.

>mysql -uroot -proot123

Root is the user name.
root123 is the password.

Note that there is no space between -u and the username.

Here is the output from the command prompt.

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 18
Server version: 5.0.51b-community-nt MySQL Community Edition (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

Now type the following command "
create database Testdatabase_05_2".

mysql> create database Testdatabase_05_2
    -> ;
Query OK, 1 row affected (0.00 sec)

mysql>

Now we have created the database "
Testdatabase_05_2".

Populating the database with data (using rake)

1. open a command prompt.
2. Go to the directory where the build is downloaded. ie
"Test build version 0.5 build 1".
3. Run the rake command to populate the database "
rake db:schema:load ".
4. You will get some output which denotes that the database is populated.

Running the server.

1. Navigate to the directory where build is downloaded.
2. Run the ruby command to start the server.
eg:

E:
cd E:\ParasharBuilds\Parashar version 0.5 build 2
ruby script/server --port=3005

Comments

Popular posts from this blog

The pesky scrollbars on Remote desktop - Finally fixed!!

Exploring RedCritter - website for Agile project mangement

API Testing with Rest Assured - Validating the json schema