Questions tagged [shotgun]

Shotgun is a Ruby gem, an automatically reloading version of the rackup command that's shipped with Rack.

42 questions
75
votes
4 answers

Foreman: Use different Procfile in development and production

I have a homemade Sinatra application for which I intend to use Heroku to host it. I use foreman and shotgun in development, with the following Procfile: web: shotgun config.ru -s thin -o 0.0.0.0 -p $PORT -E $RACK_ENV It works great with both…
Arnaud Leymet
  • 5,995
  • 4
  • 35
  • 51
11
votes
1 answer

Sinatra and session variables which are not being set

For some reason, session variables are not being set in my app. I am using Sinatra 1.2.1. Here is a piece of code: module GitWiki class App < Sinatra::Base configure do enable :sessions set :app_file, __FILE__ set :root,…
Robert Audi
  • 8,019
  • 9
  • 45
  • 67
5
votes
1 answer

LoadError: cannot load such file -- data_mapper Why?

I am working on a Sinatra application where I would like to use data_mapper & sqlite3. in app.rb I have: require 'sinatra' require 'data_mapper' in the console when I do $ gem list I get(list somewhat edited to reflect db gems: * LOCAL GEMS…
FierceScarf
  • 461
  • 1
  • 5
  • 17
5
votes
1 answer

Running fork(2) from Windows with Cygwin. Possible?

I am trying to use a Ruby gem called shotgun that requires fork(2) command which I discovered is aa Linux command, and might be available in Cygwin. Is it possible to make it available through Windows command shell?
picardo
  • 24,530
  • 33
  • 104
  • 151
4
votes
1 answer

How do I get ruby debugger to work in sinatra with shotgun?

Is there a way of running shotgun to allow for ruby debugger statements to run? the -d flag seems to be just for debugging output.
zlog
  • 3,316
  • 4
  • 42
  • 82
4
votes
1 answer

Websocket connection closes without opening on Shotgun server

I have a Sinatra app that uses Websockets. My app works when I run it with ruby app.rb, but doesn't when I'm trying to run it with shotgun app.rb. This is in my sending_out.erb: