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

Ruby on Rails localhost:3000 not working?

I'm installing ruby on rails in Windows. I have tried localhost:3000, 127.0.0.1:3000 and 0.0.0.0:3000 in Chrome, but none is working. I ran the following commands "gem install bundle sqlite rails", "rails new testapp", "cd testapp" and "bundle exec rails server". I even restart my machine, but no luck.

5 Answers

The problem is fixed. The real problem was not connecting to localhost:3000, but was that rails wasn't installed correctly. When I ran "rails server" there was an error line that said: C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/tzinfo-1.2.1/lib/tzinfo/data_source.rb: No source of timezone data could be found. Please refer to http://tzinfo.github.io/datasourcenot found for help resolving this error. The link to the solution is: https://github.com/tzinfo/tzinfo/wiki/Resolving-TZInfo%3a%3aDataSourceNotFound-Errors I think this is a common error in Windows machine. After I changed the gemfile, rails is up and running. Thanks everyone for your help and sorry for not finding the real problem.

A longtime Rubyist on Windows, I highly recommend not using the 64-bit version of Rails and Ruby on Windows.

I had exactly the same problem. Thanks for posting the solution.

Have you tried running rails server?

Yes, I have.

Which version of Ruby are you using? Is it consistent with your gem file?

Assuming you have RVM installed, can you type rvm list into your terminal and tell me what you see?

The version is ruby-2.0.0-p481-x64. Using the command gem query --local, the gem files installed are: bundler 1.6.2, rails 4.1.1, sqlite3 1.3.9x64

Try rails server.

On localhost:3000.

How do I run rails server on the localhost:3000?

Type rails server into the console while in you project directory. Then while it's running type localhost:3000 into your web browser.

Yeap, I tried that and it didn't work.

1) Test if you have actually installed rails via rails -v 2) Make sure you changed directory (in command prompt) to one, where your current project is. 3) Run rails s command

I kind of have the same problem, I installed ruby using railsinstaller.org version 2.1 on Windows, now when i type rails s I get some information but I can't see the localhost address. This is what I get: http://oi61.tinypic.com/1z4j39v.jpg

Hope you can help me out