Learning Rails, Round 2: Well, that was easy.


My ideal situation, given that I already know Apache, would be to have Rails work within an Apache server, because then I’d be using an existing server I understand instead of trying to learn and debug a new web server AND a new toolkit, but the pages I found were full of stuff about setting up FastCGI and embedding stuff in it, and so on… So, I finally had this idea: I’d try IRC. Because the IRC channel folks, while they may be rude sometimes, are at the very least current.

So I asked in #rubyonrails (on Freenode):

Okay, time for my newbie question. There are thirty million web servers out there. If I just want to start playing around with Rails, and I have an existing Apache server, is there a nice easy way to just plug Rails into the apache server?

Within under five seconds, three separate people had told me to look at “passenger”. I did, and found Phusion Passenger, aka mod_rails. So I looked at their install instructions, ran them, and BANG, Rails application on my local Apache server. Well, not really an application, just an empty and unconfigured install.

(Special credit to anathematic, who triggered a bot to give me the link and a brief description, and who said “I am fine being quoted as long as you mention my rugged good looks” when asked about being quoted. Consider them mentioned.)

So, if you include only time I spent actually working on this, that’s about another ten minutes. If you include time spent getting cussed at by someone who apparently hates Debian Linux, a lot, it’s probably closer to half an hour, but trying to help people answer questions is how you justify other people spending time answering yours. :)

Haven’t actually figured out what I need to do yet with regards to, say, creating databases for the Rails application to be to access, or any of that. I think that’ll be tomorrow, though, today was already long enough.


Actually, I figured it’d be really easy, and it was. Created the various databases, and now I get:

pre. Ruby version 1.8.7 (i686-darwin9.6.0)
RubyGems version 1.3.1
Rails version 2.2.2
Active Record version 2.2.2
Action Pack version 2.2.2
Active Resource version 2.2.2
Action Mailer version 2.2.2
Active Support version 2.2.2
Application root /Users/seebs/src/rails/test
Environment development
Database adapter postgresql
Database schema version 0

… so it’s WORKING! Hah!

Big surprise so far: After generating a file, navigating to it produced nothing until I kicked Apache. This is apparently normal, but I don’t understand it.

Comments [archived]

From: stressman
Date: 2010-03-22 15:27:09 -0500

I’ve always had no problems with getting internet on my computer. Now I can’t connect. I’ve checked and everything is plugged in. I don’t think it is a problem with the cables because I don’t get the message “Local cable disconnected”. All the other computers in my house are working fine. I think that something is wrong with the actual computer. I had a trojan (InternetSecurity2010) before that happened, maybe that has something to do with it? I’ve tried Internet Explorer, Firefox, and Safari. Other odd things are happening too…after a few hours or so none of the applications will work (iTunes, microsoft word, etc) and a lot of the words start to disappear. Likeee, the start button at the bottom left corner doesn’t say start, it just is a green blob and when you click on it, it only shows the picture for each application. I’ve run spybot and malwarebytes scans and they both came up with nothing. I dont have any actual antivirus to run because I was in the middle of downloading Kaspersky Anti Virus when it happened and whenever I put in the code, it says that it can’t download because it can’t access the internet. Any ideas?

http://easystressreduction.info stress reduction
<a href=“http://easystressreduction.info”>stress reduction</a>