title: Rails: Vanilla Rails 6.0 error Command "webpack" not found
body: <h2>System:</h2>
  
  <p>Ruby: 2.6.3p62 (rvm)<br>
  Rails: 6.0<br>
  OS: macOS 10.14.6</p>
  
  <h2>Setup</h2>
  
  <p>A fresh Rails 6.0 application:</p>
  
  <pre><code>$ rails new testshop2
  $ cd testshop2
  $ rails g controller Page index
  $ rails s
  =&gt; Booting Puma
  =&gt; Rails 6.0.0 application starting in development 
  =&gt; Run `rails server --help` for more startup options
  Puma starting in single mode...
  * Version 3.12.1 (ruby 2.6.3-p62), codename: Llamas in Pajamas
  * Min threads: 5, max threads: 5
  * Environment: development
  * Listening on tcp://localhost:3000
  Use Ctrl-C to stop
  </code></pre>
  
  <p>When I browse to `<a href="http://localhost:3000/page/index" rel="noreferrer">http://localhost:3000/page/index</a>' the system throughs this error:</p>
  
  <pre><code>Started GET "/page/index" for ::1 at 2019-09-23 17:06:12 +0200
    (0.4ms)  SELECT sqlite_version(*)
  Processing by PageController#index as HTML
    Rendering page/index.html.erb within layouts/application
    Rendered page/index.html.erb within layouts/application (Duration: 1.8ms | Allocations: 206)
  [Webpacker] Compiling…
  [Webpacker] Compilation failed:
  error Command "webpack" not found.
  
  Completed 500 Internal Server Error in 2021ms (ActiveRecord: 0.0ms | Allocations: 640080)
  
  
  
  ActionView::Template::Error (Webpacker can't find application in /Users/stefan/Github/sandbox/testshop2/public/packs/manifest.json. Possible causes:
  1. You want to set webpacker.yml value of compile to true for your environment
    unless you are using the `webpack -w` or the webpack-dev-server.
  2. webpack has not yet re-run to reflect updates.
  3. You have misconfigured Webpacker's config/webpacker.yml file.
  4. Your webpack configuration is not creating a manifest.
  Your manifest contains:
  {
  }
  ):
      6:     &lt;%= csp_meta_tag %&gt;
      7: 
      8:     &lt;%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %&gt;
      9:     &lt;%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %&gt;
      10:   &lt;/head&gt;
      11: 
      12:   &lt;body&gt;
  
  app/views/layouts/application.html.erb:9
  </code></pre>
  
  <p>How can I fix this? It says <code>error Command "webpack" not found.</code> but shouldn't Rails install everything needed automatically?</p>