rtomayko / shotgun Goto Github PK
View Code? Open in Web Editor NEWreloading rack development server / forking version of rackup
License: Other
reloading rack development server / forking version of rackup
License: Other
Hi,
I've been facing an issue with shotgun 0.8 over Ruby 1.9.2. Running a simple Sinatra application using shotgun index.rb
I got an error "Boot Error" - complete traceback copied below.
I believe it's due to the fact Ruby 1.9.2 seems not to include current working directory in its import path. Adding the following statement before line 114 in lib/shotgun/loader - where shotgun tries to import index.rb - everything seems to work fine again.
$:.unshift("#{`pwd`}".chomp)
Complete traceback:
Boot Error
Something went wrong while loading index.rb
LoadError: no such file to load -- index.rb
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/Users/gobr/.rvm/gems/ruby-1.9.2-p0/gems/shotgun-0.8/lib/shotgun/loader.rb:114:in `inner_app'
/Users/gobr/.rvm/gems/ruby-1.9.2-p0/gems/shotgun-0.8/lib/shotgun/loader.rb:102:in `assemble_app'
/Users/gobr/.rvm/gems/ruby-1.9.2-p0/gems/shotgun-0.8/lib/shotgun/loader.rb:86:in `proceed_as_child'
/Users/gobr/.rvm/gems/ruby-1.9.2-p0/gems/shotgun-0.8/lib/shotgun/loader.rb:31:in `call!'
/Users/gobr/.rvm/gems/ruby-1.9.2-p0/gems/shotgun-0.8/lib/shotgun/loader.rb:18:in `call'
/Users/gobr/.rvm/gems/ruby-1.9.2-p0/gems/shotgun-0.8/lib/shotgun/favicon.rb:12:in `call'
/Users/gobr/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/builder.rb:77:in `call'
/Users/gobr/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/content_length.rb:13:in `call'
/Users/gobr/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/handler/webrick.rb:52:in `service'
/Users/gobr/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
/Users/gobr/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
/Users/gobr/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
Thanks due to github.com/rafaelcv for sharing his discoveries on this.
Salute,
Diego 'gobr' Henrique.
Using shotgun to test locally under Google Chrome for Mac, I see that posting a form sends a GET request to the URL specified, rather than POST.
Running the app locally using
$ ruby main.rb
works fine. Not sure if this is a shotgun or rack issue?
Since the 0.7 update,
shotgun --server=thin
ignores using Thin and defaults to WEBrick. If I use 0.6, it works correctly so it probably broken in the latest release
I am currently using REE 1.8.7
Hello,
This gem no longer works on macOS High Sierra.
I noticed it is only compatible with systems that support fork(2) and High Sierra does change how fork() works on syscall level.
sucker_punch is a gem that runs job from memory; it uses celluloid.
If I use Shotgun with sucker_punch's async command, then the command silently fails. I don't have this problem with other servers. Here's a gist that reproduces the issue.
I also raised a similar issue on the sucker_punch repo, but after further investigation, I believe the issue is caused by shotgun.
Shotgun works well when connecting to the app locally from localhost or 127.0.0.1. However, if I try connecting to the app with the ip-address given by my local network (so I can check the app from another computer or my iPhone), I am unable to connect. However, I am able to connect via the same ip-address without using shotgun.
Is there something I can do in order to make my app available past the local computer while using shotgun?
Thanks,
bin/shotgun
browse is not set true under ruby 1.9.
- opts.on("-O", "--browse", "open browser immediately after starting") { |browse|
+ opts.on("-O", "--browse", "open browser immediately after starting") { |b|
browse = true
}
I'm not sure if it is a shotgun specific bug or if it's a platform specific one. I'm using a combination of Rubinius and puma with shotgun to restart on any change. When I stop the server (CTRL + C) I get the following exception/message in the terminal:
Error in reactor loop escaped: Bad file descriptor - select(2) failed (Errno::EBADF)%
My new fav. combo with guard-livereload
, it really made my day. Thanks Ryan !
Since this gem hasn't been maintained in some time, could there been some direction to the sinatra-contrib gem for Sinatra::Reloader?
I realize this is specific to Sinatra, so maybe some docs for Rack::Reloader could also be helpful?
is there any reason shotgun won't let you run on 1.1.0?
Asking for the unicorn server doesn't work. It's pretty new, so don't feel too bad :P
If I get bored in the next little while I'll see about putting it in and sending a pull request.
shotgun -h says
-o, --host HOST listen on HOST (default: 0.0.0.0)
but in the code it's localhost:
# bin/shotgun:14
options = {:Port => 9393, :Host => 'localhost', :AccessLog => [], :Path => '/'}
code should be '0.0.0.0', too
ENV
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]
shotgun-0.9.1
rack-1.6.1
thin-1.6.3
Simple config.ru
map '/' do
p "root"
run Proc.new {|env| [200, {"Content-Type" => "text/html"}, ["root"]]}
end
map "/assets" do
p "assets"
run Proc.new {|env| [200, {"Content-Type" => "text/html"}, ["assets"]]}
end
map "/admin" do
p "admin"
run Proc.new {|env| [200, {"Content-Type" => "text/html"}, ["admin"]]}
end
Run shotgun server
$ shotgun
Hit the server:
$ curl http://localhost:9393/
root
Server log output
== Shotgun/Thin on http://127.0.0.1:9393/
Thin web server (v1.6.3 codename Protein Powder)
Maximum connections set to 1024
Listening on 127.0.0.1:9393, CTRL+C to stop
"root"
"assets"
"admin"
127.0.0.1 - - [15/Jun/2015:18:52:52 +0300] "GET / HTTP/1.1" 200 - 0.0008
This is really nasty when I use shotgun with sinatra and sprockets:
every asset request hits whole application and slow down page loading a lot
Is it by design?
Hi, this may be a simple misunderstanding of sinatra and shotgun, but here's what I am seeing:
ROOT
127.0.0.1 - - [07/Dec/2009 21:33:57] "GET / HTTP/1.1" 200 733 0.7421
127.0.0.1 - - [07/Dec/2009 21:33:58] "GET /scripts/tick.js HTTP/1.1" 304 - 0.4458
ROOT
127.0.0.1 - - [07/Dec/2009 21:33:59] "GET / HTTP/1.1" 200 733 0.4516
127.0.0.1 - - [07/Dec/2009 21:34:00] "GET /css/main.css HTTP/1.1" 304 - 0.4813
127.0.0.1 - - [07/Dec/2009 21:34:01] "GET /images/logo.png HTTP/1.1" 304 - 0.5336
I am doing 'puts "ROOT"' in my get '/' do route. Why do I see it twice? Is there something wrong with shotgun or am I just an idiot? I guess both are possible but I think maybe I am doing something wrong.
here is how I am launching shotgun:
$ shotgun --server thin myapp.rb
Thanks in advance!
Can you provide a LICENSE file in root of your project to indicate the license we can use your software under? Pick your license of course, but right now it's hard to know what we're allowed to do with your code.. Thanks.
Rack 2.0.1 that was just released yesterday changes the names of the submodules.
rack/rack@857641d
Since there is no pessimistic version constraint in gemspec, this breaks the bin/shotgun that reference to the old naming.
https://github.com/rtomayko/shotgun/blob/master/bin/shotgun#L112
I am not sure if this is a general error or due to my OSX setup, but when I start a Sinatra app via shotgun, i get the following errors:
rogue% shotgun -d -o 192.168.3.114 -p 4567 lib/server.rb
Exception `LoadError' at /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31 - no such file to load -- Win32API
Exception `LoadError' at /Library/Ruby/Site/1.8/rubygems/custom_require.rb:38 - no such file to load -- Win32API
Exception `LoadError' at /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31 - no such file to load -- mongrel
Exception `LoadError' at /Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongrel/gems.rb:7 - no such file to load -- mongrel_experimental
Exception `Gem::LoadError' at /Library/Ruby/Site/1.8/rubygems.rb:779 - RubyGem version error: mongrel_experimental(1.1 not >= 1.1.5)
After that the normal start message is shown:
== Shotgun starting Rack::Handler::Mongrel at http://192.168.3.114:4567
But when I do a request to the sinatra app, I get the following:
Exception `LoadError' at /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31 - no such file to load -- sinatra/base
Exception `LoadError' at /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31 - no such file to load -- tilt
Exception `LoadError' at /Library/Ruby/Site/1.8/rubygems/custom_require.rb:38 - no such file to load -- tilt
Exception `LoadError' at /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31 - no such file to load -- mustache/sinatra
Exception `Sinatra::NotFound' at /Library/Ruby/Gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:533 - Sinatra::NotFound
192.168.3.114 - - [04/Jun/2010 23:45:39] "GET / HTTP/1.1" 404 409 0.0074
Exception `LoadError' at /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31 - no such file to load -- sinatra/base
Exception `LoadError' at /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31 - no such file to load -- tilt
Exception `LoadError' at /Library/Ruby/Site/1.8/rubygems/custom_require.rb:38 - no such file to load -- tilt
Exception `LoadError' at /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31 - no such file to load -- mustache/sinatra
Exception `Sinatra::NotFound' at /Library/Ruby/Gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:533 - Sinatra::NotFound
192.168.3.114 - - [04/Jun/2010 23:45:39] "GET /favicon.ico HTTP/1.1" 404 420 0.0093
Startup via rackup works and the application is run as expected. So the application in general is fine.
I'm finding out the way Shotgun run.
To shotgun run we have to use Shotgun::Loader.new(env)
It start at step initialize
I don't see anything to invoke method call
to continue run.
Please help me clearer.
Thanks
~/Workspace/bithug (git: master) 1.9.1 โ shotgun --server thin webserver.rb == Shotgun starting Rack::Handler::Thin on localhost:9393 >> Thin web server (v1.2.2 codename I Find Your Lack of Sauce Disturbing) >> Maximum connections set to 1024 >> Listening on localhost:9393, CTRL+C to stop 127.0.0.1 - - [26/Jun/2009 14:36:52] "GET / HTTP/1.1" 200 255 0.0740 127.0.0.1 - - [26/Jun/2009 14:36:59] "GET /favicon.ico HTTP/1.1" 404 420 0.0209 >> Stopping ... ~/Workspace/bithug (git: master) 1.9.1 โ ruby webserver.rb == Sinatra/0.10.1 has taken the stage on 4567 for development with backup from Thin >> Thin web server (v1.2.2 codename I Find Your Lack of Sauce Disturbing) >> Maximum connections set to 1024 >> Listening on 0.0.0.0:4567, CTRL+C to stop 127.0.0.1 - - [26/Jun/2009 14:38:17] "GET / HTTP/1.1" 200 255 0.0035 127.0.0.1 - - [26/Jun/2009 14:38:17] "GET /favicon.ico HTTP/1.1" 404 420 0.0007 >> Stopping ... == Sinatra has ended his set (crowd applauds)
This is a bit annoying, especially if you have no code changes but a lot of requests.
i'm getting the following error after several reloads of the same view. this happens in several apps, and doesn't seem to be a problem in production, nor is it a problem with the assets themselves. weird!
::1 - - [05/Nov/2009 14:30:00] "GET /images/success/subheader-arrow-tier2.png HTTP/1.1" 304 - 0.0012
::1 - - [05/Nov/2009 14:30:00] "GET /images/success/subheader-arrow-tier2.png HTTP/1.1" 304 - 0.0385
/opt/local/lib/ruby/gems/1.8/gems/shotgun-0.4/lib/shotgun.rb:33: [BUG] Segmentation fault
ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10]
::1 - - [05/Nov/2009 14:30:00] "GET /images/success/summary-shadow-top.png HTTP/1.1" 304 - 0.0014
::1 - - [05/Nov/2009 14:30:00] "GET /images/success/summary-shadow-top.png HTTP/1.1" 304 - 0.0197
Abort trap
I've just installed gem
C:\Zend\www\sinatra>gem install shotgun
Fetching: shotgun-0.9.gem (100%)
Successfully installed shotgun-0.9
1 gem installed
Installing ri documentation for shotgun-0.9...
Installing RDoc documentation for shotgun-0.9...
And then tried to run shotgun with the following results
C:\Zend\www\sinatra>shotgun param_server.rb
C:/Ruby193/lib/ruby/gems/1.9.1/gems/shotgun-0.9/bin/shotgun:99:in ``': No such file or directory - uname (Errno::ENOENT)
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/shotgun-0.9/bin/shotgun:99:in `block in <top (required)>'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/shotgun-0.9/bin/shotgun:98:in `each'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/shotgun-0.9/bin/shotgun:98:in `find'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/shotgun-0.9/bin/shotgun:98:in `<top (required)>'
from C:/Ruby193/bin/shotgun:19:in `load'
from C:/Ruby193/bin/shotgun:19:in `<main>'
the param_server.rb file has only one line
require "rubygems"
Reason: the command of 'uname' and 'fork' don't work on windows OS.
Please fix it.
All of Rack's option parsing and other rackup related stuff has been moved to a nice little Rack::Server
class:
http://github.com/rack/rack/commit/5db5d4e7432d026a7bddf344f97e8facd09128d8
This should let us remove a huge swath of code from bin/shotgun
.
ruby app.rb
shows me standard Apache log messages, but shotgun app.rb
doesn't. The app works fine and reloading works. This happens with Rack 1.3.2 and latest mongrel/webrick. Using [ruby-1.8.7-p352]. Tell me if you can't reproduce and/or need more info.
app.rb as in sinatrarb.com's homepage
When using Shotgun to load my Sinatra app ($ shotgun app.rb) I get the following error as I try to load the webpage (no error appears in the console):
Boot Error
Something went wrong while loading config.ru
LoadError: cannot load such file -- net/ldap
/home/<user>/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:229:in `require'
/home/<user>/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:229:in `block in require'
/home/<user>/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:214:in `load_dependency'
/home/<user>/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:229:in `require'
config.ru:4:in `block in inner_app'
/home/<user>/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.4.2/lib/rack/builder.rb:51:in `instance_eval'
/home/<user>/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.4.2/lib/rack/builder.rb:51:in `initialize'
config.ru:1:in `new'
config.ru:1:in `inner_app'
/home/<user>/.rvm/gems/ruby-2.0.0-p247/gems/shotgun-0.9/lib/shotgun/loader.rb:112:in `eval'
/home/<user>/.rvm/gems/ruby-2.0.0-p247/gems/shotgun-0.9/lib/shotgun/loader.rb:112:in `inner_app'
/home/<user>/.rvm/gems/ruby-2.0.0-p247/gems/shotgun-0.9/lib/shotgun/loader.rb:102:in `assemble_app'
/home/<user>/.rvm/gems/ruby-2.0.0-p247/gems/shotgun-0.9/lib/shotgun/loader.rb:86:in `proceed_as_child'
/home/<user>/.rvm/gems/ruby-2.0.0-p247/gems/shotgun-0.9/lib/shotgun/loader.rb:31:in `call!'
/home/<user>/.rvm/gems/ruby-2.0.0-p247/gems/shotgun-0.9/lib/shotgun/loader.rb:18:in `call'
/home/<user>/.rvm/gems/ruby-2.0.0-p247/gems/shotgun-0.9/lib/shotgun/favicon.rb:12:in `call'
/home/<user>/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.4.2/lib/rack/builder.rb:134:in `call'
/home/<user>/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.4.2/lib/rack/handler/webrick.rb:59:in `service'
/home/<user>/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
/home/<user>/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
/home/<user>/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
When I load the app via the Ruby command ($ ruby app.rb), everything loads and works properly. This behavior began when I added a line requiring 'net/ldap', which is called out in the error. I've been digging around for about an hour and I can't seem to find any indication why this would happen. Below are the relevant require lines from app.rb:
require 'rubygems'
require 'sinatra'
require 'net/ldap' # gem install net-ldap
Dir.glob('./{models,helpers,controllers}/*.rb').each { |file| require file }
configure do
set :public_folder, Proc.new { File.join(root, "static") }
enable :sessions
set :session_secret, '<secret goes here>'
end
I have tried both "require 'net-ldap'" and "require 'net/ldap'" and they produce the same results.
/.rvm/gems/ruby-1.8.7-p301/gems/rack-1.2.1/lib/rack/file.rb:86: [BUG] Segmentation fault
ruby 1.8.7 (2010-08-16 patchlevel 301) [i686-darwin10.3.0]
Also happens on 1.9.2p0
C:/Ruby192/lib/ruby/gems/1.9.1/gems/shotgun-0.9/bin/shotgun:142:in `trap': unsupported signal SIGQUIT (ArgumentError)
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/shotgun-0.9/bin/shotgun:142:in `block in <top (required)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/shotgun-0.9/bin/shotgun:141:in `each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/shotgun-0.9/bin/shotgun:141:in `<top (required)>'
from C:/Ruby192/bin/shotgun:19:in `load'
from C:/Ruby192/bin/shotgun:19:in `<main>'
This is what I get when running shotgun
on Win 7 x64.
I get this error message
NameError: uninitialized constant Shotgun::Loader::YAML
when running shotgun under Ruby1.9.2-p318 or 1.9.2-p320, but not 1.9.3-p362
The error is triggered by this line:
config = YAML::load_file('./.env.yml')
I don't know enough to know whether this is a bug or something I'm doing wrong. Any help appreciated.
When trying to use Kernel.rand in in a request/action after it executes once it always returns this value back upon subsequent events. I've created a simple sample at http://github.com/jamster/shotgun_random
If I just use rackup, session is working well, but with shotgun, it doesn't seem working.
I'm using the versions below:
rack (1.3.2)
shotgun (0.9)
sinatra (1.2.6)
After loading shotgun via the following command, the shotgun command was not found even though the gem loaded OK.
|=|=Wed16==- sudo gem install shotgun
[sudo] password for xxx:
Successfully installed shotgun-0.6
1 gem installed
Installing ri documentation for shotgun-0.6...
Installing RDoc documentation for shotgun-0.6...
|=|=Wed16==- which shotgun
|=|=Wed16==-
I grabbed a copy of from the following directory and added it to my personal bin.
copy from => /var/lib/gems/1.8/gems/shotgun-0.6/bin
When I ran it I got:
|=|=Wed16==- shotgun -p 4567 pos_server.rb
/home/mat/bin/shotgun:96:in `require': no such file to load -- rack (LoadError)
from /home/mat/bin/shotgun:96
Adding a "require 'rubygems'" after that of optparse got it to work finally.
ENV: Ubuntu GNU/Linux, 10.4, ruby 1.8.7 and Mongrel
I am attempting to use shotgun
to run a file basic.rb
which has the contents
require 'sinatra'
get '/' do
'Test'
end
When I run sinatra basic.rb
everything works fine and shotgun -v
returns Rack 1.3
. How can I resolve this?
Getting the error using the latest shotgun, thin 1.2.7, rails 3.0.1 and ruby 1.9.2:
!! Unexpected error while processing request: end of file reached
any ideas?
Fails with the following error:
Shotgun does not seem to respond to the SIGTERM process signal, which can make starting and stopping shotgun and real pain, as the common CTRL+C doesn't kill it. Is there any reason for this? If not, is it something that can be fixed in a future version?
Cheers
Gotta have it.
The simplest way I could make it work was by doing this:
I know it's a bit hackish though. I tried also experimenting with reopening $stderr / $stdout after forking to the previous values, but unfortunately I couldn't find a way to make it work properly.
Thanks in advance for any help!
Currently the tests are not shipped with the gem, and there is no way to automatically pick a tarball of the project to have them.
Since I'm trying to package this for Gentoo, it would be much better if we had a way to pick up the tests and run them when installing the package.
Thanks!
I am using Sinatra running on thin (to publish to an AMQP broker, but that part isn't too important). In my Sinatra method, I have this (in essense):
get "/" do
puts "Sending message"
EventMachine.next_tick do
puts "Doing stuff..."
end
end
If I start Sinatra like this:
ruby site.rb &
then everything works fine and I'd see the "Doing stuff..." message when I call that route. However, if I start it with Shotgun:
shotgun site.rb &
or even:
shotgun -s thin -p 4567 site.rb &
I would see the "Sending message", but not the "Doing stuff...", which leads me to believe that next_tick is not being called when Sinatra is started with Shotgun.
Hi,
As I'm using sqlite3 as a dev db, sometimes when I send lots of requests to server at the same time, sqlite3 db file could be locked.
I tried to enable :lock
then Sinatra can't deal with many requests parallel, but with Shotgun, it seems that this option doesn't work. Can you help?
Thanks.
Ruby version: ruby 1.9.2dev (2010-03-29 trunk 27089) [x86_64-darwin10.2.0]
Shotgun starts, but when going to http://localhost:9393 it gives the error:
LoadError: no such file to load -- simple.rb (simple.rb being my Ruby-script)
When I run a Sinatra app with shotgun, I cannot access it in virtual Windows XP under VMWare. But it does work normally with rackup. Either way I'd go to http://192.168.1.19:port for instance.
If this makes any sense I can help further, please let me know.
$ gem man shotgun
No manual entry for shotgun
Anyway, thank you for the manual. It's great!
Running under Ruby 1.9 w/ webrick, the child processes are hanging pretty much immediately after fork. I think the issue may be that the child processes still have the parent process's accept socket open and so children are getting requests. Needs more research.
I've just installed shotgun on Ubuntu and I keep getting the following error:
WARN TCPServer Error: Address already in use - bind(2)
I've tried using different ports, but still get the same error. Is this a shotgun problem or am I doing something wrong?
cheers,
DAZ
my app on sinatra
past work with shotgun.
but after i update rack version from 1.0.0 to 1.0.1,
shotgun does not work well.
$ shotgun
[2009-12-08 23:08:46] INFO WEBrick 1.3.1
[2009-12-08 23:08:46] INFO ruby 1.8.7 (2009-06-12) [i686-linux]
== Shotgun starting Rack::Handler::WEBrick on :9393
[2009-12-08 23:08:46] INFO WEBrick::HTTPServer#start: pid=3467 port=9393
$ netstat -an
tcp 0 0 127.0.0.1:9393 0.0.0.0:* LISTEN
only local roopback.
$ ruby myapp.rb
== Sinatra/0.9.4 has taken the stage on 4567 for development with backup from WEBrick
[2009-12-08 23:07:38] INFO WEBrick 1.3.1
[2009-12-08 23:07:38] INFO ruby 1.8.7 (2009-06-12) [i686-linux]
[2009-12-08 23:07:38] INFO WEBrick::HTTPServer#start: pid=3461 port=4567
$ netstat -an
tcp 0 0 0.0.0.0:4567 0.0.0.0:* LISTEN
in sinatra's rack, i can access from other ip.
is it shotgun's problem?
my environment
shotgun 0.4
sinatra 0.9.4
rack 1.0.1
ruby 1.8.7 patch174
centos 5.2
on vmware server on windows xp
Hi Ryan,
Now that the current directory is not in Ruby's load path running require rackup_file
in Shotgun::Loader no longer works.
I've forked and branched your repo and managed to fix the issue (http://github.com/jcf/shotgun/commits/require_relative) but it's clear there is more work to be done to get shotgun's test suite running perfectly under 1.9.2.
If you want to pull the small change that's great as I'll be using it whenever I shotgun a sinatra app.
Thanks,
James
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.