# Ruby web programming

**URL:** <https://rubytalk.org/t/ruby-web-programming/55710>\
**Category:** ruby-talk\
**Created:** [7 October 2009 14:08 UTC](https://rubytalk.org/t/ruby-web-programming/55710 "2009-10-07T14:08:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yousef\_Jawwad](https://avatars.discourse-cdn.com/v4/letter/y/a698b9/32.png) [@Yousef\_Jawwad](https://rubytalk.org/u/Yousef_Jawwad)\
**Post date:** [7 October 2009 14:08 UTC](https://rubytalk.org/t/ruby-web-programming/55710/1 "2009-10-07T14:08:04Z")

</div>

I am asking for , how I can call Ruby from html

for example :  
\<html\>  
\<body\>  
\<form action="something.rb"\> // its possible to do that  
\</form\>

\</body\>  
\</html\>

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Bernd\_Ritter](https://avatars.discourse-cdn.com/v4/letter/b/71c47a/32.png) [@Bernd\_Ritter](https://rubytalk.org/u/Bernd_Ritter)\
**Post date:** [7 October 2009 14:11 UTC](https://rubytalk.org/t/ruby-web-programming/55710/2 "2009-10-07T14:11:34Z")

</div>

Hi Yousef,

you really might want to look at Ruby on Rails, which is a Ruby  
Web-Framework. Everything you might want to develop for ruby on the  
web, has most likly be done there already.

> **[Ruby on Rails](https://rubyonrails.org/)**
>
> A web-app framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern.

Greets,  
Bernd

Yousef Jawwad schrieb:

> **···**
>
> > I am asking for , how I can call Ruby from html
> > 
> > for example :  
> > \<html\>  
> > \<body\>  
> > \<form action="something.rb"\> // its possible to do that  
> > \</form\>
> > 
> > \</body\>  
> > \</html\>

---

<div class="post-metadata">

**Author:** ![7stud](https://avatars.discourse-cdn.com/v4/letter/7/57b2e6/32.png) [@7stud](https://rubytalk.org/u/7stud)\
**Post date:** [7 October 2009 17:32 UTC](https://rubytalk.org/t/ruby-web-programming/55710/3 "2009-10-07T17:32:41Z")

</div>

Yousef Jawwad wrote:

> I am asking for , how I can call Ruby from html
> 
> for example :  
> \<html\>  
> \<body\>  
> \<form action="something.rb"\> // its possible to do that  
> \</form\>
> 
> \</body\>  
> \</html\>

Yes. You can use ruby's cgi abilities.

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Mike\_Stephens](https://avatars.discourse-cdn.com/v4/letter/m/9d8465/32.png) [@Mike\_Stephens](https://rubytalk.org/u/Mike_Stephens)\
**Post date:** [8 October 2009 06:36 UTC](https://rubytalk.org/t/ruby-web-programming/55710/4 "2009-10-08T06:36:54Z")

</div>

You can't call Ruby from a web page. You have to use something like  
Javascript.

You can insert Ruby programs in an html file to help build it but it  
will disappear before the page gets sent.

You can get Ruby to build you web page actions but they will be in  
Javscript at the time they arrive at the browser.

Rails has classes to build Javascript.

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Thiago\_Massa](https://yyz1.discourse-cdn.com/flex029/user_avatar/rubytalk.org/thiago_massa/32/2404_2.png) [@Thiago\_Massa](https://rubytalk.org/u/Thiago_Massa)\
**Post date:** [7 October 2009 20:33 UTC](https://rubytalk.org/t/ruby-web-programming/55710/5 "2009-10-07T20:33:53Z")

</div>

[http://coolnamehere.com/geekery/ruby/web/cgi.html](http://coolnamehere.com/geekery/ruby/web/cgi.html)  
\<[http://coolnamehere.com/geekery/ruby/web/cgi.html&gt;Check](http://coolnamehere.com/geekery/ruby/web/cgi.html&gt;Check) it out, its good!

I used to do perl/cgi programming like 10 years ago for web(i was 10 years  
old :D) and spent a while doing that in ruby because of the nostalgy. It was  
the first programming language that i learned(well... i didnt even knew that  
programming existed before) and i doubt i would be reading this e-mail if i  
didnt.

But today is different, if you want to develop web apps... learn MVC and  
ruby then go straight to rails, you can develop it wayyyyyyyyyyyyyy faster!

> **···**
>
> On Wed, Oct 7, 2009 at 2:32 PM, 7stud -- \<bbxx789\_05ss@yahoo.com\> wrote:
> 
> > Yousef Jawwad wrote:  
> > \> I am asking for , how I can call Ruby from html  
> > \>  
> > \> for example :  
> > \> \<html\>  
> > \> \<body\>  
> > \> \<form action="something.rb"\> // its possible to do that  
> > \> \</form\>  
> > \>  
> > \>  
> > \> \</body\>  
> > \> \</html\>
> > 
> > Yes. You can use ruby's cgi abilities.  
> > --  
> > Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).
> 
> --  
> Thiago Fernandes Massa  
> 11 83979414

---

<div class="post-metadata">

**Author:** ![Ehsanul\_Hoque](https://avatars.discourse-cdn.com/v4/letter/e/898d66/32.png) [@Ehsanul\_Hoque](https://rubytalk.org/u/Ehsanul_Hoque)\
**Post date:** [7 October 2009 23:59 UTC](https://rubytalk.org/t/ruby-web-programming/55710/6 "2009-10-07T23:59:35Z")

</div>

> [http://coolnamehere.com/geekery/ruby/web/cgi.html](http://coolnamehere.com/geekery/ruby/web/cgi.html)  
> \<[http://coolnamehere.com/geekery/ruby/web/cgi.html&gt;Check](http://coolnamehere.com/geekery/ruby/web/cgi.html&gt;Check) it out, its good!
> 
> I used to do perl/cgi programming like 10 years ago for web(i was 10 years  
> old :D) and spent a while doing that in ruby because of the nostalgy. It was  
> the first programming language that i learned(well... i didnt even knew that  
> programming existed before) and i doubt i would be reading this e-mail if i  
> didnt.
> 
> But today is different, if you want to develop web apps... learn MVC and  
> ruby then go straight to rails, you can develop it wayyyyyyyyyyyyyy faster!

If someone knows some programming, especially if it's ruby or a similar language, it might be a better idea to go with Sinatra. Easier to start up with, as you don't need to learn all the conventions and everything, though you probably need to learn how to use a few libraries, which isn't a big deal. In my opinion, it's a better platform overall too, but that's just my personal opinion. Whatever floats your boat. 🙂

> **···**
>
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> Hotmail: Free, trusted and rich email service.  
> [http://clk.atdmt.com/GBL/go/171222984/direct/01/](http://clk.atdmt.com/GBL/go/171222984/direct/01/)

---

<div class="post-metadata">

**Author:** ![Thiago\_Massa](https://yyz1.discourse-cdn.com/flex029/user_avatar/rubytalk.org/thiago_massa/32/2404_2.png) [@Thiago\_Massa](https://rubytalk.org/u/Thiago_Massa)\
**Post date:** [8 October 2009 01:30 UTC](https://rubytalk.org/t/ruby-web-programming/55710/7 "2009-10-08T01:30:52Z")

</div>

Well, rails productivity is really good. Sinatra looks good if you want to  
start fast and dont have much background 🙂

> **···**
>
> On Wed, Oct 7, 2009 at 8:59 PM, Ehsanul Hoque \<ehsanul\_g3@hotmail.com\>wrote:
> 
> > \> [http://coolnamehere.com/geekery/ruby/web/cgi.html](http://coolnamehere.com/geekery/ruby/web/cgi.html)  
> > \> \<[http://coolnamehere.com/geekery/ruby/web/cgi.html&gt;Check](http://coolnamehere.com/geekery/ruby/web/cgi.html&gt;Check) it out, its  
> > good!  
> > \>  
> > \> I used to do perl/cgi programming like 10 years ago for web(i was 10  
> > years  
> > \> old :D) and spent a while doing that in ruby because of the nostalgy. It  
> > was  
> > \> the first programming language that i learned(well... i didnt even knew  
> > that  
> > \> programming existed before) and i doubt i would be reading this e-mail if  
> > i  
> > \> didnt.  
> > \>  
> > \> But today is different, if you want to develop web apps... learn MVC and  
> > \> ruby then go straight to rails, you can develop it wayyyyyyyyyyyyyy  
> > faster!  
> > \>
> > 
> > If someone knows some programming, especially if it's ruby or a similar  
> > language, it might be a better idea to go with Sinatra. Easier to start up  
> > with, as you don't need to learn all the conventions and everything, though  
> > you probably need to learn how to use a few libraries, which isn't a big  
> > deal. In my opinion, it's a better platform overall too, but that's just my  
> > personal opinion. Whatever floats your boat. 🙂
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > Hotmail: Free, trusted and rich email service.  
> > [http://clk.atdmt.com/GBL/go/171222984/direct/01/](http://clk.atdmt.com/GBL/go/171222984/direct/01/)
> 
> --  
> Thiago Fernandes Massa  
> 11 83979414
