News:

Click here for Toll-Free Service for your business starting at $2.00 per month

Main Menu

RUBY Questions

Started by sixthcrusifix, November 17, 2005, 03:36:05 AM

Previous topic - Next topic

sixthcrusifix

 I Know how to use RUBY (Basic KNowledge anyway) because I've used it in othe rapplications like RMXP.

BUT

How would I do it? I have the same problem with pearl.

How do I make the page know that I'm writing something in RUBY? It's not like PHP wheer you just do <?php is it? I've neve rused it for the web before but I'd like to. I'm just confused.
Visite me website at http://www.sixthcrusifix.com

Ben

I believe your whole file must be written in Ruby to use it. Same with Perl.

Quote#!/usr/bin/ruby
That should be used to start a ruby file

Quote#!/usr/bin/perl
and that starts a perl file.

Both Ruby and Perl files must be chmod to at least 755 to execute!
--Ben
Ben@freepgs.com

admin

If you wish to have ruby parse part of an HTML document, please use the .rhtml extension

Then use

<%

%>

tags around your ruby content.

#!/usr/bin/eruby should be used if parsing a file that contains ruby code (as well as other code such as HTML)
Alternatively, you can select "mod_ruby" from the Options panel (no shebang line is needed in this case)

Thank you,
FreePgs.com Admin

sixthcrusifix

#3
Quote from: admin on November 17, 2005, 07:23:03 PM
If you wish to have ruby parse part of an HTML document, please use the .rhtml extension

Then use

<%

%>

tags around your ruby content.

#!/usr/bin/eruby should be used if parsing a file that contains ruby code (as well as other code such as HTML)
Alternatively, you can select "mod_ruby" from the Options panel (no shebang line is needed in this case)

Thank you,
FreePgs.com Admin


Okay, But when I use rhtml it won't let me edit the file. Am I going to have to make the file on my computer and then upload it? It might be hard to test and edit. . .


It also just shows up as a bunch of text. . . is it because I have it set to "Direct/CGI" ???

NVM I got it to work, that WAS the problem. The only crappy thing is I can't edit it online I'll have to use FTP so I can edit it from the computer and upload it.
Visite me website at http://www.sixthcrusifix.com

admin

#4
I have added "rhtml" to the list of editable file types in the "Online File Manager"

You should also be able to modify files via the "Online FTP File Manager"

Thank you,
FreePgs.com Admin

sixthcrusifix

Quote from: admin on November 23, 2005, 08:36:59 AM
I have added "rhtml" to the list of editable file types in the "Online File Manager"

You should also be able to modify files via the "Online FTP File Manager"

Thank you,
FreePgs.com Admin


Coolness. thanks.
Visite me website at http://www.sixthcrusifix.com