Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.

Creating, installing, and running your Warclight application

Nick Ruest edited this page Sep 7, 2017 · 6 revisions

Getting started: creating a new Warclight app

See also

Note: Setting up a development environment for Warclight is outside the scope of this document. Checkout https://gorails.com/setup for help in installing Ruby, Git, and Rails.

To create your Warclight application, you can start by running the Warclight generator:

# switch out "my-app" for the location you want to install the application to
rails new my-app -m https://raw.githubusercontent.com/archivesunleashed/warclight/master/template.rb

This will create a new Warclight application in a directory my-app and it takes a few minutes.

Install your application's dependencies

Next, change directory into the new application's directory and install the Ruby dependencies.

cd my-app
bundle install

Warclight uses Apache Solr for search. To quickly setup Solr for your Warclight instance, install the solr_wrapper gem.

gem install solr_wrapper

Starting the server

To start the server, after installing the gem you can run the solr_wrapper command from the applications directory.

solr_wrapper
Starting Solr 6.6.0 on port 8983 ... http://127.0.0.1:8983/solr/

Solr is now running!

To run your Warclight application you will need to open up a new terminal session (because we want to keep the Solr server running).

# make sure to cd back to your application
cd my-app

You can then run the Warclight rails application using the following command:

rails s

By default, the Warclight application will be accessible at http://localhost:3000/. The server can be stopped by pressing CTRL+c

Upgrade your Warclight

To upgrade your Warclight application when a new version of Warclight is released:

bundle update
rails generate warclight:update