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
5
votes
1 answer

Running Rails S with a fresh new app returns ERR_EMPTY_RESPONSE

I am using Vagrant to start a Rails app, everything seems right but then, when I create a test app, run rails s and go to localhost:3000 I get a ERR_EMPTY_RESPONSE and nothing is loaded. I get the following output when running rails…
user2580108
5
votes
1 answer

How to set the default error pages for a basic Webrick server?

I have a very basic webrick server running for the admin pages of an embedded device. We just added basic authentication to the device and it works great, but you get the generic "unauthorized" message back like this:
DaKaZ
  • 925
  • 1
  • 7
  • 18
5
votes
3 answers

Ruby on Rails : is IP port 3000 locked out for external access, on Rails 4.2?

I run 2 versions on my RoR application on my computer: One is for demos (stable state, RoR 4.0), the other one is for development (RoR 4.2). Both versions can be accessed using http://localhost:3000. But I noticed an annoying difference: The Demo…
user1185081
  • 1,898
  • 2
  • 21
  • 46
5
votes
1 answer

Cannot suspend webrick with control-Z after server processes a request

When developing a Rails 4.1.6 project, I can start a Webrick server with: rails s Before the server has processed any requests, I can: Stop it with control-C Suspend it with control-Z After the server has processed a request, I can still stop it…
Wayne Conrad
  • 103,207
  • 26
  • 155
  • 191
5
votes
1 answer

Webrick/Rails - Timeout Error after sending POST request

I am working on a Redmine plugin and I created a method where I'm sending 2 HTTP POST requests to attach a file to a document. After executing the first request, I get a Timeout::Error (Timeout::Error) although the request has been successfully…
Shredator
  • 940
  • 3
  • 17
  • 32
5
votes
1 answer

Request-URI Too Large Error - Get rid of GET?

I have a form on my site where users can submit answer text to be checked by the controller. It uses a standard GET form: <%= form_tag('/submit', method: "get", remote: true) do %> But I recently got the following error on long answer: Request-URI…
am-rails
  • 1,463
  • 2
  • 16
  • 40
5
votes
1 answer

Fork WEBrick and wait for start

I have the following code, where a WEBrick instance is forked, and I want to wait till the webrick is started up, before continuing with the rest of the code: require 'webrick' pid = fork do server = WEBrick::HTTPServer.new({:Port => 3333,…
23tux
  • 14,104
  • 15
  • 88
  • 187
5
votes
3 answers

Why is my rails development environment not reloading on changes to code?

Each time I make changes to code I have to restart the server or it won't change the output. I have tried using thin and webrick. My development.rb file says "config.cache_classes = false". I am using RubyMine. Sometimes my view updates, but the…
webmagnets
  • 2,266
  • 3
  • 33
  • 60
5
votes
1 answer

Can't run rails 2.x app

I try to run 2.x application. I use rvm and set for this application other version of ruby: $ rvm use ree-1.8.7-head I try to run server and then i get a lot of errors: $ script/server NOTE: Gem.source_index is deprecated, use Specification.…
ExiRe
  • 4,727
  • 7
  • 47
  • 92
5
votes
1 answer

Phusion Passenger v. WEBrick

What is the difference between using Phusion Passenger or just using WEBrick (e.g., rails s) in terms of a production environment? I understand that Phusion Passenger installs a module on either Apache or Nginx, but is it a full fledged ruby server?…
TomJ
  • 5,389
  • 4
  • 26
  • 31
4
votes
1 answer

Opening a new page: New window vs. New tab

I have my web browser (Firefox 10 and Chrome 16) set so that when a new page opens, it is opened within the same window in a new tab. When I write a local file like this: and…
sawa
  • 165,429
  • 45
  • 277
  • 381
4
votes
1 answer

Configuring Webrick in rails 3.0 to serve both http and https (SSL)

I am trying to use ssl_requiremnt plugin for rails 3.0 in my app. A few links in my app need to be secure with SSL and the rest need to be served by http only. I configured webrick according to this post:…
Dev R
  • 1,892
  • 1
  • 25
  • 38
4
votes
2 answers

How can rails app accept non-alphanumeric character in url?

I am trying to construct search method by accepting some keywords as a GET request. For exmaple, 'articles/search/computer' will likely search for articles that have keyword computer. Now, if search term contains some other languages, such as…
user482594
  • 16,878
  • 21
  • 72
  • 108
4
votes
1 answer

Making Mongrel/WEBRick serve static assets with future expires header

I'm creating a Rails application which will be deployed to desktop machines, running both the webserver and the browser (it's a test-taking application which needs to be able to run without an internet connection). For this reason, I'll be running…
Alexander Malfait
  • 2,691
  • 1
  • 23
  • 23
4
votes
1 answer

Redmine: want to run webrick service as background process

I am completely done with my redmine installation in ubuntu server. I am testing the server using the following command: ruby script/server webrick -e production But when I press ctrl+z it stops. So I want to start this one as a service or process…
M.M.H.Masud
  • 329
  • 3
  • 8
  • 22