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
3
votes
2 answers

Favicon not found in production mode

Firefox does not find the favicon of my Rails 3.1 app in production mode. Running in development mode, it works. I browse to the URL localhost:4000/favicon_standing.ico for both modes. The favicon is located in my public folder of my app. I do not…
Bjoernsen
  • 2,016
  • 1
  • 33
  • 41
3
votes
2 answers

Aptana to start WEBrick

How can I configure Aptana to start webrick server on a Ruby On Rails project? I used the option "Promote to project" to open an existing rails project using aptana. I don't know how to configure (and start) my webrick server within Aptana.
Tony
  • 10,088
  • 20
  • 85
  • 139
3
votes
3 answers

Some Issue with running "WEbrick"

After I installed ruby 1.9.2p290(with rubyInstaller) on windows 7 and connected MySQL to it ( I checked it and it worked ) I installed rails then I create a project on "C:\Users\Amiref\Documents\Sites\simple_cms" with this order : "rails new…
3
votes
4 answers

When should I restart webrick and when should I not?

I'm currently learning developing ruby on rails applications. If i make changes in the views should i need to restart webrick ? What about controllers, models ? When exactly should i restart webrick during development of a rails app ?
YD8877
  • 10,401
  • 20
  • 64
  • 92
3
votes
1 answer

rails 3.1 + asset pipeline + webrick returning 406 for requests to /images/

i'm using the asset pipeline with rails 3.1 and less. i have my images stored in app/assets/images. in my .css.less file i have: background-image: url('image.gif'); when the stylesheet gets compiled, it renders the path to the image as…
kclair
  • 2,124
  • 1
  • 14
  • 18
3
votes
2 answers

Is it correct that there are particular times when you may need to restart Webrick to see your changes?

I heard Kevin Skoglund (lynda.com) say that it is good practice to get in the habit of restarting Webrick frequently during development. Although generally you do not need to restart Webrick to see your changes, he implied that there are particular…
pez_dispenser
  • 4,394
  • 7
  • 37
  • 47
3
votes
2 answers

ruby 3.0.4, redmine 5.0.0, rails 6.1.4, test install start with webrick fails, "wrong number of arguments"

New ubuntu-20 system with the following: ruby 3.0.4 rails 6.1.4 redmine 5.0.0 After install, trying to start webrick test server: bundle exec rails server webrick -e redmine_test fails…
Gary Aitken
  • 233
  • 2
  • 12
3
votes
1 answer

How to enable output compression (gzip) on everything that goes out of my Ruby on rails on Mongrel/WEBrick Server?

I am not sure this is the right place to ask this question, as answer to this may be coding solution or a config solution :) any way, I am using ruby 1.8.7 and rails 2.3.11 running on the Mongrel server. How do i enable the gzip compression on…
Shaunak
  • 17,377
  • 5
  • 53
  • 84
3
votes
1 answer

Rails Webrick: Configure what directories are watched for changes

At the moment I'm having to restart the server if I change files in the lib/ and app/helpers/ directories. Is there a way to configure either Rails or Webrick such that it hotswaps the files in those directories as well?
jaydel
  • 14,389
  • 14
  • 62
  • 98
3
votes
1 answer

How to execute simple Ruby on a local WebServer

I'm using WEBrick to start a local server on port 2000 and trying to execute Ruby with ERB. (I have Ruby 1.9.2 installed on my OS X box). It doesn't seems to work. For example, I created an erb file (tryErb.erb) like this:
3
votes
1 answer

Issue when trying to run WEBrick and Rails

Going through the Lynda training for Ruby on Rails and got to the point where I am starting the WEBrick sever via the rails s command. I am in the same directory as the video /Users/myuser/Sites/simple_cms I get the following…
3
votes
2 answers

Rails locale development server "rails s" to serve multiple request at the same time

Windows 7, Rails 3 here. I local/development mode, rails server does not handle multiple request at the same time. The process crash and the cmd prompt comes in front. I've noticed this behaviour when : having too much ajax request, too close from…
Marcel Falliere
  • 1,884
  • 21
  • 39
3
votes
1 answer

Handle the PUT method in WEBrick

How do I handle PUT requests in WEBrick? I have tried defining a do_PUT() method in an AbstractServlet class but the method is never invoked.
asussex
  • 3,051
  • 2
  • 16
  • 6
3
votes
1 answer

Getting rid of ActionController::InvalidAuthenticityToken (Rails 3, webrick, devise)

Cannot figure this one out. Developing Rails 3.0.3 app using Devise 1.1.5, running locally on WEBrick 1.3.1. Out of nowhere I get a ActionController::InvalidAuthenticityToken error on login (successful or not) and registration. The app is…
Jason Lynes
  • 101
  • 1
  • 2
  • 7
3
votes
3 answers

Why RubyMine 2.0.2 starts Webrick on different port each time I run/debug my app?

Each time I start my Rails 2.3.8 webapp under RubyMine, it's using a different port. This drives me mad, since I've to change the URL in the browser each time I want to test something. I'm unable to find any configuration option to change that.…
Matt
  • 5,328
  • 2
  • 30
  • 43