From: John Joyce Date: 2007-05-14T07:31:08+09:00 Subject: Re: Can't get basic CGI and Form submission working On May 14, 2007, at 3:35 AM, Peter Seebach wrote: > In message <3e9167458ab931a96ea7d6bac880ee7b@ruby-forum.com>, Toby > Rodwell writes: >> Thanks 's', that did the trick. I've now progressed one step to a >> new >> error message: "405 - POST Method not allowed for the URL " >> Anyone any ideas? I'm guessing either its another web server config >> issue or I'm not using 'POST' correctly ... > > Sounds like the web server isn't allowing POSTs to that directory. > Try changing the form to a GET and see whether it works; if it does, > that's the issue. > > This has fairly little to do with Ruby per se, and a lot to do with > whatever web server you're running. > > -s > True, it isn't directly a Ruby issue, but it is an issue directly related to and important when dealing with many classes from the Ruby standard library, and no small number of gems. 405 is a message like 404 Not Found. There's a whole list of them. Server error messages for http. Make sure you're using the right URI/URL. Also, your script may be trying to write inside the CGI-BIN directory. If it doesn't have permissions for that, it won't be able to do that (this is not unusual) it should be writing to some other location that is outside of executable space. A directory for read/ write only (a data store) or a database. You have to learn a bit about where your web server puts things and what the host's policies are. Some are more free about things than others, but all have individual quirks. Your account or your script may just not have permissions to execute the file. Or, the server admin doesn't allow it or isn't allowing you. You'll have to ask them.