Page 1 of 1

Ruby on Rails?

Posted: Mon May 09, 2011 2:24 pm
by windextor
Hello,

I've been trying to get into RoR for the past week or so, just to try and understand its potential to create Browser MMOs, but so far I can't even make it say Hello World.

I've googled for tutorials and newbie guides on installation procedures or basic programs to code and found nothing of relevance. I'm on a MacBook Pro by the way, but I do have a desktop running Windows 7 too if that would be better.

For a language that's supposedly newbie-friendly, this has been by far the one that I found most difficult to understand from scratch.

Does anyone know any of web tutorials (video or otherwise) that could be helpful?

Re: Ruby on Rails?

Posted: Mon May 09, 2011 2:42 pm
by Xaleph
OSX is probably better to run ror, mostly because the kernel of OSX is based on linux, which is what you need to run RoR. That`s not completely true, but native support is always better then indirect support.

THe thing is, you need to install the ror package. Something like the server for it. If you don`t have it, you can do whatever you want, but never get a simple hello world.

I suggest you google for something like:
how to install RoR on OSX/Windows

Re: Ruby on Rails?

Posted: Tue May 10, 2011 10:01 pm
by Kennydin
RoR is an MVC based framework using Ruby, and a lot of the stuff is meant to be automated. For instance, you use your Terminal to automate your project creation. Mac is best for Rails and most builds come with rails already pre-installed on OS X (10.4+) but you'll probably want to update to Rails 3 (from the rails 2 pre-installed). Ruby is a newbie-friendly language! :p however Ruby on Rails is a framework which assumes you know a bit of Ruby anyway.

The MVC architecture separates out all your code out, having all your database stuff and queries in models, all your processing logic in controllers and then all your view files also are separate. They are all interlinked by naming conventions and stuff but I would recommend reading a the official docs here:

http://guides.rubyonrails.org/getting_started.html

To create a new rails app on your mac just go into Terminal and type:
rails new <app name> (eg. rails new browsermmo)
This will create a directory housing your whole app (controllers, configs, models, views etc)

You should probably read the guides instead of me telling you all this or you might get confused :P my bad.

Last note: Rails has its own web server, Mongrel, built in which by default runs your app. You would cd into your app directory and type in Terminal:
rails server
to start your app. http://localhost:3000

Once you get your head around it you'll find it nice to use :) sorry for the ramblings on!

Jordan