Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Asset paths returning 404 #324

Closed
nrcook opened this issue Mar 25, 2017 · 2 comments
Closed

Asset paths returning 404 #324

nrcook opened this issue Mar 25, 2017 · 2 comments

Comments

@nrcook
Copy link

nrcook commented Mar 25, 2017

I pulled down Buffalo and tried to get the default page up and running. No other config changes other than database.yml (which worked great). buffalo new and buffalo dev both run fine, no errors thrown. We visiting localhost:3000 the page shows, but no assets (CSS, JS, or images) are loading. Console shows they are returning 404.

Webpack seems like it is working?

Hash: 64de76e2fdcd697847a9
Version: webpack 2.3.2
Time: 4599ms
                                 Asset     Size  Chunks                    Chunk Names
  e18bbf611f2a2e43afc071aa2f4e1512.ttf  45.4 kB          [emitted]
  f4769f9bdb7466be65088239c12046d1.eot  20.1 kB          [emitted]
 fa2772327f55d8198301fdb8bcfc8158.woff  23.4 kB          [emitted]
448c34a56d699c29117adc64c43affeb.woff2    18 kB          [emitted]
af7ae505a9eed503f8b8e6982036873e.woff2  77.2 kB          [emitted]
 fee66e712a8a08eef5805a46892932ad.woff    98 kB          [emitted]
  674f50d287a8c48dc19ba404d20fe713.eot   166 kB          [emitted]
  b06871f281fee6b241d60582ae9369b9.ttf   166 kB          [emitted]
  89889688147bd7575d6327160d64e760.svg   109 kB          [emitted]
  912ec66d7572ff821749319396470bde.svg   444 kB          [emitted]  [big]
                        application.js   365 kB       0  [emitted]  [big]  main
                       application.css   183 kB       0  [emitted]         main
                       images/logo.svg    66 kB          [emitted]
   [0] (webpack)/buildin/global.js 509 bytes {0} [built]
   [1] ./~/jquery/dist/jquery.js 77 bytes {0} [built]
   [2] ./~/jquery/dist/jquery.js 268 kB {0} [built]
   [3] ./assets/js/application.js 112 bytes {0} [built]
   [4] ./assets/css/application.scss 41 bytes {0} [built]
   [5] ./~/jquery-ujs/src/rails.js 21.6 kB {0} [built]
   [6] ./~/bootstrap/dist/js/bootstrap.js 69.7 kB {0} [built]
   [7] ./~/expose-loader?$!./~/expose-loader?jQuery!./~/jquery/dist/jquery.js 260 bytes {0} [built]
  [10] ./~/expose-loader?jQuery!./~/expose-loader?jQuery!./~/expose-loader?$!./~/jquery/dist/jquery.js 244 bytes {0} [built]
  [11] multi ./assets/js/application.js ./assets/css/application.scss ./~/jquery-ujs/src/rails.js 52 bytes {0} [built]
  [14] ./~/css-loader?{"sourceMap":true}!./~/bootstrap/dist/css/bootstrap.css 357 kB [built]
  [16] ./~/css-loader?{"sourceMap":true}!./~/sass-loader/lib/loader.js?{"sourceMap":true}!./assets/css/application.scss 502 bytes [built]
  [17] ./~/css-loader/lib/css-base.js 2.19 kB [built]
  [23] ./~/style-loader/addStyles.js 8.51 kB [built]
  [24] ./~/style-loader/fixUrls.js 3.01 kB [built]
    + 18 hidden modules
Child extract-text-webpack-plugin:
       [0] ./~/css-loader/lib/css-base.js 2.19 kB {0} [built]
       [1] ./~/bootstrap/dist/fonts/glyphicons-halflings-regular.eot 82 bytes {0} [built]
       [2] ./~/css-loader?{"sourceMap":true}!./~/bootstrap/dist/css/bootstrap.css 357 kB {0} [built]
       [3] ./~/css-loader?{"sourceMap":true}!./~/font-awesome/css/font-awesome.css 101 kB {0} [built]
       [5] ./~/buffer/index.js 48.6 kB {0} [built]
       [6] ./~/css-loader?{"sourceMap":true}!./~/sass-loader/lib/loader.js?{"sourceMap":true}!./assets/css/application.scss 502 bytes {0} [built]
       [7] ./~/font-awesome/fonts/fontawesome-webfont.eot 82 bytes {0} [built]
       [8] ./~/font-awesome/fonts/fontawesome-webfont.eot?v=4.7.0 82 bytes {0} [built]
      [12] ./~/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2 84 bytes {0} [built]
      [13] ./~/font-awesome/fonts/fontawesome-webfont.woff2?v=4.7.0 84 bytes {0} [built]
      [14] ./~/font-awesome/fonts/fontawesome-webfont.woff?v=4.7.0 83 bytes {0} [built]
      [15] ./~/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf 82 bytes {0} [built]
      [16] ./~/font-awesome/fonts/fontawesome-webfont.ttf?v=4.7.0 82 bytes {0} [built]
      [17] ./~/bootstrap/dist/fonts/glyphicons-halflings-regular.svg 82 bytes {0} [built]
      [18] ./~/font-awesome/fonts/fontawesome-webfont.svg?v=4.7.0 82 bytes {0} [built]
        + 5 hidden modules

2017-03-25 at 8 53 am

I've tried wiping out the project and starting again, updating npm, all with the same result. Did I miss a step on install??

Great project BTW, really looking forward to digging into it more!

@markbates
Copy link
Member

Confirmed. Fix forth coming.

@markbates
Copy link
Member

To fix change line 13 of webpack.config.js to:

    path: __dirname + "/public/assets"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants