View Full Version : What is Ruby on Rails ?
JCsDesignz
02-13-2006, 03:16 PM
Ive just been reading Matt Heatons Blog and just wandered what it was.
Edit:
Ok ive found that Ruby on Rails is an open source web application framework but im none the wiser so please feel free to delete this thread as i probably wont understand an explanation of it anyway LOL
macgyver2
02-13-2006, 05:19 PM
Why delete the thread...use it as an opportunity to learn. I'll (try :)) to help.
Ruby on Rails is made of two parts, pretty much...Ruby, and 'on Rails'.
Ruby (http://www.ruby-lang.org/en/) is an interpreted (the source code is compiled at run-time), purely object-oriented (though IMO, too purely OO) scripting language. If you're not familiar with programming, that sentence might have been jibberish to you...just ask and we can explain more.
[Ruby] 'on Rails' (http://www.rubyonrails.org/) is, as you've discovered, a web application framework. A framework is, well, a frame that you start with--a library of code pieces--on which you can build something more...in this case a web application. A web application is more than a webpage. A webpage serves up pretty-much static information. Even when there is some dynamic content, there still isn't much interaction from the user (the person visiting the page). A web application strives to be like a 'normal' application on your computer...the difference is that it uses your web browser as its base. Gmail (http://www.gmail.com/) is a really good example of a web application.
Thanks to the great folks at Bluehost, we now have the means to implement some pretty nice frameworks. If you look at the buzz around the internet, Ruby on Rails is the framework that everyone seems to chasing (and wanting to catch and kill :)). There are also some nice Python (http://www.python.org/) frameworks like Django (http://www.djangoproject.com/) and Turbogears (http://www.turbogears.org/) (I started playing with both a short time ago...can't decide which one I like more) and Pylons (http://pylonshq.com/) (going to look into that one, too), and I'm sure others in other languages that I'm not familiar with.
I hope that helps you understand a bit more than you did.
jacauc
02-13-2006, 10:44 PM
where do I find RoR? in the cPanel?
excuse my ignorance :P
JCsDesignz
02-14-2006, 02:50 AM
where do I find RoR? in the cPanel?
excuse my ignorance :P
I should imagine so once they have it up and running. If im wrong someone will be along to correct me LOL
JCsDesignz
02-14-2006, 02:55 AM
I hope that helps you understand a bit more than you did.
Of course not but im trying LOL
Ok so how will Ruby on rails affect me as a newbie who has no idea what it is ?
Currently all i do is create my graphics in paintshop pro, then code my site in notepad and upload it using Filezilla ftp and thats it LOL Then i just update it as i need to.
Is Ruby on rails something i need to learn or is it something for more technically minded web hosts ?
alligosh
02-14-2006, 03:26 AM
Ok so how will Ruby on rails affect me as a newbie who has no idea what it is ?
It won't, unless you choose to learn it. (www.rubyonrails.org)
It is like saying we support perl, or python. They are great tools, but if you do not use them, they don't do anything. And that isn't a bad thing. We provide a lot of stuff that different customers want and that I will never use, simply because I choose to do the same things in a different way.
Basically, look into it if you want to, play some if it looks interesting, and do it your own way if it doesn't.
Oh, and keep asking questions. We never learn if we don't ask.
JCsDesignz
02-14-2006, 03:30 AM
Thank you Steve thats what i thought but wanted to be sure. I dont use perl or python either (i dont think i do anyway) so it wont affect me LOL
Oh i could ask questions ALL day but dont want to overwhelm everyone just yet :D
jacauc
02-14-2006, 04:08 AM
So according to Matt's blog it is installed on all boxes already.
Is that true?
macgyver2
02-14-2006, 04:20 AM
So according to Matt's blog it is installed on all boxes already.
Is that true?
Looks that way. They tested it on box 85, and just now I looked and it's on the box I'm on, too (box 70).
jacauc
02-14-2006, 04:31 AM
Looks that way. They tested it on box 85, and just now I looked and it's on the box I'm on, too (box 70).
Where do you see this? in Cpanel? Under fantastico?
macgyver2
02-14-2006, 04:58 AM
Where do you see this? in Cpanel? Under fantastico?
No, I just secure-shelled into my account and typed 'whereis ruby'.
Edit: Ruby isn't something you're going to use Cpanel to control. If you want to learn/play with ruby you'll have to secure shell in and do that at the commandline. Ruby on Rails is just a web framework...basically, you take pieces of that framework and code your web application using the RoR libraries. When it's finished, you serve it.
If you want a basic introduction to Ruby, take a look at this site (http://poignantguide.net/ruby/). It's a good tutorial and it's pretty funny. You'll also get an intro to what a scripting language is and what is meant by 'object-oriented', if you're not already familiar with those things. There is also documentation on the main ruby site (http://www.ruby-lang.org/en/).
To see how a web application framework works, take a look at the RoR screencasts (http://www.rubyonrails.org/screencasts). For a different perspective, there is also the Turbogears (a Python web framework) screencast (http://www.turbogears.org/docs/wiki20/index.html). It shows you how to make a simple wiki in 20 minutes.
jacauc
02-14-2006, 05:03 AM
aaaaah! :D
ruby: /bin/ruby /usr/bin/ruby /sbin/ruby /usr/sbin/ruby /lib/ruby /usr/lib/ruby /usr/man/man1/ruby.1
I have it too :D
Any good suggestions on how to make use of it, some demo's or something that would show me some of the capabilities?
:D jacauc
macgyver2
02-14-2006, 05:42 AM
Any good suggestions on how to make use of it, some demo's or something that would show me some of the capabilities?
Yes, look at the links in my post a couple above this one. I was editing it to include the details when you posted this question. :) Sorry!
rando
02-14-2006, 06:32 AM
We have a knowledge base article on the matter:
http://helpdesk.bluehost.com/kb/index.php?x=&mod_id=2&root=8&id=232
Basically, setting up ruby on rails on bluehost is just like you'd set it up anywhere else. You just log into the server with ssh, run the command 'rails path/to/app', and begin editing things.
At some point later, I may provide a link in cpanel which runs the 'rails path/to/app' for you.
Keep in mind, though, that ruby on rails programming is not as simple as php programming. It's an advanced web programming framework, and you probably need at least a decent knowledge of OO & MVC Programming in order to take advantage of it.
GreenAlien
02-14-2006, 07:08 PM
wikipedia is also a good place for an overview:
http://en.wikipedia.org/wiki/Ruby_on_rails
..Ant
crazypenguin
02-14-2006, 07:19 PM
At some point later, I may provide a link in cpanel which runs the 'rails path/to/app' for you.
It would be great if that could be implemented.
cfjrb
02-15-2006, 07:32 AM
We have a knowledge base article on the matter:
http://helpdesk.bluehost.com/kb/index.php?x=&mod_id=2&root=8&id=232
I followed the kb article as best I could. Did the following.
rails railstest
ln -s /home/username/railstest/public ~/public_html/app
and then tried to access site. I tried www.mydomain.com/railstest and railstest.mydomain.com both of which simply produce 404 errors.
The tutorial linked from http://www.rubyonrails.org/ that you recommend seems tailored toward those hosting on their own PCs. I'm having trouble translating into bluehost hosted environment. http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html?page=2 suggest that I may have to start the server with a command like
ruby script\server
in my ssh shell. Please help. :o
rando
02-15-2006, 07:51 AM
I followed the kb article as best I could. Did the following.
rails railstest
ln -s /home/username/railstest/public ~/public_html/app
and then tried to access site. I tried www.mydomain.com/railstest and railstest.mydomain.com both of which simply produce 404 errors.
The tutorial linked from http://www.rubyonrails.org/ that you recommend seems tailored toward those hosting on their own PCs. I'm having trouble translating into bluehost hosted environment. http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html?page=2 suggest that I may have to start the server with a command like
ruby script\server
in my ssh shell. Please help. :o
You linked it to public_html/app
Therefore, it's www.domain.com/app
leebot
02-15-2006, 09:56 AM
You linked it to public_html/app
Therefore, it's www.domain.com/app
don't forget the trailing slash or else you'll get a bad request :)
www.domain.com/app/
cfjrb
02-15-2006, 10:20 AM
don't forget the trailing slash or else you'll get a bad request :)
www.domain.com/app/
Awesome. I'm riding the rails! Thank you. Thank you. Thank you.
Can I change that link with another ln command? I didn't know what I was doing the first time and I'd like to change the name from app to something else?
rando
02-15-2006, 10:34 AM
Awesome. I'm riding the rails! Thank you. Thank you. Thank you.
Can I change that link with another ln command? I didn't know what I was doing the first time and I'd like to change the name from app to something else?
Yeah, just rm public_html/app, then ln -s sourcefile destination
cfjrb
02-15-2006, 12:55 PM
Thanks for the help so far. Now I'm riding the rails in that the sample welcome file displays. Next the tutorial at
http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html?page=2
says to run the command
ruby script\generate controller MyTest
but when I do so I get an error message such as
ruby: No such file or directory -- scriptgenerate (LoadError)
I also tried
ruby script/generate controller MyTest
and I get a similar error
ruby: No such file or directory -- script/generate (LoadError)
macgyver2
02-15-2006, 01:15 PM
That tutorial is for windows users. Windows uses a backslash (\) to separate directories. Linux uses a forward slash (/).
Make the command:
ruby script/generate controller MyTestand it should work.
Edit: I misread the second command you posted and saw a backslash there, too. :o Don't know why, probably because I've been at work for 9+ hours.
Are you sure you're in the right directory?
cfjrb
02-15-2006, 01:28 PM
The directory I am in is
~/railstest/app/controllers
What directory should I be in? :confused:
macgyver2
02-15-2006, 04:51 PM
In the top-level rails application directory, in this case ~/railstest/
cfjrb
02-15-2006, 06:35 PM
Thanks MacGyver2!
the syntax that seemed to work (from the top-level rails application directory) was "./script/generate controller MyTest"
Apparently "ruby script/generate controller MyTest" is the way you would do it on MSWindows(tm).
TravelswCharlie
02-19-2006, 10:20 AM
I have a very large grocery "Price Book", which I created originally in dBase.
I don't want to display that entire list, but, instead, I want to present my user with shorter lists of basic items, from which she will choose what she wants to put on her personal grocery list, then the software will retrieve those items from the "Price Book", and create her grocery list.
Is this something I can do with Ruby, or if not, what do I need?
Thanks,
CJ
It won't, unless you choose to learn it. (www.rubyonrails.org)
Oh, and keep asking questions. We never learn if we don't ask.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.