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

Treebook Code Error

Hi all. I created the Treebook application in the 'Create a Ruby on Rails Project'. It worked but then I had problems posting it due to not understanding the password issues. I fixed those and then tried to push it to the server and I believe it did according to my GitHub. However, now when I go to http://0.0.0.0:3000/, nothing shows up and my status project does not work.

My GitHub code is here -

git@github.com:rishimalhotra/treebook.git

Is there something I should do differently? Should I just create a whole new GitHub account to start from scratch? Thank you.

9 Answers

I believe you need to go to: localhost:3000 not the link you provided.

also try: localhost:3000/statuses

Thank you! I just tried both of those though and they still just gave me the same error of not being able to connect to the server :(

Did you run your server from your terminal? Go to your terminal window and type:

rails server

also be sure you are in the treebook directory when you do it. For me I would need to do the following to be in my treebook directory (yours may vairry slightly)

cd ~/projects/treebook/

This sort of worked. I typed in rails server and now 0.0.0.0:3000 works. I went to http://0.0.0.0:3000/statuses and I was told:

Routing Error

No route matches [GET] "/statuses" Try running rake routes for more information on available routes.

I tried watching the video again. Again, 0.0.0.0:3000 works but I am still unable to go to 0.0.0.0:3000/statuses and have it work. When I go there, I just get a notification that my computer is unable to connect to that site, as if the site just isn't there (it's the same notification I get when the internet doesn't work).

This shows up in my Terminal:

Started GET "/statuses" for 127.0.0.1 at 2013-04-22 02:32:07 -0700

ActionController::RoutingError (No route matches [GET] "/statuses"): actionpack (3.2.12) lib/action_dispatch/middleware/debug_exceptions.rb:21:in call' actionpack (3.2.12) lib/action_dispatch/middleware/show_exceptions.rb:56:incall' railties (3.2.12) lib/rails/rack/logger.rb:32:in call_app' railties (3.2.12) lib/rails/rack/logger.rb:16:inblock in call' activesupport (3.2.12) lib/active_support/tagged_logging.rb:22:in tagged' railties (3.2.12) lib/rails/rack/logger.rb:16:incall' actionpack (3.2.12) lib/action_dispatch/middleware/request_id.rb:22:in call' rack (1.4.5) lib/rack/methodoverride.rb:21:incall' rack (1.4.5) lib/rack/runtime.rb:17:in call' activesupport (3.2.12) lib/active_support/cache/strategy/local_cache.rb:72:incall' rack (1.4.5) lib/rack/lock.rb:15:in call' actionpack (3.2.12) lib/action_dispatch/middleware/static.rb:62:incall' railties (3.2.12) lib/rails/engine.rb:479:in call' railties (3.2.12) lib/rails/application.rb:223:incall' rack (1.4.5) lib/rack/content_length.rb:14:in call' railties (3.2.12) lib/rails/rack/log_tailer.rb:17:incall' rack (1.4.5) lib/rack/handler/webrick.rb:59:in service' /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/webrick/httpserver.rb:138:inservice' /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/webrick/httpserver.rb:94:in run' /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/webrick/server.rb:191:inblock in start_thread'

Rendered /usr/local/rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.12/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (20.0ms)

and then when I went to the video and tried generating the status again:

Rishi-Malhotras-MacBook-Pro:treebook rishimalhotra2$ rails generate scaffold status name:string content:text invoke active_record Another migration is already named create_statuses: /Users/rishimalhotra2/treebook/db/migrate/20130410074440_create_statuses.rb

Jason Seifer
STAFF
Jason Seifer
Treehouse Guest Teacher

Try running "rake db:migrate" and then "rails server" again, then go to "http://localhost:3000/statuses" and let us know if that works.

I tried that, but it seems like nothing happened in my Terminal when I did that. I'd show a screenshot, but it doesn't look like I can do that in here.

Started GET "/statuses" for 127.0.0.1 at 2013-04-24 00:33:15 -0700

ActionController::RoutingError (No route matches [GET] "/statuses"): actionpack (3.2.12) lib/action_dispatch/middleware/debug_exceptions.rb:21:in call' actionpack (3.2.12) lib/action_dispatch/middleware/show_exceptions.rb:56:incall' railties (3.2.12) lib/rails/rack/logger.rb:32:in call_app' railties (3.2.12) lib/rails/rack/logger.rb:16:inblock in call' activesupport (3.2.12) lib/active_support/tagged_logging.rb:22:in tagged' railties (3.2.12) lib/rails/rack/logger.rb:16:incall' actionpack (3.2.12) lib/action_dispatch/middleware/request_id.rb:22:in call' rack (1.4.5) lib/rack/methodoverride.rb:21:incall' rack (1.4.5) lib/rack/runtime.rb:17:in call' activesupport (3.2.12) lib/active_support/cache/strategy/local_cache.rb:72:incall' rack (1.4.5) lib/rack/lock.rb:15:in call' actionpack (3.2.12) lib/action_dispatch/middleware/static.rb:62:incall' railties (3.2.12) lib/rails/engine.rb:479:in call' railties (3.2.12) lib/rails/application.rb:223:incall' rack (1.4.5) lib/rack/content_length.rb:14:in call' railties (3.2.12) lib/rails/rack/log_tailer.rb:17:incall' rack (1.4.5) lib/rack/handler/webrick.rb:59:in service' /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/webrick/httpserver.rb:138:inservice' /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/webrick/httpserver.rb:94:in run' /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/webrick/server.rb:191:inblock in start_thread'

Rendered /usr/local/rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.12/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (47.8ms) rake:db migrate

rails server bundle

Now is when I went to 0.0.0.0:3000/statuses

bundle

Started GET "/assets/rails.png" for 127.0.0.1 at 2013-04-24 00:38:37 -0700 Served asset /rails.png - 200 OK (0ms)

Started GET "/rails/info/properties" for 127.0.0.1 at 2013-04-24 00:38:39 -0700 (1.8ms) SELECT "schema_migrations"."version" FROM "schema_migrations" Processing by Rails::InfoController#properties as / Rendered inline template (0.4ms) Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.0ms)

I still got the same error though when I went to 0.0.0.0:3000/stauses:

Routing Error

No route matches [GET] "/statuses" Try running rake routes for more information on available routes.

Any thoughts? Thank you so much! It's been quite vexing.

Have you figured out what was causing this ? I can get to localhost:3000 but not /statuses.

it comes up with a list of javascript errors when I try to load that page, I followed the video exactly as described, the only difference being that I am using windows.

did you find a solution? I seem to be running into the same problem.

I wasn't able to figure out exactly what caused it - I would email support. I emailed with them and they were super helpful. I downloaded the project files to follow along with the lessons.

Best,

Rishi