Ok .. if you are sensitive ... stop reading. I am totally new to setting up CGI. I am getting a routing error. Would someone be kind enough to help me? Please? Here is my form ... <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <meta name="generator" content="Adobe GoLive" /> <title>Form | Contact A</title> </head> <body bgcolor="#ffffff"> <form action="cgi-bin/parse.rb" method="post" #I have tried get enctype="application/x-www-form-urlencoded"> #I have tried text/plain <table width="455" border="0" cellspacing="0" cellpadding="5"> <tr height="33"> <from stuff deleted> I put this in the public folder of a rails WEBrick app. Here is my Ruby CGI ... ################################################### #!/opt/local/bin/ruby -w text = "dog" print "Content-type: text/html\r\n\r\n" print "<HTML><BODY>" print "<B><I>Hello</I>, #{ text} !</B>" print "</BODY></HTML>" ################################################## I put this in cgi-bin directory in the same dir as the forms.html file. Permissions on the Ruby script where set to 775. My intention is not to handle any input from the forms.html file but just to get back a simple ""Hello dog" after the submit. here is what i get when i run WEBrick and hit the Submit button ... Routing Error Recognition failed for "cgi-bin/parse.rb" Can anyone help me. I am not sure if this is a problem with my code, WEBrick of the form. Thanks and don''t be shy .. i have a thick skin. john
Anybody ... please ... On Thursday 02 March 2006 09:05, John N. Alegre wrote:> Ok .. if you are sensitive ... stop reading. > > I am totally new to setting up CGI. I am getting a routing error. > Would someone be kind enough to help me? Please? > > Here is my form ... > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > > <html xmlns="http://www.w3.org/1999/xhtml"> > > <head> > <meta http-equiv="content-type" content="text/html;charset=utf-8" > /> <meta name="generator" content="Adobe GoLive" /> > <title>Form | Contact A</title> > </head> > > <body bgcolor="#ffffff"> > > <form action="cgi-bin/parse.rb" method="post" #I have tried get > enctype="application/x-www-form-urlencoded"> #I have tried > text/plain > > <table width="455" border="0" cellspacing="0" > cellpadding="5"> <tr height="33"> > <from stuff deleted> > > I put this in the public folder of a rails WEBrick app. > > Here is my Ruby CGI ... > > ################################################### > #!/opt/local/bin/ruby -w > > text = "dog" > print "Content-type: text/html\r\n\r\n" > print "<HTML><BODY>" > print "<B><I>Hello</I>, #{ text} !</B>" > print "</BODY></HTML>" > ################################################## > I put this in cgi-bin directory in the same dir as the forms.html > file. Permissions on the Ruby script where set to 775. My > intention is not to handle any input from the forms.html file but > just to get back a simple ""Hello dog" after the submit. > > here is what i get when i run WEBrick and hit the Submit button ... > > Routing Error > > Recognition failed for "cgi-bin/parse.rb" > > Can anyone help me. I am not sure if this is a problem with my > code, WEBrick of the form. > > Thanks and don''t be shy .. i have a thick skin. > > john > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Um, all this stuff has nothing to do with Ruby on Rails really. If I understand correctly you''re trying to submit a http post to a Ruby CGI script. But, that''s not how rails works, or at least I haven''t seen or read about anyone doing that. Are you just trying to test CGI? But even if that''s the intent, I don''t think what you''re doing is even close to how rails uses CGI. Maybe say what it is you''re trying to accomplish and we can try to help. b John N. Alegre wrote:> Anybody ... please ... > On Thursday 02 March 2006 09:05, John N. Alegre wrote: > >>Ok .. if you are sensitive ... stop reading. >> >>I am totally new to setting up CGI. I am getting a routing error. >>Would someone be kind enough to help me? Please? >> >>Here is my form ... >> >><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" >>"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> >> >><html xmlns="http://www.w3.org/1999/xhtml"> >> >><head> >> <meta http-equiv="content-type" content="text/html;charset=utf-8" >>/> <meta name="generator" content="Adobe GoLive" /> >> <title>Form | Contact A</title> >></head> >> >><body bgcolor="#ffffff"> >> >> <form action="cgi-bin/parse.rb" method="post" #I have tried get >>enctype="application/x-www-form-urlencoded"> #I have tried >>text/plain >> >><table width="455" border="0" cellspacing="0" >>cellpadding="5"> <tr height="33"> >><from stuff deleted> >> >>I put this in the public folder of a rails WEBrick app. >> >>Here is my Ruby CGI ... >> >>################################################### >>#!/opt/local/bin/ruby -w >> >>text = "dog" >>print "Content-type: text/html\r\n\r\n" >>print "<HTML><BODY>" >>print "<B><I>Hello</I>, #{ text} !</B>" >>print "</BODY></HTML>" >>################################################## >>I put this in cgi-bin directory in the same dir as the forms.html >>file. Permissions on the Ruby script where set to 775. My >>intention is not to handle any input from the forms.html file but >>just to get back a simple ""Hello dog" after the submit. >> >>here is what i get when i run WEBrick and hit the Submit button ... >> >>Routing Error >> >>Recognition failed for "cgi-bin/parse.rb" >> >>Can anyone help me. I am not sure if this is a problem with my >>code, WEBrick of the form. >> >>Thanks and don''t be shy .. i have a thick skin. >> >>john >> >>_______________________________________________ >>Rails mailing list >>Rails@lists.rubyonrails.org >>http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails