webrick

How to find webrick bugs in NetBeans for Ror?

Hello I'm starting my adventure with Ruby on Rails and as IDE I choose Netbeans. It has bundled server Webrick and it had worked good. But after some changes in my first application it gives me internal error 500 - but nothing shows in console. And older actions give the same result. How can I find where the problem is? I work on Ubuntu...

Is there a realtime apache/php console similar to webrick or mongrel with ruby on rails?

Is there a realtime apache/php console similar to webrick or mongrel with ruby on rails? I want to be able to monitor what the heck my server is doing. edit: but I don't want to grep the log Thanks! ...

streaming html from webrick?

Has anyone tried streaming html/text/content from webrick? I've tried assigning an IO to the response body, but webrick is waiting for the stream to be closed first. ...

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 times when this may be needed? Does anyone know what those circumstances might be? This ma...

webrick server / ie6 truncating javascript files in development mode

I'm using webrick to run my rails app in development mode. The page includes 4-5 javascript files, which are also being served by the same webrick instance. When I load the page on ie6, it appears the javascript files are getting truncated after the first few lines -- can anyone explain that? e.g. if the page contains this script tag:...

Reject Non-localhost Attempts to Access Webrick

I'm trying to block all non-localhost attempts to access a Webrick process. This is my current code def do_GET(req, res) host_name = "localhost:3344".split(":")[0] if host_name != "localhost" && host_name != "127.0.0.1" puts "Security alert, accessing through #{host_name}" return else puts "we're fine, #{...

Webrick Very Slow When Accessing Applications From Remote Desktop

I have a rails application that I'm running on my server. When I go to a remote desktop and attempt to load the application, the server takes a good 3-4 minutes to respond with a simple html page. However, when I load up the page locally on the server, the page shows up in just a second. I tried pinging the server from my remote desktop ...

Ruby Webrick HTTP Authentication

How can I do the same authentication stuff in this page using a subclass like this: class Configuration < HTTPServlet::AbstractServlet def do_GET (request, response) SOMETHING.... end end server = HTTPServer.new(:Port => 666) server.mount "/conf", Configuration trap "INT" do server.s...

Ruby code on NFS mount, using another file on same mount causes problems.

I'm working on an embedded system whoose details are explained at the end of this post. Tools are ruby on linux. I put my ruby code on a remote NAS device on network and mount it to the embedded system I'm working on using NFS v3. My project scenario is like this: there is an all-in-one auto starter which 1.mounts the nfs share, 2. star...

Why does Ruby on Rails use http://0.0.0.0:3000 instead of http://localhost:3000 ?

I am very new to Ruby on Rails so when I tried to follow the official "Getting Started" ruby on rails tutorial, I was a bit disappointed because it went wrong very quickly. Basically it said : …navigate to http://localhost:3000. You should see Rails’ default information page. But when I follow the instructions, I get => Rails 2.3...

jquery post to webrick via sinatra only works in IE

When I run my little test app in IE, the log output from webrick shows a return code of 200, and indicates it received a post request: 192.168.0.18 - - [03/Nov/2009 16:17:37] "POST /testpost HTTP/1.1" 200 512 0.0010 Quietspeed.example.com - - [03/Nov/2009:16:17:37 EST] "POST /testpost HTTP/1.1" 200 512 - -> /testpost And the page is up...

Rails applicaiton behing proxy

I'm implementing Rails alumni application with Facebook API support. One of the requirements is to post a message from the application directly to facebook wall. Everything seems to work fine, however there is one issue which I can't fix. When I'm working at the University, I got an error "No connection could be made because the target m...

Rails' script/server for a PHP project

Is there a simple HTTP server that can be run in the current PHP project path, like Rails' script/server (webrick)? ...

how to controller (start/kill) a background process (server app) in ruby

hey guys, i'm trying to set up a server for integration tests (specs actually) via ruby and can't figure out how to control the process. so, what i'm trying to do is: run a rake task for my gem that executes the integration specs the task needs to first start a server (i use webrick) and then run the specs after executing the specs i...

How do I test a crawler? ie: mock web requests

So I'm testing the individual parts of my crawler and now I've hit a stump: mocking the actual requests. I don't want to make a request every time I run a spec. Anyone ever tried starting a webrick server in the test helper? Something like myserver = SomeServerLib.start('localhost', some_port) myserver.serve_directory(a_directory_w...

How do I change Webrick server root?

Where is the “scripts/server” file that bootstraps WEBrick and tells where WEBrick should serve files from? ...

Rails running on WEBrick with HTTP authentication

How to set up HTTP authentication in a Rails application running on WEBrick? ...

How to enable SSL for a standalone Sinatra app?

I want to write a quick server app in Sinatra. It has to be self-contained (i.e. not use apache/nginx/passenger) but also has to support SSL. Is there an easy way to enable SSL support for Sinatra (using WEBRick for example)? ...

Slow SSL Connection on SSL + LDAP

Hi guys, I have installed Ruby on Rails and am using Webbrick server. My Apache Server re-routes from port 80 to port 443 to have a SSL connection and LDAP. After the LDAP Authentication, MY SSL Page loads very slowly, sometimes, it just dosent load at all, sometimes blank page instead of project home page. IF I cancell the redirect...

cant do port forwarding ro my webrick server to access it from the net!!

i am developing a facebook app and i am using for that facebooker plugin and webrick server. i have configured correctly my router to froward ports to my machine for 2 ports (80 and 3000) the apache server can be accessed from the net http://ip:80 amd the webrick server can http://ip:3000 , i dont understand why , please help me. ...