Question about Rails setup

software development

#1

Hello!

I put a rails app (called “nines”) under one of my domains (www.pptt.com). So, it’s like this:

[vito]$ cd ~parki/pptt.com/nines
[vito]$ ls
README Rakefile app components config db doc lib log public script test tmp vendor

So, this is all good.

If I then type:

[vito]$ script/server
=> Booting WEBrick…
=> Rails application started on http://0.0.0.0:3000
=> Ctrl-C to shutdown server; call with --help for options
[2006-05-31 10:47:33] INFO WEBrick 1.3.1
[2006-05-31 10:47:33] INFO ruby 1.8.2 (2005-04-11) [i386-linux]
[2006-05-31 10:47:33] INFO WEBrick::HTTPServer#start: pid=8260 port=3000

Rails comes up all nicely, and I can surf to it:

http://www.pptt.com:3000

Which is most cool.

However

I would like to be able to surf to

http://www.pptt.com

In other words, I’d like Rails to be on port 80 for my app.

How do I do this?

Any help is appreciated - I looked in the howto and didn’t find this.

Perhaps there is some DreamHost magic needed.

Thanks in advance.

parki…


#2

Do you have your subdomain set up followed by the appname & then by public? Although I can only get the ruby on rails welcome page to come up on 80 when I do ruby script/generate controller MyTest, it will only appear under the 3000 port. So maybe someone else can enlighten us!

I had to change my subdomain to have it’s web directory set at zzzdomainname/newapp/public … then the port 80 worked (just for the welcome to ruby page)


#3

Hi - thanks for the reply.

I managed to get things working - needed to point to the public/dispatch.fcgi script and got rails up and running.

Thanks!


#4

To get something other than the rails welcome page, you first need to delete the index.html file in your /railsapp/public folder. Then edit the /config/routes.rb file to point to your first controller. (this is what the welcome page tells you to do) Look around line 14 for:

map.connect ‘’, :controller => “welcome”

uncomment and change it to:

map.connect ‘’, :controller => “NameOfYourControllerYouWantDisplayedFirst”

So if you had the welcome page coming up when you went to your rails app, you will now see the controller you entered instead.

-=Randy