SitePoint Sponsor

User Tag List

Results 1 to 14 of 14
  1. #1
    SitePoint Zealot santha's Avatar
    Join Date
    Jan 2007
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What is it with localhost:3000 ???

    I am on Windows, I got Instant Rails v1.3a (as mentioned in the book).
    Now, going through the tutorial, I created new app shovell, then started WEBrick. When entered http://localhost:3000/ for the first time, it was working.
    Then, after restarting, I again fired up WEBrick, but this time localhost is not working.
    After 10 minutes, Instant Rails is giving the message= Instant Rails: Server starting

    What is this ??

  2. #2
    SitePoint Addict jpease's Avatar
    Join Date
    Jul 2002
    Location
    In the network.
    Posts
    217
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you get an error when you point your browser at http://localhost:3000?

  3. #3
    SitePoint Zealot santha's Avatar
    Join Date
    Jan 2007
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jpease View Post
    Do you get an error when you point your browser at http://localhost:3000?
    Yes! Unavailable..

  4. #4
    SitePoint Addict jpease's Avatar
    Join Date
    Jul 2002
    Location
    In the network.
    Posts
    217
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not familiar enough with Instant Rails to give too much help. You might try restarting your computer again. Sometimes that will do the trick.

    You might try installing a more recent version of InstantRails. The latest version is 1.7, the version you installed 1.3 is over a year old. Your problem could possibly be caused by a bug that is fixed in a more recent version.

  5. #5
    SitePoint Evangelist
    Join Date
    Feb 2006
    Location
    Worcs. UK
    Posts
    404
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What do you get if you try:

    http://127.0.0.1:3000/

  6. #6
    SitePoint Zealot santha's Avatar
    Join Date
    Jan 2007
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ReggieB View Post
    What do you get if you try:

    http://127.0.0.1:3000/
    The same error- You tried to access the address http://127.0.0.1.3000/, which is currently unavailable. Please make sure that the Web address (URL) is correctly spelled and punctuated, then try reloading the page.

    Am I missing something? I'm very new to RoR.
    Please tell me how you start it..

  7. #7
    SitePoint Guru silver trophy Luke Redpath's Avatar
    Join Date
    Mar 2003
    Location
    London
    Posts
    794
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If it still says "Server starting" that means the server isn't starting up for some reason, hence its not working. I'm afraid I wouldn't know where to start looking as I don't use Instant Rails, or Windows which in my view is the least optimal environment for Ruby/Rails development when compared to OSX or your favorite flavour of Linux.

  8. #8
    SitePoint Evangelist
    Join Date
    Feb 2006
    Location
    Worcs. UK
    Posts
    404
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It does sound like the Webrick server isn't starting. In my experience that means that there is something in the application code that is stopping the server working.

    Try this:

    Create a new application called "test":
    Code:
    rails test
    Then open a command prompt and use cd to navigate to the root of the test directory created in the previous step.
    Try starting the Webrick server for that application:
    Code:
    ruby script/server
    Then try http://localhost:3000 again. If that works, it is something wrong with your application. If it doesn't it's either a firewall problem or something more fundamental with your Ruby/Rails installation.

  9. #9
    SitePoint Addict jpease's Avatar
    Join Date
    Jul 2002
    Location
    In the network.
    Posts
    217
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ReggieB View Post
    If that works, it is something wrong with your application. If it doesn't it's either a firewall problem or something more fundamental with your Ruby/Rails installation.
    If the server isn't starting, you might be able to check your /log folder for development.log and see if there are any errors. I would guess if the server isn't starting it probably can't write anything out to a log though.

    Nothing more annoying than trying to track down problems that don't report any errors. I hate that.

    Being windows, there is the chance that it could be a missing directive in your PATH? But I would think that would cause a specific error to be reported.

    My guess is that something is funky within Instant Rails itself. I'm on OSX, but I once tried Locomotive (another all-in-one environment) and had similar weird problems. I like the idea of all-in-one environs, but seemed to be a little touchy from my limited experience.

    I would guess it easiest to simply reinstall Instant Rails with the most recent version, and then copy your app folder over. See if it starts there. Since it sounds like you just started, you won't be losing any customizations by starting over. Probably take less time than tracking down the error.

    If you find out what is causing the problem, please report back and let us know!

  10. #10
    SitePoint Zealot santha's Avatar
    Join Date
    Jan 2007
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Somehow, after restarting the PC for 2 times, I entered http://127.0.0.1:3000/ & it worked, then on entering http://localhost:3000/ it worked again.
    I don't know what the problem was before, was it Instant Rails??

    About the message on Instant Rails- "Server starting" , its just a bug. It displayes "Started" next to Apache & MySQL, but shows "Server starting" in Terminal Window. Its in version 1.3a, I don't know if its the same in the latest versions. Patrick has mentioned in his book to use v1.3a, not any other version.

  11. #11
    SitePoint Wizard samsm's Avatar
    Join Date
    Nov 2001
    Location
    Atlanta, GA, USA
    Posts
    5,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Tips:

    1. After buying a programming book, rip out the installation section, tear it up and light it on fire. It's the first part of a computer book to spoil and you don't want the rot to spread.

    2. DO use the all in one package if you want to try something out really quickly to see if and how it works.

    3. DON'T use the all in one package if you are planning on spending more than a day on a given technology. It is not the dominant installation route, it isn't as well worn of a path, it is (at best) a little behind the curve, and a significant majority of people experienced in the technology don't use it and can't help with it.

    None of this is Rails-specific, you can get more platform specific and up to date installation instructions off the web for just about anything.
    Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?

  12. #12
    SitePoint Evangelist
    Join Date
    Feb 2006
    Location
    Worcs. UK
    Posts
    404
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by samsm View Post
    Tips:

    1. After buying a programming book, rip out the installation section, tear it up and light it on fire. It's the first part of a computer book to spoil and you don't want the rot to spread.

    2. DO use the all in one package if you want to try something out really quickly to see if and how it works.

    3. DON'T use the all in one package if you are planning on spending more than a day on a given technology. It is not the dominant installation route, it isn't as well worn of a path, it is (at best) a little behind the curve, and a significant majority of people experienced in the technology don't use it and can't help with it.

    None of this is Rails-specific, you can get more platform specific and up to date installation instructions off the web for just about anything.
    Splendid advice!!!

    Installing Rails on Windows is very straightforward without instant rails. Just install MySQL community edition using the standard installer (Windows Essentials version works fine). Then One-Click Ruby, making sure you select the option to install Gems. Then run:
    Code:
    gem install rails --include-dependencies
    Its as simple as that!

  13. #13
    SitePoint Member
    Join Date
    Jun 2007
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've followed the book without a hitch on my windows machine and the development environment runs like a champ. InstantRails all the way.

  14. #14
    SitePoint Wizard samsm's Avatar
    Join Date
    Nov 2001
    Location
    Atlanta, GA, USA
    Posts
    5,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Insouciant View Post
    I've followed the book without a hitch on my windows machine and the development environment runs like a champ. InstantRails all the way.
    Booooo! Boooo!

    Just kidding, glad it worked.
    Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •