Comments (10)
confirmed,
ruby 1.9
Shotgun 0.6
works
ruby config.ru
doesn't work, it's just hangs there forever
shotgun config.ru
from shotgun.
I'm not sure if this is related, but I've found that whenever I start my Sinatra app using Shotgun, the first request hangs indefinitely. After I hit refresh everything works fine, but when I try to kill webrick it hangs at "going to shutdown ..." until I open up Activity Monitor and manually kill the Ruby process(es). This doesn't happen when I use rackup, so I assume the problem is with Shotgun. (Ruby 1.9.1p376, Shotgun 0.6)
from shotgun.
This seems to be due to Marshal causing a deadlock. Like grant said, it's just that first request that deadlocks... if I kill that request, the server shuts down normally. Also, the forked parent PID is the main parent PID for subsequent requests, so I don't think the child is accepting connections.
from shotgun.
I think this is the issue causing it for me:
http://redmine.ruby-lang.org/issues/show/1525
from shotgun.
Maybe the simplest solution is to add some logic to prevent shotgun from firing up Webrick when it detects Ruby 1.9?
from shotgun.
here with Shotgun 0.8 and Ruby 1.9 the application dont works, results on load error (cant find the file of my app)
from shotgun.
+1 it cannot load my app file when using Webrick or Thin on Ruby 1.9.2-p0 with Shotgun 0.8 and Sinatra 1.1.0.
Backtrace:
internal:lib/rubygems/custom_require:29:in require' <internal:lib/rubygems/custom_require>:29:in
require'
/usr/local/Cellar/gems/1.9/gems/shotgun-0.8/lib/shotgun/loader.rb:114:in inner_app' /usr/local/Cellar/gems/1.9/gems/shotgun-0.8/lib/shotgun/loader.rb:102:in
assemble_app'
/usr/local/Cellar/gems/1.9/gems/shotgun-0.8/lib/shotgun/loader.rb:86:in proceed_as_child' /usr/local/Cellar/gems/1.9/gems/shotgun-0.8/lib/shotgun/loader.rb:31:in
call!'
/usr/local/Cellar/gems/1.9/gems/shotgun-0.8/lib/shotgun/loader.rb:18:in call' /usr/local/Cellar/gems/1.9/gems/shotgun-0.8/lib/shotgun/favicon.rb:12:in
call'
/usr/local/Cellar/gems/1.9/gems/rack-1.2.1/lib/rack/builder.rb:77:in call' /usr/local/Cellar/gems/1.9/gems/rack-1.2.1/lib/rack/content_length.rb:13:in
call'
/usr/local/Cellar/gems/1.9/gems/rack-1.2.1/lib/rack/chunked.rb:15:in call' /usr/local/Cellar/gems/1.9/gems/thin-1.2.7/lib/thin/connection.rb:76:in
block in pre_process'
/usr/local/Cellar/gems/1.9/gems/thin-1.2.7/lib/thin/connection.rb:74:in catch' /usr/local/Cellar/gems/1.9/gems/thin-1.2.7/lib/thin/connection.rb:74:in
pre_process'
/usr/local/Cellar/gems/1.9/gems/thin-1.2.7/lib/thin/connection.rb:57:in process' /usr/local/Cellar/gems/1.9/gems/thin-1.2.7/lib/thin/connection.rb:42:in
receive_data'
/usr/local/Cellar/gems/1.9/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in run_machine' /usr/local/Cellar/gems/1.9/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in
run'
/usr/local/Cellar/gems/1.9/gems/thin-1.2.7/lib/thin/backends/base.rb:57:in start' /usr/local/Cellar/gems/1.9/gems/thin-1.2.7/lib/thin/server.rb:156:in
start'
/usr/local/Cellar/gems/1.9/gems/rack-1.2.1/lib/rack/handler/thin.rb:14:in run' /usr/local/Cellar/gems/1.9/gems/shotgun-0.8/bin/shotgun:156:in
<top (required)>'
/usr/local/bin/shotgun:19:in load' /usr/local/bin/shotgun:19:in
'
from shotgun.
Aha, correction, this has been fixed in issue http://github.com/rtomayko/shotgun/issues/closed#issue/22 and this is a duplicate, at least for my problem. Installing the gem via git worked like a charm :)
from shotgun.
The LoadError related issues should be fixed. Could those of you that were having issues on the first request give 0.9 a try and see if that fixes anything for you?
from shotgun.
We assume this is no longer an issue. Please file a new issue if it is. Thanks.
from shotgun.
Related Issues (20)
- No output from Rack::CommonLogger HOT 8
- Can not run shotgun in cmd.exe on Windows 7 (64bit) HOT 8
- Can't use `require_relative` from within `./shotgun.rb`
- EM.next_tick never called HOT 2
- NameError: uninitialized constant Shotgun::Loader::YAML HOT 2
- direct users to sinatra-contrib reloader HOT 4
- Provide license information for the software
- shotgun don't work on windows
- Sinatra `enable :lock` doesn't work with Shotgun HOT 1
- LoadError when requiring 'net/ldap' gem HOT 5
- On stop server I get error in loop reactor HOT 1
- Incompatible with SuckerPunch Async HOT 1
- Shotgun visits every mapping in config.ru regardless the request HOT 10
- The way shotgun run HOT 4
- Rack 2.0.1 breaks requiring rack in bin/shotgun HOT 1
- Running a basic sinatra file shotgun breaks and cannot find 'rack/commonlogger' HOT 4
- Doesn't work on macOS High Sierra HOT 8
- e HOT 1
- Ruby 3 Compatibility HOT 4
- Ruby 3.0.0 -- every webserver seems to error with "wrong number of arguments (given 2, expected 1) (ArgumentError)" HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shotgun.