Questions tagged [webrick]

Webrick is a zero-configuration HTTP server stack chiefly used as the web server for the Ruby on Rails framework development and test environments.

WEBrick is an HTTP server toolkit that can be configured as an HTTPS server, a proxy server, and a virtual-host server. WEBrick features complete logging of both server operations and HTTP access.

A WEBrick server can be composed of multiple WEBrick servers or servlets to provide differing behavior on a per-host or per-path basis. WEBrick includes servlets for handling CGI scripts, ERb pages, ruby blocks and directory listings.

WEBrick also includes tools to run a process as a service and starting a process at a higher privilege level and dropping permissions.

From the version of ruby 1.9.1 Webrick is a part of ruby standard library. More info is on ruby docs. Sources for an older ruby version is on github.

523 questions
1
vote
1 answer

How does Pow/Phusion Passenger/Webrick work?

I come from a PHP and .NET world where I understand the environment fairly well. However I can't find a newbie explanation of how the Ruby / Ruby on Rails stack actually work with these web server. Are they more close to the PHP model, where all…
tillda
  • 18,150
  • 16
  • 51
  • 70
1
vote
2 answers

streaming html from webrick?

Has anyone tried streaming html/text/content from webrick? I've tried assigning an IO to the response body, but webrick is waiting for the stream to be closed first.
alex
  • 2,036
  • 2
  • 16
  • 19
1
vote
1 answer

unable to start webrick in windows xp

i got this error while i try to start the webrick server on my windows xp. ←[31mCould not find eventmachine-0.12.10 in any of the sources←[0m ←[33mRun `bundle install` to install missing gems.←[0m I've already did a 'bundle install'. Also tried to…
user976665
  • 23
  • 4
1
vote
1 answer

Issue with Warble JAR not running correctly on Tomcat 6, runs fine on Webrick

I am somewhat new to Jruby - up to this point I have had no problem using warble and building a war for my Jruby. Now when I try to deploy the created war I see this error in the logs and I am not sure 100% how to fix. Please help. Error in logs…
DanielCW
  • 149
  • 1
  • 14
1
vote
0 answers

Rails - How can I load a (valid) file from Webrick into a HTML5 video element?

This code, from a file on my desktop, does not work: Here are the…
Jason Newell
  • 591
  • 6
  • 11
1
vote
1 answer

Hiding all exception messages

I'm running Rails 3.0.8 with Webrick webserver started in production mode with such command RAILS_ENV=production rails server I have a following problem. I've read, that rails in production mode should handle all exceptions and errors. But I'm…
Stanislav Mekhonoshin
  • 4,276
  • 2
  • 20
  • 25
1
vote
0 answers

how to make redirect in webrick/ruby?

How to make Redirect in WEBRICK Ruby, can the simplest example with the syntax? In this example require 'webrick' class MyServlet < WEBrick::HTTPServlet::AbstractServlet def do_GET (request, response) result = "" …
user83828
  • 11
  • 1
  • 1
1
vote
1 answer

rails server (WEbrick) eventually stops logging to stdout on Mac?

If this is a real problem, I'd expect to find it here or in Google, but I seem to be the only one experiencing it: After leaving our plain-vanilla Rails app running for a few hours or days on my development laptop, I'll discover that there's no new…
Jay Levitt
  • 1,680
  • 1
  • 19
  • 28
1
vote
2 answers

Not able to access rails app on port 3001

I am trying to run rails app on different port (3001) using "rails s -p 3001" Though the server gets started perfectly, but i am still not not able to access it. The same works perfectly fine on default port of 3000. The machine which is being used…
SDK
  • 41
  • 1
  • 5
1
vote
1 answer

Sending a push event from webrick

How can I send a push event via webrick? At certain timings, I want ruby to fire some events and send it to the browser via webrick. I can embed some JavaScript code on the page in advance. Particularly, I am trying to implement one of the…
sawa
  • 165,429
  • 45
  • 277
  • 381
1
vote
5 answers

Rails server won't start (LoadError) mysql2

I'm kind of a newbie at rails, I have to make a small rails project for school, but somehow I can't even get my server to run, really promising start, hope someone can help me out ;-). When I try to start my rails server, it gives me a load…
Sander Declerck
  • 2,455
  • 4
  • 28
  • 38
1
vote
1 answer

Rails / Rack / Config.ru

Trying to follow the "Ruby on Rails 3 Tutorial" and running rails s, getting the following error: [path]\config.ru:1 in 'require': no such file to load -- fake_app I've got the location of fake_app.rb in the PATH (which I presume is what rails/rack…
Neil Singer
  • 11
  • 1
  • 2
1
vote
1 answer

How to modify HTML content on Webrick proxy server?

How can I use Ruby Webrick to do html content modification as it passes through a proxy server? require 'webrick' require 'webrick/httpproxy' handler = proc do |req, res| # if the_site_url == "youtube.com" # html_of_the_page = "Custom…
springworks00
  • 104
  • 15
1
vote
4 answers

How can I use local resources on a server?

How can I use local resources like css, js, png, etc. within a dynamically rendered page using webrick? In other words, how are things like Ruby on Rails linking made to work? I suppose this is one of the most basic things, and there should be a…
sawa
  • 165,429
  • 45
  • 277
  • 381
1
vote
1 answer

How to start WEBrick Ruby server in secure SSL mode HTTPS

Start situation: Installed Linux Ubuntu operating system and Ruby via apt installer. After that installed WEBrick Ruby server via gem packgake handler. Applications with version numbers: Linux Ubuntu 18.04 Ruby 2.5.1p57 OpenSSL 1.1.1 gem WEBrick…