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

How to harden rails+webrick+https with insecure ciphers removed on Ruby 2.2

Updated: At first, my test code didn't adequately show ruby 2.4 sees the :SSLCiphers option whereas ruby 2.2 does not. I have edited the example code below to make that clear. Updated: Since my question failed to elicit any help from the community,…
4
votes
2 answers

rails mysql gem problem on ubuntu

Ruby on Rails: I would like to call a controller on the localhost, but the server said !!! Missing the mysql gem. Add it to your Gemfile: gem 'mysql', '2.8.1' The problem ? When I hit 'gem list' command then I got a list witch is containing the…
narancs
  • 5,234
  • 4
  • 41
  • 60
4
votes
0 answers

My site crashes Internet Explorer

When I try to open my site on IE (development, environment, or online), it crashes every time. This is my server readout upon entering the home page (it actually crashes on any page view after this): Rendered shared/_footer.erb (0.0ms) Rendered…
sscirrus
  • 55,407
  • 41
  • 135
  • 228
4
votes
1 answer

Running webrick server in background for Windows

I want to run Webrick server in background on Windows, tried following with no luck : >rails s -d C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/activesupport-4.0.4/lib/active_support/values/time_zone.rb:283: warning: circular argument reference - now =>…
S R
  • 674
  • 2
  • 18
  • 45
4
votes
1 answer

Ruby on Rails - Running rails server on a public IP

Is it possible to perform a rails server -b my.public.ip.address -p 8000 running this code obviously doesn't work. So I am wondering if there is a way to around this?
Bad Hombre
  • 596
  • 5
  • 18
4
votes
1 answer

How do I resolve this error while increasing eager loading? "ERROR ThreadError: Attempt to unlock a mutex which is locked by another thread"

My Rails application uses the inherited_resources gem. I am currently trying to speed it up to be able to handle a much larger data set. So I went forward (with the help of the Bullet gem) to use eager loading where it would prove helpful. Within…
4
votes
1 answer

Is the ruby on rails webrick server ever used in production?

In a situation where the main server (apache) is offline, is it ever acceptable to run the ruby on rails application on the built in webrick server? Or should I have a local apache running. I have to have it available local and it would be very…
johnny
  • 19,272
  • 52
  • 157
  • 259
4
votes
4 answers

How to access html request parameters for a .rhtml page served by webrick?

I'm using webrick (the built-in ruby webserver) to serve .rhtml files (html with ruby code embedded --like jsp). It works fine, but I can't figure out how to access parameters (e.g. http://localhost/mypage.rhtml?foo=bar) from within the ruby code in…
cibercitizen1
  • 20,944
  • 16
  • 72
  • 95
4
votes
2 answers

Scaling Puppet - when is too much for WEBrick?

I've found the following at Docs: Scaling Puppet: Are you using the default webserver? WEBrick, the default web server used to enable Puppet’s web services connectivity, is essentially a reference implementation, and becomes unreliable beyond about…
eRadical
  • 711
  • 6
  • 21
4
votes
1 answer

Sinatra Restarting Webrick Server after ctrl-c

require 'sinatra' require 'rubygems' class TestServer < Sinatra::Application set :port, 22340 get '/' do "Hello World" end run! if app_file == $0 end Very Simple application with Ruby 2.0.0-p0 and Sinatra 1.4.2 When I ctrl-c…
jjhughes57
  • 201
  • 3
  • 5
4
votes
2 answers

Page not working Attempt to unlock a mutex which is locked by another thread

I want to start my app and it's still "loading". It worked in the morning, but now it doesn't . I tryied with other ports, switching to a stable branch, restarting computer, but nothing seems to work. On other apps, it's working. If I stop de…
vladCovaliov
  • 4,333
  • 2
  • 43
  • 58
4
votes
1 answer

"Error bad URI" when trying to get WEBrick to accept HTTPS

So I've got a simple Sinatra site: # app.rb require 'sinatra' get '/' do 'Hello world!' end And I can set up rack to serve it over HTTP: # config.ru require './app' run Sinatra::Application…
rampion
  • 87,131
  • 49
  • 199
  • 315
4
votes
2 answers

Sinatra haml page is called twice

get '/test' do session[:my_session_id] = generate_random_id() puts 'begin haml debug' haml :"static/haml_page", :locals=>{:session_id => session[:my_session_id]} end I see in a log that a page above is constantly called…
Alan Coromano
  • 24,958
  • 53
  • 135
  • 205
4
votes
1 answer

Ruby Rails webrick server using old version of ruby

ruby -v give me ruby-1.9.3-p194. which ruby gives /home/ubuntu/.rvm/rubies/ruby-1.9.3-p194/bin/ruby rails -v gives Rails 3.2.7 which rails gives /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/bin/rails "sudo bundle exec rails s"…
StanM
  • 827
  • 4
  • 12
  • 33
4
votes
1 answer

How does Rails handle concurrent request on the different servers?

This has been asked before, but never answered particularly exhaustively. Let's say you have Rails running on one of the several web servers that support it, such as WEBrick, Mongrel, Apache and Nginx (through Passenger Phusion). The server receives…
Alexandr Kurilin
  • 7,685
  • 6
  • 48
  • 76