# Ruby web programming

**URL:** <https://www.ruby-forum.com/t/ruby-web-programming/176885>\
**Category:** Ruby\
**Created:** [October 7, 2009, 4:08pm UTC](https://www.ruby-forum.com/t/ruby-web-programming/176885 "2009-10-07T16:08:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![yousef\_1987](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/51bf81/32.png) [@yousef\_1987](https://www.ruby-forum.com/u/yousef_1987)\
**Post date:** [October 7, 2009, 4:08pm UTC](https://www.ruby-forum.com/t/ruby-web-programming/176885/1 "2009-10-07T16:08:01Z")

</div>

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

for example :

 // its possible to do that

---

<div class="post-metadata">

**Author:** ![yousef\_1987](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/51bf81/32.png) [@yousef\_1987](https://www.ruby-forum.com/u/yousef_1987)\
**Post date:** [October 7, 2009, 4:12pm UTC](https://www.ruby-forum.com/t/ruby-web-programming/176885/2 "2009-10-07T16:12:16Z")

</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 J. schrieb:

---

<div class="post-metadata">

**Author:** ![yousef\_1987](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/51bf81/32.png) [@yousef\_1987](https://www.ruby-forum.com/u/yousef_1987)\
**Post date:** [October 7, 2009, 7:32pm UTC](https://www.ruby-forum.com/t/ruby-web-programming/176885/3 "2009-10-07T19:32:39Z")

</div>

Yousef J. wrote:

> I am asking for , how I can call Ruby from html
> 
> for example :
> 
> // its possible to do that

Yes. You can use ruby’s cgi abilities.

---

<div class="post-metadata">

**Author:** ![yousef\_1987](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/51bf81/32.png) [@yousef\_1987](https://www.ruby-forum.com/u/yousef_1987)\
**Post date:** [October 8, 2009, 2:00am UTC](https://www.ruby-forum.com/t/ruby-web-programming/176885/4 "2009-10-08T02:00:10Z")

</div>

> 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. 🙂

---

<div class="post-metadata">

**Author:** ![yousef\_1987](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/51bf81/32.png) [@yousef\_1987](https://www.ruby-forum.com/u/yousef_1987)\
**Post date:** [October 8, 2009, 3:37am UTC](https://www.ruby-forum.com/t/ruby-web-programming/176885/5 "2009-10-08T03:37:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![yousef\_1987](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/51bf81/32.png) [@yousef\_1987](https://www.ruby-forum.com/u/yousef_1987)\
**Post date:** [October 7, 2009, 10:34pm UTC](https://www.ruby-forum.com/t/ruby-web-programming/176885/6 "2009-10-07T22:34:37Z")

</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](http://coolnamehere.com/geekery/ruby/web/cgi.html)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!

---

<div class="post-metadata">

**Author:** ![yousef\_1987](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/51bf81/32.png) [@yousef\_1987](https://www.ruby-forum.com/u/yousef_1987)\
**Post date:** [October 8, 2009, 8:36am UTC](https://www.ruby-forum.com/t/ruby-web-programming/176885/7 "2009-10-08T08:36:51Z")

</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.
