# POST/GET from sql database

**URL:** <https://www.ruby-forum.com/t/post-get-from-sql-database/91124>\
**Category:** Ruby\
**Created:** [April 4, 2007, 10:44pm UTC](https://www.ruby-forum.com/t/post-get-from-sql-database/91124 "2007-04-04T22:44:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Josh\_Redding](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/50afbb/32.png) [@Josh\_Redding](https://www.ruby-forum.com/u/Josh_Redding)\
**Post date:** [April 4, 2007, 10:44pm UTC](https://www.ruby-forum.com/t/post-get-from-sql-database/91124/1 "2007-04-04T22:44:10Z")

</div>

I’ve been googling for hours now…and can’t seem to find much on the  
subject.

I’m new to Ruby…slowly picking it up as I go along. I wanted to write  
something I could put to use right now…a simple ruby-embedded html  
page  
that would save form data in to a sql database. I know this is  
ridiculously  
easy to do with rails…but I don’t want to do it with rails. I’m  
semi-familiar with simple queries to a db using ruby…but can’t seem to  
find much info on the rest…any ideas where I can find info for such a  
thing? I’ve combed through the 2nd-edition of the Pickaxe too…  
_sighs in  
frustration_

---

<div class="post-metadata">

**Author:** ![Josh\_Redding](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/50afbb/32.png) [@Josh\_Redding](https://www.ruby-forum.com/u/Josh_Redding)\
**Post date:** [April 4, 2007, 11:36pm UTC](https://www.ruby-forum.com/t/post-get-from-sql-database/91124/2 "2007-04-04T23:36:16Z")

</div>

Sorry, but you seem to be going the completely wrong direction.  
Communication with a database, and display HTML, are two completely  
different subsystems of a website.

You should first start with searches on Web programming and learning how  
the  
web works and how to create web-sites in general.

In terms of a Ruby (not Rails) website, go get WEBrick (  
[http://www.webrick.org/](http://www.webrick.org/)), run through it’s documentation and tutorials.

Jason

---

<div class="post-metadata">

**Author:** ![Josh\_Redding](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/50afbb/32.png) [@Josh\_Redding](https://www.ruby-forum.com/u/Josh_Redding)\
**Post date:** [April 5, 2007, 7:30am UTC](https://www.ruby-forum.com/t/post-get-from-sql-database/91124/3 "2007-04-05T07:30:00Z")

</div>

On Thu, Apr 05, 2007 at 05:42:38AM +0900, Josh Redding wrote:

> I’m new to Ruby…slowly picking it up as I go along. I wanted to write  
> something I could put to use right now…a simple ruby-embedded html page  
> that would save form data in to a sql database. I know this is ridiculously  
> easy to do with rails…but I don’t want to do it with rails. I’m  
> semi-familiar with simple queries to a db using ruby…but can’t seem to  
> find much info on the rest…any ideas where I can find info for such a  
> thing? I’ve combed through the 2nd-edition of the Pickaxe too… _sighs in  
> frustration_

There’s an entire chapter in the Pickaxe called “Ruby and the web”:  
[http://www.rubycentral.com/book/web.html](http://www.rubycentral.com/book/web.html)

Start with the hello world CGI. Then extend it to use form variables.  
Then  
extend it to perform a database query.

HTH,

Brian.
