# Converting a website to ruby

**URL:** <https://www.ruby-forum.com/t/converting-a-website-to-ruby/192791>\
**Category:** Ruby\
**Created:** [August 5, 2010, 4:34pm UTC](https://www.ruby-forum.com/t/converting-a-website-to-ruby/192791 "2010-08-05T16:34:49Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaspir](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/3ab097/32.png) [@kaspir](https://www.ruby-forum.com/u/kaspir)\
**Post date:** [August 5, 2010, 4:34pm UTC](https://www.ruby-forum.com/t/converting-a-website-to-ruby/192791/1 "2010-08-05T16:34:49Z")

</div>

I’m pretty new to ruby, and I’ve been grasping everything that I’ve read  
pretty well. Now I want to convert my website to ruby (not rails yet) so  
I can use ruby to create forms with the cgi library. My web hosting  
doesn’t allow ruby to run with any other markup or scripting, so when I  
turn ruby on I need to have my site already coded in ruby and ready to  
go.

Considering that I’m new at this, I’m kind of lost. Yes I have searched  
google, and the forums already. There’s information but it’s  
overwhelming because it’s so much new information. What I really want is  
just some guided direction. I’m not asking for people to write tutorials  
for me or anything, although I wouldn’t mind some links to good  
tutorials for this purpose specifically. I just want some quick  
information like, what exactly should I study.

Also, I use HTML5 and CSS 3. I noticed that with cgi you cannot use  
HTML5. Does that mean you can’t use HTML5 in any ruby code? What about  
CSS 3?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![kaspir](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/3ab097/32.png) [@kaspir](https://www.ruby-forum.com/u/kaspir)\
**Post date:** [August 5, 2010, 5:10pm UTC](https://www.ruby-forum.com/t/converting-a-website-to-ruby/192791/2 "2010-08-05T17:10:47Z")

</div>

Kaspir G. wrote:

> I’m pretty new to ruby, and I’ve been grasping everything that I’ve read  
> pretty well. Now I want to convert my website to ruby (not rails yet) so  
> I can use ruby to create forms with the cgi library. My web hosting  
> doesn’t allow ruby to run with any other markup or scripting, so when I  
> turn ruby on I need to have my site already coded in ruby and ready to  
> go.

Maybe use ruby CGI?

[http://ruby-doc.org/stdlib/libdoc/cgi/rdoc/index.html](http://ruby-doc.org/stdlib/libdoc/cgi/rdoc/index.html)

---

<div class="post-metadata">

**Author:** ![kaspir](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/3ab097/32.png) [@kaspir](https://www.ruby-forum.com/u/kaspir)\
**Post date:** [August 5, 2010, 6:14pm UTC](https://www.ruby-forum.com/t/converting-a-website-to-ruby/192791/3 "2010-08-05T18:14:14Z")

</div>

On Thu, Aug 5, 2010 at 7:34 AM, Kaspir G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> ```
> Now I want to convert my website to ruby (not rails yet) so
> 
> ```
> 
> I can use ruby to create forms with the cgi library.

CGI? Archaic and pointless, IMO – if not Rails, there are other light  
weight “frameworks” like Sinatra, Camping, Merb, etc. that you could  
use instead.

> My web hosting  
> doesn’t allow ruby to run with any other markup or scripting

That makes virtually no sense at all, but whatever…

> Considering that I’m new at this, I’m kind of lost. Yes I have searched  
> google, and the forums already. There’s information but it’s  
> overwhelming because it’s so much new information.

Yep. Dive in and write a ‘hello world’ then, in CGI, Sinatra or whatever  
you choose.

> Also, I use HTML5 and CSS 3. I noticed that with cgi you cannot use  
> HTML5.

Where in the world would you get such an idea?

---

<div class="post-metadata">

**Author:** ![kaspir](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/3ab097/32.png) [@kaspir](https://www.ruby-forum.com/u/kaspir)\
**Post date:** [August 5, 2010, 6:56pm UTC](https://www.ruby-forum.com/t/converting-a-website-to-ruby/192791/4 "2010-08-05T18:56:54Z")

</div>

Your post was a little unclear. Are you trying to suggest I should use  
IMO instead of CGI? I’ll look into those other frameworks too thanks.

Hassan S. wrote:

> That makes virtually no sense at all, but whatever…

When I enable ruby on my hosting account, it ONLY works for ruby. It  
won’t display html.

Hassan S. wrote:

> Yep. Dive in and write a ‘hello world’ then, in CGI, Sinatra or whatever  
> you choose.

I will do just that. I planned on it, I just wasn’t sure if I was  
heading in the right direction.

Hassan S. wrote:

> Where in the world would you get such an idea?

Because it’s lighter, has more features, and is the latest in stylesheet  
and mark up…

---

<div class="post-metadata">

**Author:** ![kaspir](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/3ab097/32.png) [@kaspir](https://www.ruby-forum.com/u/kaspir)\
**Post date:** [August 5, 2010, 7:19pm UTC](https://www.ruby-forum.com/t/converting-a-website-to-ruby/192791/5 "2010-08-05T19:19:16Z")

</div>

On Thu, Aug 5, 2010 at 9:59 AM, Kaspir G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Your post was a little unclear. Are you trying to suggest I should use  
> IMO instead of CGI? I’ll look into those other frameworks too thanks.

IMO = “In My Opinion”

But I’d suggest you use anything but CGI.

> Hassan S. wrote:
> 
> > That makes virtually no sense at all, but whatever…
> 
> When I enable ruby on my hosting account, it ONLY works for ruby. It  
> won’t display html.

That’s ridiculous. Find a real hosting company.

> > Where in the world would you get such an idea?
> 
> Because it’s lighter, has more features, and is the latest in stylesheet  
> and mark up…

I meant, where in the world would you get the idea that “with cgi you  
cannot use HTML5.”

---

<div class="post-metadata">

**Author:** ![kaspir](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/3ab097/32.png) [@kaspir](https://www.ruby-forum.com/u/kaspir)\
**Post date:** [August 6, 2010, 6:18am UTC](https://www.ruby-forum.com/t/converting-a-website-to-ruby/192791/6 "2010-08-06T06:18:26Z")

</div>

On Thu, Aug 5, 2010 at 7:46 PM, Kaspir G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> > But I’d suggest you use anything but CGI.
> 
> Well What exactly would you suggest then.

See previous “light weight framework” comment.

> > I meant, where in the world would you get the idea that “with cgi you  
> > cannot use HTML5.”
> 
> Because I was reading about escaping HTML with .cgi and it didn’t say  
> you could use HTML5. Only 3 and several versions of 4.

"Only 3 and "… Wow. URL? That would have to be from

“When Webosaurs Walked the Earth”

Seriously, check the dates on your sources. I’d take anything more  
than a couple of years old with a grain of salt 🙂

---

<div class="post-metadata">

**Author:** ![kaspir](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/3ab097/32.png) [@kaspir](https://www.ruby-forum.com/u/kaspir)\
**Post date:** [August 6, 2010, 4:46am UTC](https://www.ruby-forum.com/t/converting-a-website-to-ruby/192791/7 "2010-08-06T04:46:04Z")

</div>

> IMO = “In My Opinion”
> 
> But I’d suggest you use anything but CGI.

Well What exactly would you suggest then.

> I meant, where in the world would you get the idea that “with cgi you  
> cannot use HTML5.”

Because I was reading about escaping HTML with .cgi and it didn’t say  
you could use HTML5. Only 3 and several versions of 4.

---

<div class="post-metadata">

**Author:** ![kaspir](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/3ab097/32.png) [@kaspir](https://www.ruby-forum.com/u/kaspir)\
**Post date:** [August 6, 2010, 1:26pm UTC](https://www.ruby-forum.com/t/converting-a-website-to-ruby/192791/8 "2010-08-06T13:26:16Z")

</div>

> > > But I’d suggest you use anything but CGI.
> > 
> > Well What exactly would you suggest then.
> 
> See previous “light weight framework” comment.

Ok thank you.

> > > I meant, where in the world would you get the idea that “with cgi you  
> > > cannot use HTML5.”
> > 
> > Because I was reading about escaping HTML with .cgi and it didn’t say  
> > you could use HTML5. Only 3 and several versions of 4.
> 
> "Only 3 and "… Wow. URL? That would have to be from
> 
> “When Webosaurs Walked the Earth”
> 
> Seriously, check the dates on your sources. I’d take anything more  
> than a couple of years old with a grain of salt 🙂

I didn’t even think about checking the date for some odd reason haha. I  
think it was in one of my books, but they’re ebooks so it’s very  
possible they’re outdated. You’ve cleared a lot up for me. Thanks!
