title: How to create a new resources on Rails
body: <p>I am using Ruby 1.9.3 and Rails (rubygems-1.8.24) on Windows 7. </p>
  
  <p>I successfully created an application called 'blog'. So far I could
  run a local server (WEBrick) and make Hello, Rails! appear at
  localhost:3000</p>
  
  <p>But now I try to create a new resource but to no avail.. Here is the
  code in routes.rb</p>
  
  <pre><code>Blog::Application.routes.draw do
  
    resources :posts
  
    root to: "welcome#index"
  end
  </code></pre>
  
  <p>When I type :</p>
  
  <pre><code>$ rake routes
  </code></pre>
  
  <p>I get this error message:</p>
  
  <pre><code>rake aborted!
  c:/blog/config/routes.rb: syntax error, unexpected_keyword_end, expecting $end
  c:65535:in 'execute_if_updated'
  c:/blog/config/environment.rb:5:bin '&lt;top (required)&gt;'
  Tasks: TOP =&gt; routes =&gt; environment
  (see full trace by running task with --trace)
  </code></pre>
  
  <p>when it should show the following:</p>
  
  <pre><code>$ rake routes
      posts GET    /posts(.:format)          posts#index
            POST   /posts(.:format)          posts#create
   new_post GET    /posts/new(.:format)      posts#new
  edit_post GET    /posts/:id/edit(.:format) posts#edit
       post GET    /posts/:id(.:format)      posts#show
            PATCH  /posts/:id(.:format)      posts#update
            PUT    /posts/:id(.:format)      posts#update
            DELETE /posts/:id(.:format)      posts#destroy
       root        /                         welcome#index
  </code></pre>
  
  <p>After running $ rake routes --trace, I get:</p>
  
  <pre><code>c:\blog&gt;rake routes --trace
  ** Invoke routes (first_time)
  ** Invoke environment (first_time)
  ** Execute environment
  rake aborted!
  c:/blog/config/routes.rb:69: syntax error, unexpected keyword_end, expecting $end
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `load'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `block in load'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:223:in `load'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:40:in `each'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:40:in `load_paths'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:16:in `reload!'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:26:in `block in updater'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/file_update_checker.rb:75:in `call'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/file_update_checker.rb:75:in `execute'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/application/routes_reloader.rb:27:in `updater'
  C:65535:in `execute_if_updated'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/application/finisher.rb:69:in `block in &lt;module:Finisher&gt;'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `instance_exec'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `run'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/initializable.rb:55:in `block in run_initializers'
  C:/Ruby193/lib/ruby/1.9.1/tsort.rb:150:in `block in tsort_each'
  C:/Ruby193/lib/ruby/1.9.1/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
  C:/Ruby193/lib/ruby/1.9.1/tsort.rb:219:in `each_strongly_connected_component_from'
  C:/Ruby193/lib/ruby/1.9.1/tsort.rb:182:in `block in each_strongly_connected_component'
  C:/Ruby193/lib/ruby/1.9.1/tsort.rb:180:in `each'
  C:/Ruby193/lib/ruby/1.9.1/tsort.rb:180:in `each_strongly_connected_component'
  C:/Ruby193/lib/ruby/1.9.1/tsort.rb:148:in `tsort_each'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/initializable.rb:54:in `run_initializers'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/application.rb:215:in `initialize!'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
  c:/blog/config/environment.rb:5:in `&lt;top (required)&gt;'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/application.rb:189:in `require_environment!'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/railties-4.0.2/lib/rails/application.rb:250:in `block in run_tasks_blocks'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:236:in `call'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:236:in `block in execute'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:231:in `each'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:231:in `execute'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:175:in `block in invoke_with_call_chain'
  C:/Ruby193/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:168:in `invoke_with_call_chain'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:197:in `block in invoke_prerequisites'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:195:in `each'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:195:in `invoke_prerequisites'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:174:in `block in invoke_with_call_chain'
  C:/Ruby193/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:168:in `invoke_with_call_chain'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:161:in `invoke'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:149:in `invoke_task'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:106:in `block (2 levels) in top_level'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:106:in `each'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:106:in `block in top_level'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:115:in `run_with_threads'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:100:in `top_level'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:78:in `block in run'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:165:in `standard_exception_handling'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:75:in `run'
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-10.1.1/bin/rake:33:in `&lt;top (required)&gt;'
  C:/Ruby193/bin/rake:23:in `load'
  C:/Ruby193/bin/rake:23:in `&lt;main&gt;'
  Tasks: TOP =&gt; routes =&gt; environment
  </code></pre>