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

Using CGI to run a script

first time posting :) I am doing an exercise in Ruby and i am a little stuck with the CGI method. I used the HTML code below to send the form's input. Bit from HTML
:…
TLP
  • 109
  • 9
2
votes
1 answer

How to add code to set headers to a simple ruby webrick command line?

When I need a test web server that can serve a few files from some directory, I really like the simplicity of ruby -run -e httpd . -p 8888 then browse to localhost:8888. However, sometimes I'd like to add a tiny little bit to that, for example, set…
Guntram Blohm
  • 9,667
  • 2
  • 24
  • 31
2
votes
1 answer

Server won't start on using authlogic-oauth2

I have included oauth2 and authlogic-oauth2 in the gemfile as I want to use them and am trying to start the server. It doesn't start and gives me the error: /Library/Ruby/Gems/1.8/gems/railties-3.0.3/lib/rails.rb:44:in `configuration': undefined…
Yahoo-Me
  • 4,933
  • 5
  • 27
  • 26
2
votes
1 answer

Running staticmatic preview command results in webrick error

I get the following error with the following staticmatic preview command staticmatic preview my-app Site root is: my-app StaticMatic Preview Server Ctrl+C to exit [2010-12-16 11:42:24] INFO WEBrick 1.3.1 [2010-12-16 11:42:24] INFO ruby 1.8.7…
jenson-button-event
  • 18,101
  • 11
  • 89
  • 155
2
votes
5 answers

Ruby on Rails: How to start the WEBrick server automatically on Windows in background?

In order to run the my Rails application on Windows XP I open a command line, cd to application's directory, and then run rails server. I would like to automate this, such that every time I turn on my computer, all I'll have to do is to type…
Misha Moroshko
  • 166,356
  • 226
  • 505
  • 746
2
votes
1 answer

How to check which web server you are running Rails 4

I know this is probably very easy but I am having an overly hard time finding an answer. How do you check what web server your app is running in production? I just switched from WEBrick to Puma (for production) and want to double check it is in fact…
Kathan
  • 1,428
  • 2
  • 15
  • 31
2
votes
1 answer

webrick rails server shuts down a few seconds after starting

After days of not being able to run a WEBrick rails server at all, I finally got it up and running only to have it shutdown about 5 seconds after it has started. This is a completely fresh project created via the commandline. The only changes I made…
Luffen
  • 403
  • 1
  • 5
  • 17
2
votes
1 answer

rails s doesn't start server, no error messages

I haven't been able to find previous answered questions on this, unless I'm missing one. Anyways, when I try starting a rails server: vagrant [accounts]> rails s => Booting WEBrick => Rails 4.2.1 application starting in development on…
dcotes
  • 25
  • 4
2
votes
0 answers

Webrick connection reset error?

I am struck with the following webrick error [2015-04-16 11:36:30] ERROR Errno::ECONNRESET: Connection reset by peer @ io_fillbuf - fd:39 /Users/user/.rvm/gems/ruby-2.1.5@rails3/gems/webrick-1.3.1/lib/webrick/httpserver.rb:80:in…
Balaji Radhakrishnan
  • 1,010
  • 2
  • 14
  • 28
2
votes
0 answers

WEBrick log to console like in development

Currently running: RAILS_ENV=staging bundle exec rails s The console has zero output (it logs to staging.log just fine). I'd like to get a console output just like development mode or if I ran bundle exec rails s. EDIT Found this, no…
nitsujri
  • 1,448
  • 2
  • 16
  • 29
2
votes
1 answer

Unable to start the Webrick server with Ruby on Rails

When I enter 'rails server' on the command line, I get the following error - C:/Ruby21/lib/ruby/gems/2.1.0/gems/sqlite3-1.3.9-x86-mingw32/lib/sqlite3.rb:6:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError) from…
Deepzter
  • 57
  • 1
  • 6
2
votes
1 answer

how to excute code on webrick server

I start a webrick server like this: dell@dev:/var/www/ruby$ ruby -run -httpd. -p 5000 and have this code in abc.rb: require 'webrick' root = File.path '/tmp/public_html' server = WEBrick::HTTPServer.new :Port => 5000, :DocumentRoot =>…
Harman
  • 1,703
  • 5
  • 22
  • 40
2
votes
1 answer

Webrick Rails server won't start?

I'm using Rails 4.0.0, and successfully installed the mysql2 gem yesterday (mysql-0.3.15) using mysql-connector-c-6.1.3.winx64. I created a new Rails project called "simple_cms" using rails new simple_cms -d mysql which worked, and then ran bundle…
2
votes
1 answer

Tell Webrick to load everything / restart on next request (something like restart.txt)

Is there a way to tell Webrick to reload everything on the next request? Something like tmp/restart.txt for passenger? I love guard and would like it to restart my development server whenever a critical file changes. I accomplished to stop the…
Joshua Muheim
  • 12,617
  • 9
  • 76
  • 152
2
votes
2 answers

Nginx node and WEBrick configuration

Let me preface this by saying that I have no idea what I'm doing. Alright, with that out of the way, my question is this: I'm running Grunt's webserver to serve front-end files and I'm running webrick for the data api. Grunt proxies data requests…
vin
  • 823
  • 1
  • 10
  • 15