PDA

View Full Version : Ruby on Rails - Getting Started



mja1973
03-02-2006, 05:33 PM
Howdy folks,

I just signed up with bluehost. I'm a long time VB/ASP/C# programmer, and im looking to broaden my skillset by jumping into some web development with Ruby on Rails.

I've got the two Pragmatic Programmer books (Agile Web Development, Programming Ruby) and i've been doing some of the tutorials.

One thing I've been finding a little akward is all of the command line text required to get things going. Specifically, will I need to log into the shell and use a command line to start my webrick server? If so, and the server goes down or is rebooted, do I need to go back in and start the webrick server manually each time?

bonz
03-03-2006, 08:42 PM
You've got the right books, though I found that I needed the Programming Ruby book very little. I guess it just depends on your aptitude for picking up languages. I went through the "pickaxe" book very thoroughly, but didn't really start to learn well until I tried my own app.

The switch to OOP and structure that comes with a framework like this can be shocking, but it's very cool stuff once you get the hang of it.

As for the command-line stuff, yeah, you need that to do several things like start and stop your server, run the generate script, etc. If you don't have shell access at bluehost, you'll want to request it.

The webbrick server is really only good for testing (but really good for testing). If you run it, it'll be on a port other than the standard port 80. You can do all that on BH.

The recommended way to run RoR in production is to use CGI, or even better, FastCGI. That's been my own biggest barrier to going full on to RoR. It's been difficult to find a stable hosting environment. I have had some initial success on BH.

Having learned RoR and really enjoyed the MVC platform model, I'm now examining some similar frameworks written in PHP, like cakePHP and symfony. Not that I'm suggesting you should abandon RoR, it's a brilliant platform. If it ever gets the support of a standard mod_ruby apache module like PHP has, watch out!

rando
03-03-2006, 09:05 PM
You can't run webrick on our servers unless you buy a dedicated IP for it to run on.

piku
03-04-2006, 01:41 AM
If so, and the server goes down or is rebooted, do I need to go back in and start the webrick server manually each time?

@rando: Any insight for that question?

rando
03-04-2006, 10:12 AM
@rando: Any insight for that question?

Yes, you would have to restart it manually. Remember that you have to have a dedicated IP to use it and you have to make sure your webrick server only binds to that one IP.

piku
03-04-2006, 12:21 PM
Yes, you would have to restart it manually. Remember that you have to have a dedicated IP to use it and you have to make sure your webrick server only binds to that one IP.

Understood in terms of Webrick+IP. Do you know a workaround to not having to restart it manually in case it happens in the wee hours of the night, or when we are not near a computer? TIA

mja1973
03-04-2006, 04:43 PM
So far so good. I got a dedicated IP, and have some really basic test pages up and running, but they are only accessable when I specify port :3000 in the url.

Any advice on what I need to do to get the site to run normally over port :80? I understand that it needs to use cgi or fastcgi, but I'm not sure how to set that up.

If anyone can point me in the right direction i'd appreciate it.

piku
03-05-2006, 04:54 AM
Ditto. More than interested to see if there's a solution for mja and my previous post. TIA

idrysdale
05-31-2006, 01:41 AM
Hello everyone. I'm experiencing similar troubles and wondered if anyone had found a solution or got Ruby running or port 80?

Any suggestions appreciated.

Cheers,
Ian

rando
05-31-2006, 07:03 AM
Ruby on rails runs under apache without you having to do anything. Running the webrick server is a testing mode which isn't really even necessary.

I'm working on a new ruby on rails tutorial that walks you through rails development on bluehost, I'm hoping to have it done within a few days.

piku
05-31-2006, 09:12 PM
Sweet. TIA Rando


Ruby on rails runs under apache without you having to do anything. Running the webrick server is a testing mode which isn't really even necessary.

I'm working on a new ruby on rails tutorial that walks you through rails development on bluehost, I'm hoping to have it done within a few days.