See deployment for information on how to deploy. This will be centrally hosted, but you're welcome to set up your own instance and help contribute code.
-
Examples follow for installing SIMS on debian-based Linux. Be sure to use appropriate package manager and adjust all paths to match your platform
(/ to \)
-
Some of the icons come from the Silk icon set.
Before you can use SIMS you need to install and configure the following dependencies on your machine:
-
sudo apt-get install curl
-
Ruby Version Manager with Rails: See their installation guide for installing with curl.
-
Git: The Github Guide to Installing Git is a good source of information.
-
MySQL server, client, adapter, and other libraries:
sudo apt-get install build-essential openssl libreadline6 libreadline6-dev \ git-core zlib1g zlib1g-dev libssl-dev libyaml-dev mysql mysqld \ libmysqlclient-devlibxml2-dev mysql-server libxslt-dev autoconf libc6-dev \ ncurses-dev automake libtool bison subversion pkg-config gem install activerecord-mysql-adapter
Basics for installing SIMS locally (without the tests, which don't work on Windows yet)
git clone git://github.com/vegantech/sims.git
cd sims
Make sure you're running version 1.9.3 of Ruby and run bundle:
rvm install ruby-1.9.3-p484
source ~/.rvm/scripts/rvm
bundle
Copy the config/database.yml.sqlite3
to config/database.yml
cp config/database.yml.mysql config/database.yml
Be sure to set the domain name of the SIMS application in the config/initializers/host_info.rb
file to send the proper links in emails generated by the application.
bundle exec rake db:setup
bundle exec rails runner CreateTrainingDistrict.generate_one
bundle exec rails s
Then point your browser to http://localhost:3000
to see that SIMS is up and running.
NOTE: When running locally it will be required to connect through http://lvh.me:3000
for proper cookie authentication
Once you have it setup for development and have Apache setup:
sudo gem install passenger
sudo passenger-install-apache2-module
Modify the apache config files following the onscreen directions.
From your development directory: Adjust your mail and server settings in the config/deploy/other.rb
sudo gem install capistrano capistrano-ext
cap other deploy:cold
NOTE: You might need to setup the database.yml on the server
If the deploy cold fails, run:
RAILS_ENV=production bundle exec rake db:migrate db:fixtures:load
bundle execscript/runner -e production CreateTrainingDistrict.generate_one
cap other deploy:restart
We're using the multi-stage deployment functionality of the excellent
capistrano-ext
gem to allow you to separately deploy to your staging
and production server. If you don't already have this gem installed,
please do so by running sudo gem install capistrano-ext
.
Use cap staging deploy
to deploy to staging and cap production deploy
to update production code.