Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Rails Server

Hi, I just started the Create a Simple Ruby on Rails application and I set up the folders correctly but when i say

rails server

It says the same thing as on the video but when I go to the URL it just says that it the webpage is not available. I am also using Windows

Joe, localhost can sometimes go to the IPv6 address instead of the Ipv4 of 127.0.0.1. You should use : http://127.0.0.1:3000 When you issue a "rails s" it will tell you on the command line where it is running on.

awesome, this worked for me. thanks Justin!

5 Answers

I had a similar problem. Are you going to localhost:3000 in the browser?

No I'm going to

http://0.0.0.0:3000

try localhost:3000 because http://0.0.0.0:3000 didn't work with me either

The IP address 0.0.0.0 is a Linux/OS X thing, it doesn't work on Windows.

Thanks guys, it works now!

I'm having the same issue. I'm also on Windows, tried all the above and nothing worked. This is what I get when typing 'rails server'

rails server

Any ideas?

That error screenshot you have posted is just the output of the usage. Can we see the command you actually enter by you scrolling up and taking another screenshot?

Thanks @JustinCarlson here's the previous command image: rails new treebook

So when you issue a "rails server" from the c:\sites\treebook directory ie:

"C:\sites\treebook\rails server"

You get an error? The command you issued in the last post was to create the rails app you need to run the rails server command from within that director to start the server. Then browse to http://127.0.0.1:3000. In a web browser on that machine to access the webapp.

Thanks @JasonCarlson. Here's the error I got at the bottom of the $rais new treebook command: error rails new treebook

and no, I didn't install rails by following the instructions on the class. If I remember correctly I still installed from the website but version 3.2.12

Ben, you really should just remove what you have installed manually for ruby in your test environment and install the stack from here : http://railsinstaller.org/en

The dev/build and a few others DO NOT come with the rails distribution but these folks have integrated everything you need to be successful. Installing the build tools manually is something that would take a bit to explain so I recommend just following the course on what to install :-)

Can I overwrite my current installation or should I remove and reinstall? If need to uninstall - how do I do it?

and here's the rails server command: rails server

Sorry missed this one :-(.

Did you install rails via the installer on the class or have you used another flavor for windows?

64/32 bit?

Out of curiosity if you issue a "rails s" command does it fail still?

Yes, I also tried with $rails s