This is mostly to document an ongoing issue I’ve been going with while tinkering around with Sinatra in Windows 8.1, sadly.
A while back I never documented issues passing through arguments with Sinatra while using it with a combination of config.ru, thin, and rackup on the command line. Well, I finally found a one-liner that makes life with sinatra/windows 8.1 SLIGHTLY easier… First though:

All I really need is:
|
thin start -e [development || production || etc] -p 1111 -b 192.198.1.3 |
“-e development” (etc) sets your application to run in development or production (forgot what it defaults to), but you have to configure a few things depending on what you want to do.
Then somewhere within my app class:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
class BootstrapInterface < Sinatra::Base before do p "before" end configure :development do register Sinatra::Reloader helpers MagicWand configure :production do helpers MagicWand end set :environment, :development ... |
In this case, I don’t have Sinatra::Reloader registered while in production mode, since I want Sinatra to be a bit more persistent instead of reloading per page request.
But the magic piece of code is
|
set :environment, :development |
You could pretty much name your environment(s) anything.
More to come.
Update: Now i’m investigating something like this:
http://jordanhollinger.com/2011/12/19/deploying-with-thin/
Then
http://code.macournoyer.com/thin/usage/
Well, my assumptions after using thin from the command line for a while is true: the argument to parse a configuration file (-C) doesn’t seem to be available on Windows 8.1 or at least this version of thin… That kinda sucks; I may poke around the source code for thin a while and see what kind of patch I can come up with.
Like this:
Like Loading...