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

How to stop a jekyll local server

I've just set up my first Jekyll project locally. I've got the server running, but I forgot to use the auto flag. So now I want to stop the server and restart using the flag. However, in my command line after I started the server I didn't get a new…
musoNic80
  • 3,678
  • 9
  • 40
  • 48
8
votes
2 answers

Things to know when replacing WEBrick by Thin

I intend to replace WEBrick by Thin on a Rails 3.2 project because WEBrick handles malformed unescaped URIs badly (bad URI error). I know there are config hacks to make WEBrick handle unescaped URIs but just adding gem 'thin' to my Gemfile seems so…
joscas
  • 7,474
  • 5
  • 39
  • 59
8
votes
5 answers

How do I kill a rails webrick server?

When I try to start a server via rails s, I get the following error message: C:\Users\Frankie\Documents\stocktracker>rails s => Booting WEBrick => Rails 3.2.8 application starting in development on http://0.0.0.0:3000 => Call with -d to detach =>…
fbonetti
  • 6,652
  • 3
  • 34
  • 32
7
votes
3 answers

Working around the lack of context in Sinatra's route methods

I have been having an issue with missing instances and nilClass errors when calling my routes. After delving around within the source it seems like the generate_method call basically creates a new method using the block of the initial method. get…
Grofit
  • 17,693
  • 24
  • 96
  • 176
7
votes
5 answers

rails app fast on server, but slow when accessed from another machine

I have a Rails app hosted on a server machine (running Webrick). When I log onto this machine and access the app (via localhost:3000), the app runs smoothly. But when I try to access the app from another machine (via hostname:3000), the app runs…
grautur
  • 29,955
  • 34
  • 93
  • 128
7
votes
4 answers

Starting a rails server in Rails 3

I have created a new rails project with the command: rails project_name but now in that project if I run: rails server I just creates a new project call server, it doesn't start webrick. How do I start the server and get rails running?
CafeHey
  • 5,699
  • 19
  • 82
  • 145
7
votes
1 answer

rails 3.2.3 doesn't work on https using webrick in ubuntu 12.0.4

Have been trying to get a fresh, just created rails application to work on ssl using webrick in ubuntu 12.0.4. Have tried all possible methods that I'm aware of. Tried using config.force_ssl = true in application.rb, also force_ssl in application…
Sakthi
  • 83
  • 1
  • 5
7
votes
1 answer

How to set default port for Webrick?

I want to set the default port when I do rails s to 3010, instead of having to say: rails s -p 3010 ...every time. Any ideas?
Allyl Isocyanate
  • 13,306
  • 17
  • 79
  • 130
6
votes
4 answers

Mimic .htaccess or some other type of password protecting with webrick

I have a rails app that I enjoy developing on a sever much more than locally, slow computer, the problem is even though on the server the development environment is great I need a way to look at the pages I am working on live. This is pretty easy…
austinbv
  • 9,297
  • 6
  • 50
  • 82
6
votes
3 answers

How do I attach back to the WEBrick server

I started the server in detached mode (-d), how do I attach back to it so that I can kill the server).
Jason
  • 12,229
  • 20
  • 51
  • 66
6
votes
2 answers

machine stack overflow in critical region (fatal)

Trying to run-up a Rails 4 project I developed 4 years ago, and I'm maintaining since then, I've got the next error that stucks the app on start: machine stack overflow in critical region (fatal) I have no problems during this 4 years, but…
foncho
  • 111
  • 8
6
votes
2 answers

Sinatra: Undefined method bytesize for Hash

I'm creating a Sinatra app that takes an uploaded CSV file and puts its contents in a hash. When I reference this hash in my app.rb like so: hash = extract_values(path_to_filename) I keep getting this error message: undefined method `bytesize' for…
fullstackplus
  • 1,061
  • 3
  • 17
  • 31
6
votes
3 answers

Rails production mode: SSL received a record that exceeded the maximum permissible length

Hi I'm not sure if this is supposed to happen, but when I do a RAILS_ENV=production rails server in my terminal and then try to run localhost:3000 it gives me an error: Secure Connection Failed An error occurred during a connection to…
bigpotato
  • 26,262
  • 56
  • 178
  • 334
5
votes
1 answer

Advantages of using Passenger + Apache over Webrick

I want to convince my management that using Apache + passenger setup is way to go on production rather than having webrick or mongrel I have found some points from the net. It would be great help if you could add your thoughts as that will…
sameera207
  • 16,547
  • 19
  • 87
  • 152
5
votes
4 answers

Using WEBrick to serve PHP web applications

I am a PHP developer who has started learning Ruby on Rails. I love how easy it is to get up and running developing Rails applications. One of the things I love most is WEBrick. It makes it so you don't have to configure Apache and Virtual Hosts for…
Andrew
  • 227,796
  • 193
  • 515
  • 708