# Creating the Database

There are two ways to create your database. One if using basic SQL which is specific to each database.

The other, more powerful way, is to use rails' migrations with the rails project provided with mrViewer. Either way, you will need to create an administrative user in the database which will have a password and have permissions to create or drop tables in the database.

This user is to be called mrviewer or you will have to adjust the file in rails/assets2d/config/database.yml.

Once that is done, you need to run from a window as root user:

$ apt-get install ruby1.9.1 rubygems # or whatever packet manager you use $ gem install rails $ gem install rake

Now, from the main rails/assets2d directory:

> rake db:schema:load

That will create the database called asset2d_development. To create the production database, use:

> export RAILS_ENV=production # for bash, use set for mswin console

> rake db:schema:load

The real database is assets2d_production and the mrViewer program will use it, but the others are offered as trials.