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
321
votes
9 answers

What does "WARN Could not determine content-length of response body." mean and how to I get rid of it?

Since upgrading to Rails 3.1 I'm seeing this warning message in my development log: WARN Could not determine content-length of response body. Set content-length of the response or set Response#chunked = true What does this mean and how can I…
Nate Bird
  • 5,243
  • 2
  • 27
  • 37
207
votes
24 answers

Library not loaded: libmysqlclient.16.dylib error when trying to run 'rails server' on OS X 10.6 with mysql2 gem

I've been struggling with this for some time. I've installed Rails 3, gem, mysql on my Snow Leopard machine. All was going well until I created my first project and tried to run rails server Upon running this I get: jontybrook$ rails…
Jonty Brook
  • 3,017
  • 3
  • 16
  • 6
170
votes
20 answers

Server is already running in Rails

When I am starting rails server using rails s command it is showing A server is already running. Check C:/Sites/folder/Pids/Server.pids When I open the file it is outputting a 4 digit number only so how could I resolve this issue ? FYI No other…
swapnesh
  • 26,318
  • 22
  • 94
  • 126
121
votes
5 answers

Webrick as production server vs. Thin or Unicorn?

It seems like it's taken for granted that you must not use Webrick as production server, but I can't really find anywhere mentioning why. The consensus seems to be: "Webrick is ok for development, but Thin or Unicorn is the choice for production,…
Vlad
  • 8,038
  • 14
  • 60
  • 92
104
votes
2 answers

Connect to a locally built Jekyll Server using mobile devices in the LAN

After using jekyll serve on one machine, a WEBrick server is set up and the site can be accessed from localhost:4000 on this particular PC. However, I'm wondering how to access this web server from other machines in the LAN, especially for mobile…
Yi Zeng
  • 32,020
  • 13
  • 97
  • 125
88
votes
12 answers

Webrick is very slow to respond. How to speed it up?

I have a Rails application that I'm running on my server. When I go to a remote desktop and attempt to load the application, the server takes a good 3-4 minutes to respond with a simple HTML page. However, when I load up the page locally on the…
Crypto
81
votes
7 answers

Access webrick/rails from another computer on local network

I have a rails application running on localhost:3000. I wish to access it from another computer on the same network. I feel like i've done this before with ease, but it's giving me some grief. I can ping the IP of the computer just fine, but hitting…
agmcleod
  • 13,321
  • 13
  • 57
  • 96
44
votes
7 answers

Why does Ruby on Rails use http://0.0.0.0:3000 instead of http://localhost:3000?

When I tried to follow the official "Getting Started" Ruby on Rails tutorial, it went wrong very quickly. Basically it said : …navigate to http://localhost:3000. You should see Rails’ default information page. But when I follow the instructions, I…
Lou
  • 695
  • 2
  • 6
  • 10
41
votes
4 answers

Why would I want to use unicorn or thin instead of WEBrick for development purposes?

I've recently found that some people prefer using unicorn_rails instead of the default WEBrick as a web server for developing Rails applications. I understand that if I wanted to use unicorn in production, it could make kind of sense to try it out…
Jakub Arnold
  • 85,596
  • 89
  • 230
  • 327
37
votes
4 answers

Ruby Sinatra Webservice running on localhost:4567 but not on IP

I have a ruby(using sinatra) webservice on windows 7 32 bit OS. Its running on port 4567. Its working fine when I use localhost:4567 but when I replace localhost with the local ip of my machine say, 192.168.103.99:4567 it doesn't work, and fails to…
foobar
  • 2,887
  • 2
  • 30
  • 55
34
votes
4 answers

How to set Thin as default in Rails 3

I've been starting Thin with thin -V start in development. However, I would like Thin to be the default instead of WEBrick and to be able to start it with rails s. Is there a way to set Thin as the default instead of WEBrick in Rails 3? If that's…
deb
  • 12,326
  • 21
  • 67
  • 86
34
votes
7 answers

How to set access-control-allow-origin in webrick under rails?

I have written a small rails app to serve up content to another site via xmlhttprequests that will be operating from another domain (it will not be possible to get them running on the same server). I understand I will need to set…
brad
  • 9,573
  • 12
  • 62
  • 89
32
votes
2 answers

How do you configure WEBrick to use SSL in Rails?

Prior to Rails 3, you could modify the script/server file to add in SSL parameters and tell the server command to use the HTTPS version of WEBrick. Now that all of those scripts are gone, does anyone know how to get this to work with Rails 3 or 4?
Chris
  • 469
  • 1
  • 4
  • 10
26
votes
5 answers

How to change default port of a Rails 4 app?

I know that I can start a rails server on another port via -p option. But I'd like to setup another port per application as long as I start webrick. Any ideas? Regards Felix
GeorgieF
  • 2,687
  • 5
  • 29
  • 43
26
votes
1 answer

Access Rails Development Server From A Different Computer

I'm using webrick to develop my rails app on Mac OS X Lion. I'm trying to access the site from another computer (for testing). The internal IP of my computer is 10.1.10.100. Accessing 10.1.10.100 displays the page served by the apache server…
Tyler DeWitt
  • 23,366
  • 38
  • 119
  • 196
1
2 3
34 35