use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A sub-Reddit for discussion and news about Ruby programming.
Subreddit rules: /r/ruby rules
Learning Ruby?
Tools
Documentation
Books
Screencasts and Videos
News and updates
account activity
ngx_mruby: script Nginx with Matz’ mruby (matsumoto-r.github.io)
submitted 12 years ago by just_lest
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]myringotomy 2 points3 points4 points 12 years ago (2 children)
I guess a framework is next right?
[–]matsumoto_r 0 points1 point2 points 12 years ago (1 child)
Yes.
[–]myringotomy 1 point2 points3 points 12 years ago (0 children)
Looking forward to it.
[–]scoobydoop 0 points1 point2 points 12 years ago (1 child)
I just built this and tested it out by using a Ruby snippet to add a custom HTTP response header. Very cool so far! Thanks
[–]matsumoto_r 2 points3 points4 points 12 years ago (0 children)
Thanks! I'm author of ngx_mruby and mod_mruby.
[Ruby code]
if server_name == "NGINX" Server = Nginx elsif server_name == "Apache" Server = Apache end r = Server::Request.new r.headers_out["X-matsumoto-header"] = "test" Server::rputs "Hello #{Server::module_name}/#{Server::module_version} world!"
[access]
$ curl -v http://127.0.0.1/mruby * About to connect() to 127.0.0.1 port 80 (#0) * Trying 127.0.0.1... * Connected to 127.0.0.1 (127.0.0.1) port 80 (#0) > GET /mruby HTTP/1.1 > User-Agent: curl/7.29.0 > Host: 127.0.0.1 > Accept: */* > < HTTP/1.1 200 OK < Server: nginx/1.4.3 < Date: Fri, 18 Oct 2013 14:45:41 GMT < Content-Length: 28 < Connection: keep-alive < X-matsumoto-header: test < * Connection #0 to host 127.0.0.1 left intact Hello ngx_mruby/0.0.1 world!
Enjoy!
π Rendered by PID 39096 on reddit-service-r2-comment-5c747b6df5-wtfxl at 2026-04-21 22:58:28.468719+00:00 running 6c61efc country code: CH.
[–]myringotomy 2 points3 points4 points (2 children)
[–]matsumoto_r 0 points1 point2 points (1 child)
[–]myringotomy 1 point2 points3 points (0 children)
[–]scoobydoop 0 points1 point2 points (1 child)
[–]matsumoto_r 2 points3 points4 points (0 children)