Skip to content
skamansam edited this page Jan 2, 2015 · 4 revisions

Requirements

pSaMS requires a working ruby environment. You can install ruby here.

You also need a working version of Git, which can be downloaded from here.

If your environment is set up properly, you should be able to install the latest version of padrino by typing gem install padrino in a terminal.

Installation / Configuration

All you need to do is grab the source of this app from GitHub and install all the necessary gems. You can do that by opening up a terminal and typing the following:

cd /path/to/my/projects/folder
git clone https://github.com/skamansam/pSaMS.git
cd pSaMS
bundle install
rake ar:migrate MIGRATIONS=true

Problems?

If the bundle install command fails with errors installing the mysql gem, you could try installing the gem manually or removing the line that begins gem "mysql" from the file Gemfile. See Changing Databases for more.

Running Migrations in Plugins

You can add migrations to plugins by adding a #migrate method to the plugin class definition. To use this method, you must specify the environment variable MIGRATIONS on the command line, as shown above. It is recommended to always add the MIGRATIONS=true.

Changing Databases

SQLite is used for development, as it is a local filestore database and requires no other running program to use. MySQL is the default for production mode, as it can be easily configured to be used with a lot of hosting sites, or even OpenShift, and is a more "enterprise-y" solution. If you want to use MariaDB instead, just install it, as MariaDB is a drop-in replacement for MySQL.

If you have problems install the mysql gem or just want to change your database, you can do so by changing the mysql gem specification in the Gemfile to your database of choice. For instance, if you want to use MongoDB for a backend, change the

Clone this wiki locally