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
0 answers

Ruby, Webrick think every local port is already in use

I am developing a static site locally. To view it in a browser, I run this command ruby -run -ehttpd . -p8000 to run a local webserver at localhost:8000. Starting yesterday, when I run it, I get the error INFO WEBrick 1.3.1 INFO ruby 2.0.0…
McNulty
  • 374
  • 1
  • 3
  • 13
1
vote
1 answer

serving images using Webrick

I need to grab a some images from a folder on a users computer and display them on a webpage using a webrick server. I am using the following code to scan the directory and then include the path to the webserver. I am getting correct paths to the…
tsugua
  • 197
  • 1
  • 13
1
vote
3 answers

Is there any advantage to using WEBrick in development mode for Rails?

I develop on a Mac, and I'm pretty comfortable setting up an Ubuntu VM with Apache installed, so "you don't need to install Apache" is not really a reason. I run Ruby from the VM anyway, so there doesn't seem to be much difference in system…
Dan Blows
  • 20,846
  • 10
  • 65
  • 96
1
vote
0 answers

Debug child ruby cgi process spawned by webrick by redirecting stdin and stdout

The problem: byebug or pry output is returning via HTTP instead of on console. I have a webrick.rb script which has a CGIHandler mounted with a dispatch.fcgi script passed to it: server.mount("/", WEBrick::HTTPServlet::CGIHandler,…
raven
  • 11
  • 2
1
vote
1 answer

Problems upgrading Rails 4.0.0 to 4.0.x (4.0.13) - private method `include' called for ActionDispatch::Assertions:Module (NoMethodError)

I could not find a "direct" answer to this anywhere. Since I know there will be many other "Late Upgraders" to the party, I feel I need to get this out. I had a Rails 4.0.0 app running Ruby 2.0.0-p247. After upgrading to 4.0.13, I ran into this…
Eric Wanchic
  • 2,046
  • 1
  • 23
  • 26
1
vote
0 answers

Databaseless Rails Application Not Reloading Models

I have a databaseless Rails 5.2.3 application (it's getting all data through an API). Whenever I make a change to the model I have to restart my server to get the changes to take effect. I have the following line in my development.rb…
mmcc8394
  • 31
  • 2
1
vote
1 answer

Rails 5.2 / Ruby 2.5: How to silence spammy WEBrick request logs?

I just upgraded an app from Ruby 2.3 / Rails 4.2 to Ruby 2.5.3 / Rails 5.2.2. The upgrade went smoothly but now when I test making calls in my development server, I notice that each page request generates two extra log lines in STDOUT (but not in my…
Topher Hunt
  • 4,404
  • 2
  • 27
  • 51
1
vote
1 answer

Ruby Webrick server not able to verify client certificate

I am running a sinatra based web application using Webrick. I was able to setup TLS using my self-signed server certificates and webrick starts in TLS mode, but I am not able to make a connection to server using client certificate (cert based…
Dinesh Namburi
  • 301
  • 3
  • 14
1
vote
1 answer

Rails app getting Illegal Instruction every time I change logic

I have a fairly large Rails app that is getting increasingly harder to develop on. The development environment has gotten slower and slower and WeBrick is taking forever to start up. The oddest thing however, is that whenever I change code in the…
ScotterC
  • 1,054
  • 1
  • 10
  • 23
1
vote
0 answers

Rails: PDFKit works in WEBrick but not in Apache

This was a real head scratcher for me. I was able to create PDFs without problem in Rails/WEBrick. When I changed to Apache I got the message: no wkhtmltopdf executable found at please install wkhtmltopdf Clearly, gem 'pdfkit' gem…
RalphShnelvar
  • 557
  • 1
  • 6
  • 17
1
vote
1 answer

rails openssl issue in fedora 14

I have installed ruby by downloading and compiling the source... when i run script/server in my rails application.. it throws an error /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning:…
mohit
  • 1,913
  • 3
  • 16
  • 23
1
vote
1 answer

How to start redmine with a specific port from bash script?

On my computer, I can start redmine by: cd /usr/share/redmine bundle exec rails server webrick -e production -p 3001 and this will start redmine just fine at port 3001. If I create a bash script, it always starts at port 3000, like the parameters…
user9148986
1
vote
1 answer

Web interface for command line application

I'm developing an application in Ruby. It is used at the command line and has a lot of options, some of them fairly complex. I'd like to provide the ability to use the application through a web interface. So I'm asking the general question of the…
tscheingeld
  • 789
  • 7
  • 24
1
vote
4 answers

Problems with WEBrick crashing

Here are the details upon start up => Booting WEBrick => Rails 3.0.1 application starting in development on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server [2011-01-11 13:43:57] INFO WEBrick 1.3.1 [2011-01-11 13:43:57]…
daz13
  • 245
  • 2
  • 15
1
vote
1 answer

public folder on redmine doesn't recognize binary files

I have put a binary file (.apk) on redmine/public folder but when I try to download that file I only get the text version of that file as text. How to change that behavior to direct download?
Ivan Cachicatari
  • 4,212
  • 2
  • 21
  • 41