webrick

How do I import Microsoft Visual Foxpro tables into Microsoft Access 2007?

From what I understand, I can no longer use ODBC to connect to Visual Foxpro 9 tables in Microsoft Access 2007. I see that I need to connect using OLE DB. I downloaded the Visual Foxpro provider, but I haven't found the instructions to complete my link or import from within Access. Does anyone have an answer? ...

Webrick transparent proxy

Hi there, I've a absolute simple proxy running. require 'webrick' require 'webrick/httpproxy' s = WEBrick::HTTPProxyServer.new(:Port => 8080, :RequestCallback => Proc.new{|req,res| puts req.request_line, req.raw_header}) # Shutdown functionality trap("INT"){s.shutdown} # run the beast s.start This should in my mind not influ...

How to set access-control-allow-origin in webrick under rails?

I have written a small rails app to serve up content to another site via xmlhttprequests that will be operating from another domain (it will not be possible to get them running on the same server). I understand I will need to set access-control-allow-origin on my rails server to allow the requesting web page to access this material. It ...

how to write query string for webrick?

Hi, My rails application requires few values to be specified in the text box. My web page contains few text boxes .How can i specify the values of these text boxes in the url as query string while using webrick?can any one help, am new to this. Thanks in advance. ...

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 the .rhtml file. (Note that I'm not using the rails framework, only webrick + .rhtml fil...

No such file to load, Model/Lib naming conflict?

I'm working on a Rails application. I have a Module called Animals. Inside this Module is a Class with the same name as one of my Models (Dog). show_animal action: def show_animal require 'Animals/Bear.rb' #Works require 'Animals/Dog.rb' #Fails end So the first require definitely works, the seconds fails. MissingSourceFile (no s...

Ajax Request using jQuery in Rails

Hi... I am sending an Ajax Request using jQuery. What happens is that I am getting an "405 Method Not Allowed" Error. I am just posting a form, which would get the detail from the form and insert it into the DB. Just the usual stuff.I am using WEBrick that comes as default with the rails package. Can somebody please tell me how to fix th...

amazon simpledb with aws-sdb-proxy suitable for high traffic production app?

i am using amazon simpledb with the aws_sdb gem and aws-sdb proxy as outlined in a documentation from amazon with ruby on rails and a local aws proxy that runs on webrick (providing a bridge with ActiveResource). see http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1242 i am wondering if the aws-sdb-proxy (webrick!)...

Ruby/JRuby and WEBrick serving requests one at a time

Does anyone knows how to force WEBrick to process more than one request at a time? I'm using some Ajax on my page for long running database-related tasks and I can clearly see the requests are being processed in a pipeline. ...

getting a 500 server error when bring up a page in rails

So I am getting a 500 server error when attempting to bring up a rhtml page in rails. When I start the WEBrick server, I get the welcome to rails homepage. The name of the app is hello. I generated the controller from the command line and it looks like class HelloController < ApplicationController def there end end I have my view (t...

Is there anything like request_uri from ActionController::Request in Rails for Rack?

I wrote a rack middleware for my rails that that does something based on the if the REQUEST_URI equals specific string. However what I quickly found out was in my development environment, which is using WEBrick, is the server puts in the full url for the REQUEST_URI. On my production environment, which is on Heroku, it behaves like exp...

Problem with a frozen webrick

Hi fellows, I have a problem with a rails app, an intranet that i am developing for my company. The problem is really weird, because i'm trying to reproduce it and i couldn't do it. The app works without problems in my notebook, on linux with mysql, but in the dev server that we use (which also uses linux and mysql) it hangs up after th...

Running Webrick server in background?

MBPro:shovell myname$ ruby script/server => Booting WEBrick => Rails 2.3.8 application starting on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server [2010-08-01 15:28:35] INFO WEBrick 1.3.1 [2010-08-01 15:28:35] INFO ruby 1.9.1 (2010-07-02) [i386-darwin10.4.0] [2010-08-01 15:28:35] INFO WEBrick::HTTPServer#sta...

Serving up files with Rails... I want access control but don't want to hog the rails process

I'm currently using send_data File.new(filename, 'rb').read, :type => content_type, :disposition => 'inline' To serve up uploaded files, which are stored outside the public directory. Of course, I don't want files to be globally accessible, so I'm not sure I want to bypass Rails in the usual way by putting the file into public. I woul...

Ruby on Rails: odd stylesheet issue

When I open up a page that's using my CSS it will work once, but won't work again until you open up the CSS and re-save it. Every other time I try to directly access my CSS, it works fine. But the other times, it doesn't work and I receive this server output: [2010-08-01 12:49:37] ERROR NoMethodError: private method `gsub!' called for #...

Webrick Fails to Run as Daemon, no Error Message

Running Ubuntu Server 10.04 with Rails 2.3.4 and Webrick 1.3.1; our rails app runs fine when called via script/server -e production, but trying to test it as a daemon by calling it with the -d flag produces the following output: => Booting WEBrick => Rails 2.3.4 application starting on http://0.0.0.0:3000 Nothing is produced in the lo...

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 rare it ever ran local but if I had to would it be best to go ahead and install apache or ha...

Should stopping Webrick also kill the ruby process?

I'm running a rails app with webrick. When I stop the server with Cntrl-C, I still then have to quit and restart Terminal before I can restart the server b/c the Ruby process is still running. Is there a way to get around this? I get: [2010-08-29 00:00:27] INFO WEBrick 1.3.1 [2010-08-29 00:00:27] INFO ruby 1.9.2 (2010-08-18) [x86_64-d...

How do you configure WEBrick to use SSL in Rails 3?

Prior to Rails 3, you could modify the script/server file to add in SSL parameters and tell the server command to use the HTTPS version of webrick, now that all of those scripts are gone, does anyone know how to get this to work? ...

Why would running a Rails app as a WEBrick server work, but installing it as a Mongrel service would not?

Yet another newbie RoR question from me. I started banging my head against a wall last night when I simply could not get my Rails app to display in my browser after installing it as a Mongrel service. I installed it using a command like this (from the app's root directory): mongrel_rails service::install -N MyAppName -e development -...