0

When I enter

    rails new blog

it returns

    exist  
       identical  README.rdoc
       identical  Rakefile
       identical  config.ru
       identical  .gitignore
       identical  Gemfile
           exist  app
       identical  app/assets/images/rails.png
       identical  app/assets/javascripts/application.js
       identical  app/assets/stylesheets/application.css
       identical  app/controllers/application_controller.rb
       identical  app/helpers/application_helper.rb
           exist  app/mailers
           exist  app/models
       identical  app/views/layouts/application.html.erb
       identical  app/mailers/.gitkeep
       identical  app/models/.gitkeep
           exist  config
       identical  config/routes.rb
       identical  config/application.rb
       identical  config/environment.rb
           exist  config/environments
       identical  config/environments/development.rb
       identical  config/environments/production.rb
       identical  config/environments/test.rb
           exist  config/initializers
       identical  config/initializers/backtrace_silencers.rb
       identical  config/initializers/inflections.rb
       identical  config/initializers/mime_types.rb
        conflict  config/initializers/secret_token.rb
    Overwrite /Users/user/blog/config/initializers/secret_token.rb? (enter "h" for help)    [Ynaqdh] 

and whether I hit y/ yes or n/ no it installs the bundle, and the

    cd blog

command goes through- but then when I try

    rails server

I get

    [2012-06-06 19:21:59] WARN  Could not determine content-length of response body. Set     content-length of the response or set Response#chunked = true

[2012-06-06 19:22:00] WARN Could not determine content-length of response body. Set content-length of the response or set Response#chunked = true

I found somewhere you are supposed to install "thin" gemfile to fix this, and run

    rails server thin

and that returns

    /Users/user/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/handler/thin.rb:1:in `require': cannot load such file -- thin (LoadError)
from /Users/user/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/handler/thin.rb:1:in `<top (required)>'
from /Users/user/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/handler.rb:20:in `const_get'
from /Users/user/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/handler.rb:20:in `block in get'
from /Users/user/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/handler.rb:20:in `each'
from /Users/user/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/handler.rb:20:in `inject'
from /Users/user/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/handler.rb:20:in `get'
from /Users/user/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:269:in `server'
from /Users/user/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/railties-3.2.5/lib/rails/commands/server.rb:59:in `start'
from /Users/user/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/railties-3.2.5/lib/rails/commands.rb:55:in `block in <top (required)>'
from /Users/user/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/railties-3.2.5/lib/rails/commands.rb:50:in `tap'
from /Users/user/.rbenv/versions/1.9.3-p125/lib/ruby/gems/1.9.1/gems/railties-3.2.5/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'

but then the " localhost :3000 " displays an Oops page saying it cant find the page, however when i enter the regular server command the page is intact but the warning prevents me from going any further.

any ideas?

Thank you Dty- Note for n00bs, you need to run server and code in separate windows (I feel slow now)

ugh
  • 3
  • 3

1 Answers1

0

The warnings you see while using rails server is normal. Notice they're just warnings so there shouldn't be anything stopping you from going any further.

If you use the thin server then the correct command should be thin start. If you're using rails 3.2rc2 then according to this, rails server will work if gem 'thin' is in your Gemfile.

Community
  • 1
  • 1
Dty
  • 12,253
  • 6
  • 43
  • 61
  • That warning doesn't look *normal* to me. – Oscar Del Ben Jun 07 '12 at 01:39
  • If you've used rails 3 with asset pipeline you're used to it. See this blog entry for example http://thechangelog.com/post/21217781637/quiet-assets-silence-asset-pipeline-messages – Dty Jun 07 '12 at 02:07
  • Are you trying to enter code in the same window that you're running `rails server`? If so, you need to do those in two separate terminal windows. Open two terminal windows, change to the same project directory. In one run `rails server`, in the other write your code. – Dty Jun 07 '12 at 02:14