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

WEBrick: mount_proc

What does the WEBrick instance method mount_proc do (in plain English)? The docs say: mount_proc(dir, proc=nil, &block) Mounts proc or block on dir and calls it with a WEBrick::HTTPRequest and WEBrick::HTTPResponse but I'm not clear what mounts…
Snowcrash
  • 80,579
  • 89
  • 266
  • 376
2
votes
2 answers

CSS/images not being loaded in Jekyll blog

I am new to Jekyll and just trying to start a Jekyll Theme example. I tried a few other themes too and all of them only load up at port 4000 with basic text and no images/styling. Fork the project. Clone the repo in my local machine bundle install…
Ayrton Senna
  • 3,735
  • 5
  • 34
  • 52
2
votes
1 answer

Problems running rails 2.3.10 bundler `require': no such file to load -- rubygems (LoadError)

I have an app on Rails 2.3.10 on production; when I try to start with ruby script/server -p 3017 -e production -d it throws me the following error: Rails requires RubyGems >= 1.3.2. Please install RubyGems and try again:…
trejo08
  • 2,348
  • 1
  • 13
  • 12
2
votes
1 answer

What is the best way to run a staging site on my production server?

I'm running a small Rails project using a production server from Linode. I would love to test some features in staging but I can't justify purchasing another server from Linode to perfectly mimic my production. I currently have two directories…
2
votes
2 answers

Webrick or Thin to run (non-ruby) static websites

Since the ASP.NET Development server (VS2012) doesn't let us access URL over LAN (!!) and I don't have rights to configure IIS, I am trying to use WEBrick to launch a static website, to get LAN access. I am running Ubuntu with vagrant on Windows. In…
Annie
  • 3,090
  • 9
  • 36
  • 74
2
votes
1 answer

Webrick proxy + cURL returns bad request

I'm going nuts, I have a very simple WEBrickProxy (WEBrick 1.3.1, with Ruby 1.9.3), and I want to try it out with curl. Here is the proxy: require 'webrick' require 'webrick/httpproxy' server = WEBrick::HTTPProxyServer.new(:BindAddress =>…
23tux
  • 14,104
  • 15
  • 88
  • 187
2
votes
1 answer

Ruby error Webrick or CGI?

I have using Webrick + CGI and when I instantiate, returns an error: (offline mode: enter name=value pairs on standard input) irb(main):001:0> require 'cgi' => true irb(main):002:0> cgi = CGI.new (offline mode: enter name=value pairs on standard…
Darlan Dieterich
  • 2,369
  • 1
  • 27
  • 37
2
votes
3 answers

Why WEBrick server is faster in production mode rather in development mode? + Rails

I have been developing ruby on rails application since some couple of months. I use the default WEBrick server to run the applications. And I found that when I start the WEBrick server in the development and production modes, the server works more…
VenkatK
  • 1,295
  • 1
  • 9
  • 21
2
votes
3 answers

rails s command creating new project and gem rails 3 and rails -v conflict

rails s command creating new project inside project directory instead of starting server. I installed rails in my system but it is showing unexpected behavior, as creating project instead of starting server. I see in my system by running gem list |…
Taimoor Changaiz
  • 10,250
  • 4
  • 49
  • 53
2
votes
1 answer

Ruby on Rails WEBrick SSL connection error

Please help to implement ssl rails version - 3.2.8 I edtited following files: # Gemfile gem 'rack-ssl' # config/application.rb require 'rack/ssl' config.middleware.use Rack::SSL I also tried to use # config/application.rb config.force_ssl =…
Dmitry Sterh
  • 81
  • 2
  • 11
2
votes
0 answers

Webrick and Firefox on Localhost - Repeated Request of Every JavaScript File Type

The Problem: With Firefox and Webrick, every JavaScript (.js) file type is repeatedly requested, which causes every page load to be too slow. With Internet Explorer: With Internet Explorer the re-occurring request of every JavaScript (.js) file type…
2
votes
1 answer

Sinatra on Ubuntu 12 - SSL error

Sinatra application, Ubuntu 12 #config.ru require 'sinatra/base' require 'openssl' require 'webrick' require 'webrick/https' class App1 < Sinatra::Base get '/' do 'app1' end end class App2 < Sinatra::Base get '/' do 'app2' …
Alan Coromano
  • 24,958
  • 53
  • 135
  • 205
2
votes
2 answers

Unable to stop Webrick launched by "rackup"

I'm developing a Sinatra application and I'm using "rackup" to start Webrick. What should I do to stop it? Now I'm using Ctrl+Z and it seems like it stops. However when I try to start it again it will say that the port is already bound. I tried it…
Alan Coromano
  • 24,958
  • 53
  • 135
  • 205
2
votes
1 answer

When starting WEBrick/Jekyll it produces a TCPServer Error (Address already in use)

I'm trying to start my local Jekyll server but it just won't work and no matter which port I choose it always comes down to the error: WARN TCPServer Error: Address already in use - bind (2) I tried to follow some instructions online, which mostly…
algorithms
  • 1,085
  • 1
  • 12
  • 21
2
votes
1 answer

Rails Server won't run after upgrading Mountain Lion

I upgraded to Mountain Lion and my nice stable ruby environment went crazy on me. My current issue is that my Rails Server exits on me: Ayman$ cd Sites/simple_cms Ayman$ rails server => Booting WEBrick => Rails 3.2.6 application starting in…
aalab002
  • 357
  • 2
  • 4
  • 12