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

Can't connect to localhost:3000 (other threads didn't help)

Hello programmers,

I shall be adding myself to the list of people having trouble connecting to localhost.

I am running Windows 8, Ruby 2.0.0 on x64 (64-bit). Rails version is 4.1.4

bin/rails server does not work, nor does rails server and rails s

When I run any variant, I get the typical WEBrick booting, etc.

It seems like there are a lot of variables to solving this issue, and thus we'll probably be continually seeing more threads on this subject.

I also read that programming with Ruby in 64-bit is not recommended. That was only one person though. Does 64 really cause troubles throughout various processes? If so, I am willing to uninstall and reinstall a new environment, however with 32.

I would also like to mention that I once connected correctly when first installing my environment and testing it. Now as I proceed to another course, it is not working.

Any help is greatly appreciated guys. As this is a common issue, I will be giving back to others once I figure this out for myself.

Thanks!

3 Answers

Thanks guys!

I'm actually planning on installing Ubuntu. I already have a liveUSB formatted.

After having issues, I just uninstalled my entire Ruby and Rails environment, and redownloaded for a 32-bit development environment.

If anyone reads this in the future and are having problems running 64-bit environments, I suggest uninstalling everything completely and switching to a complete, 32-bit environment.

A simple switch and it worked perfectly from the get go.

Thanks again guys!

I have been encountering the same problem. I am going to try re-downloading Ruby in a 32-bit environment.

Edit: It worked once I reinstalled it! Thanks again! You definitely deserve the reputation point. :)

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

I would personally suggest downloading free version of VMWare Player and installing a Linux distribution on it (Ubuntu and Mint are probably the most common and most human-friendly), then setting up your development environment there using tutorials (lots of them out there on the Internet). This way you get a more stable experience and some practice with using Unix terminal (in the long run you'll want to switch to that from Windows).

David Gross
David Gross
19,443 Points

I donu about windows but in my mac I often get an error with the tcp:3000 . If you try and load localhost:3000 and your getting the error server already running. You can try

 lsof -wni tcp:3000
 kill -9 and then the 5 digit pid number of your ruby program running