Ruby Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesRuby Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 15th, 2010, 01:51 PM
atlas.bill atlas.bill is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2010
Posts: 3 atlas.bill User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 32 m 56 sec
Reputation Power: 0
Google doesn't have all the answers...

Well I think I looked every where and this is as close as I have been able to get.

I learned about Ruby and tried it out in an online LIVE tutorial, and absolutely love it.

Here's the thing. I am not a fan of Rails. So the big question is, can Ruby be used as easily as PHP? What I mean by this, is that I can easily create a development environment by downloading XAMPP onto a Windows machine and begin developing.

I have yet to find a way to create we apps/pages using Ruby in this way.

As a side note, I am not a fan of CakePHP either. Perhaps it's just the implementation of the MVC design pattern they use that does suit me.

Any insight would be helpful.

Thanks

Reply With Quote
  #2  
Old March 16th, 2010, 09:35 AM
L7Sqr L7Sqr is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2004
Location: Constant Limbo
Posts: 989 L7Sqr User rank is Major (30000 - 40000 Reputation Level)L7Sqr User rank is Major (30000 - 40000 Reputation Level)L7Sqr User rank is Major (30000 - 40000 Reputation Level)L7Sqr User rank is Major (30000 - 40000 Reputation Level)L7Sqr User rank is Major (30000 - 40000 Reputation Level)L7Sqr User rank is Major (30000 - 40000 Reputation Level)L7Sqr User rank is Major (30000 - 40000 Reputation Level)L7Sqr User rank is Major (30000 - 40000 Reputation Level)L7Sqr User rank is Major (30000 - 40000 Reputation Level)L7Sqr User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 2 Weeks 2 Days 22 h 45 m 6 sec
Reputation Power: 362
Send a message via AIM to L7Sqr
You can get ruby for apache here. You will have to look at how to get that working with XAMPP as I am unfamiliar with how XAMPP works.

Then you can either use rails, which it sounds like you are against, or you can use straight Ruby.

There are two ways to use ruby in a web page: you can have a executable that generates the html as its output, or you can use Ruby's built-in templating system (ERB) to have ruby code execute in-line with html much as you would do with PHP.

There is overhead for the ERB approach in that you have to get apache to be ERB-aware (searches should include RHTML). Again, I have no XAMPP experience so you will have to revert to google - but a focused search should turn something up reasonably soon.
__________________
True happiness is not getting what you want, it's wanting what you've already got.

My Blog

Reply With Quote
  #3  
Old March 16th, 2010, 09:48 AM
atlas.bill atlas.bill is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2010
Posts: 3 atlas.bill User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 32 m 56 sec
Reputation Power: 0
Drupalize my Ruby

Thanks L7Sqr!

I had found that, but it says the project is discontinued, and to use "INSTANTRAILS". As you can see by the name, it infers the usage of rails.

Perhaps I am approaching this wrong.

Perhaps i should be asking for good reference materials that explain how, when and where ruby executes. Books, blogs and/or articles that give some deep understanding of how ruby works.

Not interested in coding "how-to's", but basically the stack and execution of code on Apache etc.

Why?

I happen to be a champion (relatively speaking) of the Drupal model versus the Rails (CakePHP) model. So I am interested in understanding the inner workings of Ruby to begin efforts in building a "Hook" system for Ruby.

I have seen some conversations which support this concept, but none of them discuss the environment necessary or the mechanics which allow for someone to begin.

I hope that is as clear as mud.

Thanks for the info on the executable, rhtml and the ERB.

Bill

Reply With Quote
  #4  
Old March 16th, 2010, 09:41 PM
L7Sqr L7Sqr is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2004
Location: Constant Limbo
Posts: 989 L7Sqr User rank is Major (30000 - 40000 Reputation Level)L7Sqr User rank is Major (30000 - 40000 Reputation Level)L7Sqr User rank is Major (30000 - 40000 Reputation Level)L7Sqr User rank is Major (30000 - 40000 Reputation Level)L7Sqr User rank is Major (30000 - 40000 Reputation Level)L7Sqr User rank is Major (30000 - 40000 Reputation Level)L7Sqr User rank is Major (30000 - 40000 Reputation Level)L7Sqr User rank is Major (30000 - 40000 Reputation Level)L7Sqr User rank is Major (30000 - 40000 Reputation Level)L7Sqr User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 2 Weeks 2 Days 22 h 45 m 6 sec
Reputation Power: 362
Send a message via AIM to L7Sqr
This may be entirely unhelpful to you, but I have the following setup at home. I say that it may be unhelpful since it is a linux system using apache2 - maybe some of this will translate.

In /etc/apache2/ there are several directories.
Code:
$ pwd 
/etc/apache2/
$ ls -l
-rw-r--r-- 1 root root 10250 2010-02-10 11:38 apache2.conf
drwxr-xr-x 2 root root  1024 2010-02-10 11:45 conf.d
-rw-r--r-- 1 root root   378 2009-11-14 16:01 envvars
-rw-r--r-- 1 root root     0 2010-02-05 20:55 httpd.conf
drwxr-xr-x 2 root root  5120 2010-03-02 21:32 mods-available
drwxr-xr-x 2 root root  1024 2010-02-11 14:10 mods-enabled
-rw-r--r-- 1 root root   513 2009-11-14 16:01 ports.conf
drwxr-xr-x 2 root root  1024 2010-02-11 13:07 sites-available
drwxr-xr-x 2 root root  1024 2010-02-05 20:55 sites-enabled

In mods-enabled I have the following
Code:
$ ls mods-enabled
...
ruby.load
...
$ cat mods-enabled/ruby.load
LoadModule ruby_module /usr/lib/apache2/modules/mod_ruby.so


So I have mod_ruby (much like how mod_php works) which allows for ruby files to be executed. To enable rhtml (erb) I would need to add a ruby.conf that detailed how to handle files that end in .rhtml.

Like I said, I know nothing about windows so you may find that none of what I said helps. Hopefully that is not entirely true.

Reply With Quote
  #5  
Old March 17th, 2010, 09:07 AM
atlas.bill atlas.bill is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2010
Posts: 3 atlas.bill User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 32 m 56 sec
Reputation Power: 0
Lost in translation

Thanks L7Sqr!

I think I can make the translation from Linux to Windows, as I know just enough about both to be dangerous...


Thanks for the help!
Bill

Reply With Quote
  #6  
Old March 29th, 2010, 11:47 AM
JemsRoker's Avatar
JemsRoker JemsRoker is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2010
Location: Bangle of India
Posts: 52 JemsRoker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 h 1 m 15 sec
Reputation Power: 4
Hi, I am not a PHP or Java programmer and so it is not easy for me to comment in concretely, I have have simple idea about Ruby, among other things, is how expressive it is -- expressive in the technical sense that a small amount of code can do a great deal. In my experience, the more you work on a Ruby program, the more code disappears from the screen. Moreover, as the code gets smaller, it gets clearer, not more cryptic. Ruby is the only language a system like Rails could be written in. So it is very useful to me.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesRuby Programming > Google doesn't have all the answers...

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap