Agile Development with Ruby on Rails

Discussion in 'Ruby' started by Jenjhiz, Jun 29, 2005.

  1. Jenjhiz

    Jenjhiz Guest

    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
    Jenjhiz, Jun 29, 2005
    #1
    1. Advertising

  2. Jenjhiz

    Joe Van Dyk Guest

    On 6/29/05, Jenjhiz <> 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:
    >=20
    > 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?
    Joe Van Dyk, Jun 29, 2005
    #2
    1. Advertising

  3. Jenjhiz

    Curt Hibbs Guest

    Joe Van Dyk wrote:
    > On 6/29/05, Jenjhiz <> 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
    Curt Hibbs, Jun 29, 2005
    #3
  4. What do you get when you try http://127.0.0.1:3000/
    ?

    -----Original Message-----
    From: Curt Hibbs [mailto:]
    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 <> 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, Jun 29, 2005
    #4
  5. Jenjhiz

    Dave Burt Guest

    "Jenjhiz" <> 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
    Dave Burt, Jun 30, 2005
    #5
  6. Jenjhiz

    Jenjhiz Guest

    Thanks to all who replied.
    To Virender Dogra:
    Yes, http://127.0.0.1:3000/ shows the Rails application
    To Curt Hibbs:
    After clearing the cache, yes, the browser shows the Rails application.
    (I'm using FireFox, configured to "remember nothing", but obviously I
    missed something.)
    To Dave Burt:
    Yes, there is a Listen 3000 in Apache's httpd.conf. After replacing
    3000 with something else, /localhost:3000/ now gives me the Rails
    application.

    I'm off and running on Rails (until the next bump). I can't wait to
    find out what all this interest in Rails is all about!
    gk
    Jenjhiz, Jun 30, 2005
    #6
  7. Also if you are just starting on rails you may want to read my blog
    entry about how to use sqlite( < 5 minutes to setup) instead of mysql(>
    5 minutes to setup ;-) for the database

    http://vdogra-ruby.blogspot.com/

    - Virender

    -----Original Message-----
    From: Jenjhiz [mailto:]
    Sent: Thursday, June 30, 2005 11:21 PM
    To: ruby-talk ML
    Subject: Re: Agile Development with Ruby on Rails


    Thanks to all who replied.
    To Virender Dogra:
    Yes, http://127.0.0.1:3000/ shows the Rails application
    To Curt Hibbs:
    After clearing the cache, yes, the browser shows the Rails application.
    (I'm using FireFox, configured to "remember nothing", but obviously I
    missed something.) To Dave Burt: Yes, there is a Listen 3000 in Apache's
    httpd.conf. After replacing 3000 with something else, /localhost:3000/
    now gives me the Rails application.

    I'm off and running on Rails (until the next bump). I can't wait to find
    out what all this interest in Rails is all about! gk
    Virender Dogra, Jul 2, 2005
    #7
  8. Jenjhiz

    Jenjhiz Guest

    Virender,
    I do intend to use SQLite mostly in my projects, rather than MySQL,
    although for exploring Rails I opted for MySQL
    Thank you for letting me know about your blog.
    gk.
    Jenjhiz, Jul 4, 2005
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shaguf
    Replies:
    0
    Views:
    814
    Shaguf
    Nov 28, 2008
  2. Stephen Kellett

    Book: Agile Web Development with Rails

    Stephen Kellett, Jun 13, 2005, in forum: Ruby
    Replies:
    4
    Views:
    121
    Ara.T.Howard
    Jun 14, 2005
  3. Replies:
    10
    Views:
    209
    Jeffrey Dik
    Nov 7, 2005
  4. basi
    Replies:
    4
    Views:
    104
  5. Dave Thomas
    Replies:
    10
    Views:
    183
    Gene Tani
    Oct 22, 2006
Loading...

Share This Page