Skip to content

Creating, installing, and running your ArcLight application

Marlo Longley edited this page Oct 19, 2022 · 10 revisions

Getting started: creating a new ArcLight app

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

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

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

This will create a new ArcLight 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

Bundling CSS

If you are using cssbundling-rails you need to get the SASS files from npm. You can do this by adding:

npm install arclight # or yarn add arclight

You can then import into your application's main SASS file:

@import 'arclight/app/assets/stylesheets/arclight/application';

Starting the server

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

gem install solr_wrapper

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

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

Solr is now running!

To run your ArcLight 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 ArcLight rails application using the following command:

rails s

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