-
-
Save copiousfreetime/7eddc80d2fb0d40afd9f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Marie@cosmic-joystick MINGW64 ~/rubygems-issue-1392-testcase | |
$ rackup | |
C:/Ruby22/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:146:in `to_app': missing run or map statement (RuntimeError) | |
from C:/Users/Marie/rubygems-issue-1392-testcase/config.ru:9:in `<main>' | |
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval' | |
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string' | |
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file' | |
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config' | |
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:208:in `app' | |
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app' | |
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:272:in `start' | |
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/rack-1.6.4/lib/rack/server.rb:147:in `start' | |
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/rack-1.6.4/bin/rackup:4:in `<top (required)>' | |
from C:/Ruby22/bin/rackup:23:in `load' | |
from C:/Ruby22/bin/rackup:23:in `<main>' | |
Marie@cosmic-joystick MINGW64 ~/rubygems-issue-1392-testcase | |
$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'grape' | |
class A < Grape::API | |
format :json | |
get '/' do | |
{ :message => "Hello World!\n" } | |
end | |
end | |
run A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem 'rack' | |
gem 'grape' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% rackup | |
[2016-03-08 10:51:39] INFO WEBrick 1.3.1 | |
[2016-03-08 10:51:39] INFO ruby 2.3.0 (2015-12-25) [x86_64-darwin15] | |
[2016-03-08 10:51:39] INFO WEBrick::HTTPServer#start: pid=39391 port=9292 | |
::1 - - [08/Mar/2016:10:52:43 -0600] "GET / HTTP/1.1" 200 28 0.0908 | |
% curl -v http://localhost:9292/ | |
* Trying ::1... | |
* Connected to localhost (::1) port 9292 (#0) | |
> GET / HTTP/1.1 | |
> Host: localhost:9292 | |
> User-Agent: curl/7.43.0 | |
> Accept: */* | |
> | |
< HTTP/1.1 200 OK | |
< Content-Type: application/json | |
< Content-Length: 28 | |
< Server: WEBrick/1.3.1 (Ruby/2.3.0/2015-12-25) | |
< Date: Tue, 08 Mar 2016 16:52:43 GMT | |
< Connection: Keep-Alive | |
< | |
* Connection #0 to host localhost left intact | |
{"message":"Hello World!\n"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment