Basic Ruby Question

jasgor9

New Member
Messages
40
Reaction score
0
Points
0
I am learning Ruby and can't figure out this: does ruby have opening/closing tags like PHP (<?php ?>) and ASP (<% %>) ? I tried making a Ruby page with this code:

HTML:
puts "Hello, World"

...but when i viewed the page it just said 'puts "Hello World"' If there aren't tags, then how can i fix this?
 

konekt

New Member
Messages
100
Reaction score
0
Points
0
You should not need anything supplemental to code Ruby. I would make sure it is properly installed on the server.
 

cybergig

New Member
Messages
28
Reaction score
0
Points
0
From what I am told you need absolute server, which is an adfree server.
 

phazzedout

New Member
Messages
230
Reaction score
3
Points
0
Code:
puts "Hello World!"

You do not need any code to close it. Also in order to view it on a web browser you need to configure Ruby on Rails & Ruby Gems not just regular Ruby. I do not think x10hosting has Ruby on Rails or Ruby Gems. I know a couple of hosts, that are not as good as this one but do have Ruby on Rails.
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
Though Ruby on Rails isn't available, you should be able to run ruby scripts as CGI scripts on X10. Put them in ~/public_html/cgi-bin and set execute permissions via your FTP client or cPanel. Make sure to include a shebang line with the path to the ruby interpreter. Search the web or these forums for more info.

However, if you want to learn Ruby, you should install an interpreter on your own computer to play with. You don't want to learn Ruby and CGI scripting simultaneously.
 
Last edited:
Top