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

Paul Dietrich
Paul Dietrich
4,557 Points

Strange error in Terminal

Hello.

I just finished the entire segment right before Build A Simple Ruby On Rails Application: Creating an Authentication System: Generating the Devise Views. I just installed Devise, and followed the instructions on the video.

Upon starting the Generating the Devise Views video, when I try to start my rails server, I get the following message:


Started GET "/assets/bootstrap.css?body=1" for 127.0.0.1 at 2013-01-16 20:41:20 -0800 Served asset /bootstrap.css - 304 Not Modified (5ms) [2013-01-16 20:41:20] WARN Could not determine content-length of response body. Set content-length of the response or set Response#chunked = true


My Terminal is then frozen. I can't shut down my server, and have to close the Terminal. Any ideas?

Thanks.

4 Answers

Jim Hoskins
STAFF
Jim Hoskins
Treehouse Guest Teacher

That's interesting. What you pasted isn't really an error, it's just rails logging verbosely, and a warning (but not error) that comes from the default web server built into rails. To get rid of the somewhat annoying warning, you could change out the server used by adding the following to your Gemfile, then running bundle

gem "thin"

As for it freezing, that's pretty unusual, and nothing in that logging indicates that should happen. Does it not respond after holding "ctrl" and hitting "c". I haven't really experienced the rails server process becoming unresponsive to interrupts before. Perhaps Jason has some experience there.

Paul Dietrich
Paul Dietrich
4,557 Points

Hi Jim,

I added: gem "thin" right below gem 'devise' in my Gemfile, saved, and then bundled. When I type in "rails s" in my terminal (without quotes), the server starts, but then I receive two different types of messages. The first is this:

Started GET "/assets/jquery_ujs.js?body=1" for 127.0.0.1 at 2013-01-16 21:28:31 -0800 Served asset /jquery_ujs.js - 304 Not Modified (0ms)

and then after a while, I get this message:

Started GET "/statuses" for 127.0.0.1 at 2013-01-16 21:28:31 -0800 Processing by StatusesController#index as HTML Status Load (0.2ms) SELECT "statuses".* FROM "statuses" Rendered statuses/index.html.erb within layouts/application (3.0ms) Completed 200 OK in 11ms (Views: 10.4ms | ActiveRecord: 0.2ms)

And then it continues with that first message. It's strange, and I'm stumped!

Jim Hoskins
STAFF
Jim Hoskins
Treehouse Guest Teacher

Hi paul,

Those aren't eror messages at all, that's actually the live log of what rails is doing, it's there for your benefit. That first line is just telling you that it served the file jquery_ujs.

The second one is information about how it served the page /statuses, giving you information about how long the request took, as well as information about the database query it used.

It's all good, it's doing what it's supposed to do. As long as hitting ctrl+c stops the server and returns you to the command line, everything is working just fine.

Paul Dietrich
Paul Dietrich
4,557 Points

I was playing around with it - the Terminal didn't actually freeze. I was holding down cmd+c and not ctrl+c >.<

Thanks, Jim. :)