config.ru for Rack based deployment

Hi everyone,

Decided to post this in case someone else runs into this mistake (took me a few minutes to figure out).

Under the SequenceServer FAQ, there is an entry entitled:

How do I tell SequenceServer to read a different configuration file?

For Rack deployment, one needs to add:

SequenceServer::App.config_file = ‘configuration_file’

to config.ru.

While this works, the placement of this line in the file is important for SequenceServer to it. So, your config.ru should look like so:

require ‘rubygems’
require ‘bundler/setup’
require ‘sequenceserver’

SequenceServer::App.config_file = ‘/absolute/path/to/configuration_file’
SequenceServer::App.init
run SequenceServer::App

I blindly added the line to the end of config.ru and SequenceServer would error out at start-up due to not finding the configuration file. When I looked at config.ru a little more closely, I realized the configuration file location needed to specified prior to initiating the application.

Hope this helps someone in the future.

Cheers,

Halocaridina

Thanks Halocaridina. I have updated the FAQ on the sequenceserver.com.