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 trialEmy Ng
8,035 PointsRuby 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
Emy Ng
8,035 PointsThe 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.
Joshua Briley
Courses Plus Student 24,645 PointsHave you tried running rails server
?
Emy Ng
8,035 PointsYes, I have.
Joshua Briley
Courses Plus Student 24,645 PointsWhich version of Ruby are you using? Is it consistent with your gem file?
Joshua Briley
Courses Plus Student 24,645 PointsAssuming you have RVM installed, can you type rvm list
into your terminal and tell me what you see?
Emy Ng
8,035 PointsThe 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
Chase Lee
29,275 PointsTry rails server
.
Chase Lee
29,275 PointsOn localhost:3000
.
Emy Ng
8,035 PointsHow do I run rails server on the localhost:3000?
Chase Lee
29,275 PointsType rails serve
r into the console while in you project directory. Then while it's running type localhost:3000
into your web browser.
Emy Ng
8,035 PointsYeap, I tried that and it didn't work.
Artem Prytkov
11,932 Points1) 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
Julian Betancourt
11,466 PointsI 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
Kevin Lozandier
Courses Plus Student 53,747 PointsKevin Lozandier
Courses Plus Student 53,747 PointsA longtime Rubyist on Windows, I highly recommend not using the 64-bit version of Rails and Ruby on Windows.
Jiyda Mohamed Moussa
105 PointsJiyda Mohamed Moussa
105 PointsI had exactly the same problem. Thanks for posting the solution.