[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Agile Development with Ruby on Rails

Jenjhiz

6/29/2005 5:04:00 PM

Hello,
I bought the PDF version of the book yesterday. I'm having problems
creating a new application. Here's what I did, as per the book's
instructions:

1. Installed Rails: gem install rails
2. Created a working directory: md c:\work
3. Navigated to it: cd work
4. Created a rails application: rails demo
5. cd demo
6. Started WEBrick: ruby script/server
WEBrick started, using port 3000.
7. Pointed browser to: http://localhost:3000/
And this is where I get the "Seeing this instead of the website you
expected?" Apache page, instead of the Rails application. I turned off
the Apache service, just in case, but no success.
Any ideas on how I may solve this problem?
Thanks,
gk

4 Answers

Joe Van Dyk

6/29/2005 5:09:00 PM

0

On 6/29/05, Jenjhiz <jenjhiz@yahoo.com> wrote:
> Hello,
> I bought the PDF version of the book yesterday. I'm having problems
> creating a new application. Here's what I did, as per the book's
> instructions:
>
> 1. Installed Rails: gem install rails
> 2. Created a working directory: md c:\work
> 3. Navigated to it: cd work
> 4. Created a rails application: rails demo
> 5. cd demo
> 6. Started WEBrick: ruby script/server
> WEBrick started, using port 3000.
> 7. Pointed browser to: http://localhost:3000/
> And this is where I get the "Seeing this instead of the website you
> expected?" Apache page, instead of the Rails application. I turned off
> the Apache service, just in case, but no success.
> Any ideas on how I may solve this problem?
> Thanks,
> gk


You're still seeing Apache pages after you turn off Apache?


Curt Hibbs

6/29/2005 6:23:00 PM

0

Joe Van Dyk wrote:
> On 6/29/05, Jenjhiz <jenjhiz@yahoo.com> wrote:
>
>>Hello,
>>I bought the PDF version of the book yesterday. I'm having problems
>>creating a new application. Here's what I did, as per the book's
>>instructions:
>>
>>1. Installed Rails: gem install rails
>>2. Created a working directory: md c:\work
>>3. Navigated to it: cd work
>>4. Created a rails application: rails demo
>>5. cd demo
>>6. Started WEBrick: ruby script/server
>>WEBrick started, using port 3000.
>>7. Pointed browser to: http://localhost:3000/
>>And this is where I get the "Seeing this instead of the website you
>>expected?" Apache page, instead of the Rails application. I turned off
>>the Apache service, just in case, but no success.
>>Any ideas on how I may solve this problem?
>>Thanks,
>>gk
>
>
>
> You're still seeing Apache pages after you turn off Apache?

Maybe you're seeing your browser cache -- try clearing the cache.

Curt


Virender Dogra

6/29/2005 6:38:00 PM

0

What do you get when you try http://127.0...
?

-----Original Message-----
From: Curt Hibbs [mailto:curt@hibbs.com]
Sent: Wednesday, June 29, 2005 11:53 PM
To: ruby-talk ML
Subject: Re: Agile Development with Ruby on Rails


Joe Van Dyk wrote:
> On 6/29/05, Jenjhiz <jenjhiz@yahoo.com> wrote:
>
>>Hello,
>>I bought the PDF version of the book yesterday. I'm having problems
>>creating a new application. Here's what I did, as per the book's
>>instructions:
>>
>>1. Installed Rails: gem install rails
>>2. Created a working directory: md c:\work
>>3. Navigated to it: cd work
>>4. Created a rails application: rails demo
>>5. cd demo
>>6. Started WEBrick: ruby script/server
>>WEBrick started, using port 3000.
>>7. Pointed browser to: http://localhost:3000/
>>And this is where I get the "Seeing this instead of the website you
>>expected?" Apache page, instead of the Rails application. I turned off

>>the Apache service, just in case, but no success. Any ideas on how I
>>may solve this problem? Thanks,
>>gk
>
>
>
> You're still seeing Apache pages after you turn off Apache?

Maybe you're seeing your browser cache -- try clearing the cache.

Curt



Dave Burt

6/29/2005 11:21:00 PM

0

"Jenjhiz" <jenjhiz@yahoo.com> wrote:
> I bought the PDF version of the book yesterday. I'm having problems
> creating a new application. Here's what I did, as per the book's
> instructions:
>
> 1. Installed Rails: gem install rails

The book is written to Rails pre-0.13 and you've downloaded 0.12. You can
get this bleeding edge Rails like this:
gem install --source gems.rubyonrails.com

This won't cause your problem below, though, that Joe, Curt and Virender
have been helping with.

> ...
> 6. Started WEBrick: ruby script/server
> WEBrick started, using port 3000.
> 7. Pointed browser to: http://localhost:3000/
> And this is where I get the "Seeing this instead of the website you
> expected?" Apache page, instead of the Rails application. I turned off
> the Apache service, just in case, but no success.
> Any ideas on how I may solve this problem?

If Apache is answering, it means it "owns" port 3000. Only one service can
listen to a particular port at any given time.
You could shut down Apache, then run script/server, then open the browser
(and flush your cache and refresh to make sure you're not getting a stale
page).
But I imagine you want Apache and WEBrick to co-exist at some point. Check
Apache's httpd.conf for the Listen directive. I have a line in mine that
says:
Listen 80
I guess you have a "Listen 3000" line somewhere there. Pick a number that
isn't Apache's and do like this:

ruby script/server -p 8765

(where 8765 is a number that isn't used)

HTH,
Dave