- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试获取 webpacker
与 docker
合作, puma 3.10.0
, rails 5.1.4
, 和 webpacker 3.0.1
.
我为 docker 设置了以下配置:
Dockerfile
FROM ruby:2.4.1
ENV DIR=/app \
BUNDLE_JOBS=4
RUN curl -sL https://deb.nodesource.com/setup_7.x | bash -
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs openssl yarn
RUN mkdir $DIR
WORKDIR $DIR
ADD Gemfile $DIR/Gemfile
ADD Gemfile.lock $DIR/Gemfile.lock
RUN bundle install
RUN gem install foreman
ADD . $DIR
EXPOSE 3000
ADD docker-entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD bundle exec rails s -p 3000 -b 0.0.0.0
version: "2"
services:
db:
image: postgres
env_file:
- docker.env
webpacker:
build: .
command: bundle exec bin/webpack-dev-server
ports:
- "8080:8080"
app:
build: .
links:
- db:db
ports:
- "3000:3000"
depends_on:
- db
- webpacker
env_file:
- docker.env
command: bundle exec rails s -p 3000 -b '0.0.0.0'
docker-compose up
并访问
localhost:3000
,我收到以下错误:
#<Errno::EADDRNOTAVAIL: Cannot assign requested address - connect(2) for [::1]:3035>
webpacker_1 |
webpacker_1 | Project is running at http://localhost:3035/
webpacker_1 | webpack output is served from /packs/
webpacker_1 | Content not from webpack is served from /app/public/packs
webpacker_1 | 404s will fallback to /index.html
webpacker_1 | Running /app/node_modules/.bin/elm-make /app/app/javascript/packs/Main.elm --yes --warn --debug --output /tmp/117813-1-17kg4e0.13yc01wcdi.js
webpacker_1 | 14% building modules 40/57 Success! Compiled 1 module./lib/transport/xhr-streaming.js
webpacker_1 | Successfully generated /tmp/117813-1-17kg4e0.13yc01wcdi.js
webpacker_1 |
94% asset optimHash: 0fba3c9f83d08f099017
webpacker_1 | Version: webpack 3.5.6
webpacker_1 | Time: 4214ms
webpacker_1 | Asset Size Chunks Chunk Names
webpacker_1 | hello_elm-a49ad0a3ed48411416eb.js 1.87 MB 0 [emitted] [big] hello_elm
webpacker_1 | Main-f0a26307d1db1882a32b.js 1.87 MB 1 [emitted] [big] Main
webpacker_1 | application-963cd78993444428f61c.js 896 kB 2 [emitted] [big] application
webpacker_1 | manifest.json 182 bytes [emitted]
webpacker_1 | [34] (webpack)-dev-server/client?http://localhost:3035 5.83 kB {0} {1} {2} [built]
webpacker_1 | [35] ./node_modules/url/url.js 23.3 kB {0} {1} {2} [built]
webpacker_1 | [41] ./node_modules/strip-ansi/index.js 161 bytes {0} {1} {2} [built]
webpacker_1 | [43] ./node_modules/loglevel/lib/loglevel.js 7.74 kB {0} {1} {2} [built]
webpacker_1 | [44] (webpack)-dev-server/client/socket.js 856 bytes {0} {1} {2} [built]
webpacker_1 | [45] ./node_modules/sockjs-client/lib/entry.js 244 bytes {0} {1} {2} [built]
webpacker_1 | [77] (webpack)-dev-server/client/overlay.js 3.6 kB {0} {1} {2} [built]
webpacker_1 | [82] (webpack)/hot nonrecursive ^\.\/log$ 170 bytes {0} {1} {2} [built]
webpacker_1 | [84] (webpack)/hot/emitter.js 77 bytes {0} {1} {2} [built]
webpacker_1 | [86] ./app/javascript/packs/Main.elm 335 kB {0} {1} [built]
webpacker_1 | [87] multi (webpack)-dev-server/client?http://localhost:3035 ./app/javascript/packs/application.js 40 bytes {2} [built]
webpacker_1 | [88] ./app/javascript/packs/application.js 515 bytes {2} [built]
webpacker_1 | [89] multi (webpack)-dev-server/client?http://localhost:3035 ./app/javascript/packs/hello_elm.js 40 bytes {0} [built]
webpacker_1 | [90] ./app/javascript/packs/hello_elm.js 396 bytes {0} [built]
webpacker_1 | [91] multi (webpack)-dev-server/client?http://localhost:3035 ./app/javascript/packs/Main.elm 40 bytes {1} [built]
webpacker_1 | + 77 hidden modules
webpacker_1 | webpack: Compiled successfully.
webpacker_1 | Project is running at http://localhost:3035/
webpacker_1 | webpack output is served from /packs/
webpacker_1 | Content not from webpack is served from /app/public/packs
webpacker_1 | 404s will fallback to /index.html
webpacker_1 | Running /app/node_modules/.bin/elm-make /app/app/javascript/packs/Main.elm --yes --warn --debug --output /tmp/117813-1-1lm55js.r9mkgzm2t9.js
webpacker_1 | 14% building modules 40/57 modules 17 active ...ockjsSuccess! Compiled 1 module.et.js
webpacker_1 | Successfully generated /tmp/117813-1-1lm55js.r9mkgzm2t9.js
webpacker_1 |
92% chunk assetHash: 0fba3c9f83d08f099017
webpacker_1 | Version: webpack 3.5.6
webpacker_1 | Time: 3059ms
webpacker_1 | Asset Size Chunks Chunk Names
webpacker_1 | hello_elm-a49ad0a3ed48411416eb.js 1.87 MB 0 [emitted] [big] hello_elm
webpacker_1 | Main-f0a26307d1db1882a32b.js 1.87 MB 1 [emitted] [big] Main
webpacker_1 | application-963cd78993444428f61c.js 896 kB 2 [emitted] [big] application
webpacker_1 | manifest.json 182 bytes [emitted]
webpacker_1 | [34] (webpack)-dev-server/client?http://localhost:3035 5.83 kB {0} {1} {2} [built]
webpacker_1 | [35] ./node_modules/url/url.js 23.3 kB {0} {1} {2} [built]
webpacker_1 | [41] ./node_modules/strip-ansi/index.js 161 bytes {0} {1} {2} [built]
webpacker_1 | [43] ./node_modules/loglevel/lib/loglevel.js 7.74 kB {0} {1} {2} [built]
webpacker_1 | [44] (webpack)-dev-server/client/socket.js 856 bytes {0} {1} {2} [built]
webpacker_1 | [45] ./node_modules/sockjs-client/lib/entry.js 244 bytes {0} {1} {2} [built]
webpacker_1 | [77] (webpack)-dev-server/client/overlay.js 3.6 kB {0} {1} {2} [built]
webpacker_1 | [82] (webpack)/hot nonrecursive ^\.\/log$ 170 bytes {0} {1} {2} [built]
webpacker_1 | [84] (webpack)/hot/emitter.js 77 bytes {0} {1} {2} [built]
webpacker_1 | [86] ./app/javascript/packs/Main.elm 335 kB {0} {1} [built]
webpacker_1 | [87] multi (webpack)-dev-server/client?http://localhost:3035 ./app/javascript/packs/application.js 40 bytes {2} [built]
webpacker_1 | [88] ./app/javascript/packs/application.js 515 bytes {2} [built]
webpacker_1 | [89] multi (webpack)-dev-server/client?http://localhost:3035 ./app/javascript/packs/hello_elm.js 40 bytes {0} [built]
webpacker_1 | [90] ./app/javascript/packs/hello_elm.js 396 bytes {0} [built]
webpacker_1 | [91] multi (webpack)-dev-server/client?http://localhost:3035 ./app/javascript/packs/Main.elm 40 bytes {1} [built]
webpacker_1 | + 77 hidden modules
webpacker_1 | webpack: Compiled successfully.
webpacker_1 | Project is running at http://localhost:3035/
webpacker_1 | webpack output is served from /packs/
webpacker_1 | Content not from webpack is served from /app/public/packs
webpacker_1 | 404s will fallback to /index.html
webpacker_1 | Running /app/node_modules/.bin/elm-make /app/app/javascript/packs/Main.elm --yes --warn --debug --output /tmp/117813-1-1pnkvvy.kvz0s2x1or.js
webpacker_1 | 14% buiSuccess! Compiled 1 module. 17 active ...s-client/lib/transport/xdr-polling.js
webpacker_1 | Successfully generated /tmp/117813-1-1pnkvvy.kvz0s2x1or.js
webpacker_1 |
webpack 92% chunk assetHash: 0fba3c9f83d08f099017
webpacker_1 | Version: webpack 3.5.6
webpacker_1 | Time: 3705ms
webpacker_1 | Asset Size Chunks Chunk Names
webpacker_1 | hello_elm-a49ad0a3ed48411416eb.js 1.87 MB 0 [emitted] [big] hello_elm
webpacker_1 | Main-f0a26307d1db1882a32b.js 1.87 MB 1 [emitted] [big] Main
webpacker_1 | application-963cd78993444428f61c.js 896 kB 2 [emitted] [big] application
webpacker_1 | manifest.json 182 bytes [emitted]
webpacker_1 | [34] (webpack)-dev-server/client?http://localhost:3035 5.83 kB {0} {1} {2} [built]
webpacker_1 | [35] ./node_modules/url/url.js 23.3 kB {0} {1} {2} [built]
webpacker_1 | [41] ./node_modules/strip-ansi/index.js 161 bytes {0} {1} {2} [built]
webpacker_1 | [43] ./node_modules/loglevel/lib/loglevel.js 7.74 kB {0} {1} {2} [built]
webpacker_1 | [44] (webpack)-dev-server/client/socket.js 856 bytes {0} {1} {2} [built]
webpacker_1 | [45] ./node_modules/sockjs-client/lib/entry.js 244 bytes {0} {1} {2} [built]
webpacker_1 | [77] (webpack)-dev-server/client/overlay.js 3.6 kB {0} {1} {2} [built]
webpacker_1 | [82] (webpack)/hot nonrecursive ^\.\/log$ 170 bytes {0} {1} {2} [built]
webpacker_1 | [84] (webpack)/hot/emitter.js 77 bytes {0} {1} {2} [built]
webpacker_1 | [86] ./app/javascript/packs/Main.elm 335 kB {0} {1} [built]
webpacker_1 | [87] multi (webpack)-dev-server/client?http://localhost:3035 ./app/javascript/packs/application.js 40 bytes {2} [built]
webpacker_1 | [88] ./app/javascript/packs/application.js 515 bytes {2} [built]
webpacker_1 | [89] multi (webpack)-dev-server/client?http://localhost:3035 ./app/javascript/packs/hello_elm.js 40 bytes {0} [built]
webpacker_1 | [90] ./app/javascript/packs/hello_elm.js 396 bytes {0} [built]
webpacker_1 | [91] multi (webpack)-dev-server/client?http://localhost:3035 ./app/javascript/packs/Main.elm 40 bytes {1} [built]
webpacker_1 | + 77 hidden modules
webpacker_1 | webpack: Compiled successfully.
app_1 | DEPRECATION WARNING: ActionView::Template::Handlers::Erubis is deprecated and will be removed from Rails 5.2. Switch to ActionView::Template::Handlers::ERB::Erubi instead. (called from require at /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.1/lib/bundler/runtime.rb:82)
app_1 | W, [2017-09-13T15:44:45.382875 #1] WARN -- : [SKYLIGHT] [1.3.1] Running Skylight in development mode. No data will be reported until you deploy your app.
app_1 | (To disable this message for all local apps, run `skylight disable_dev_warning`.)
app_1 | /app/app/models/test_attempts/context_test_attempt.rb:86: warning: circular argument reference - ability_estimate
app_1 | => Booting Puma
app_1 | => Rails 5.1.4 application starting in development
app_1 | => Run `rails server -h` for more startup options
app_1 | Puma starting in single mode...
app_1 | * Version 3.10.0 (ruby 2.4.1-p111), codename: Russell's Teapot
app_1 | * Min threads: 5, max threads: 5
app_1 | * Environment: development
app_1 | * Listening on tcp://0.0.0.0:3000
app_1 | Use Ctrl-C to stop
app_1 | Started GET "/" for 172.18.0.1 at 2017-09-13 15:44:56 +0000
app_1 | Cannot render console from 172.18.0.1! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
app_1 | (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
app_1 | Processing by PagesController#index as HTML
app_1 | (0.3ms) BEGIN
app_1 | (0.3ms) ROLLBACK
app_1 | Rendering layouts/application.html.haml
app_1 | Rendering pages/index.html.haml within layouts/application
app_1 | Rendered pages/index.html.haml within layouts/application (78.9ms)
app_1 | Rendered shared/_head.html.haml (37895.2ms)
app_1 | Rendered shared/_flash.html.haml (1.0ms)
app_1 | Rendered shared/_header.html.haml (39.9ms)
app_1 | Rendered shared/_footer.html.haml (16.0ms)
app_1 | Rendered shared/_analytics.html.haml (0.9ms)
app_1 | Rendered layouts/application.html.haml (38089.9ms)
app_1 | Completed 200 OK in 38677ms (Views: 38152.2ms | ActiveRecord: 7.0ms)
app_1 |
app_1 |
app_1 | 2017-09-13 15:45:35 +0000: Rack app error handling request { GET / }
app_1 | #<Errno::EADDRNOTAVAIL: Cannot assign requested address - connect(2) for [::1]:3035>
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:1198:in `__connect_nonblock'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:1198:in `connect_nonblock'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:56:in `connect_internal'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:137:in `connect'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:627:in `block in tcp'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:227:in `each'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:227:in `foreach'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:617:in `tcp'
app_1 | /usr/local/bundle/gems/webpacker-3.0.1/lib/webpacker/dev_server.rb:9:in `running?'
app_1 | /usr/local/bundle/gems/webpacker-3.0.1/lib/webpacker/dev_server_proxy.rb:7:in `rewrite_response'
app_1 | /usr/local/bundle/gems/rack-proxy-0.6.2/lib/rack/proxy.rb:57:in `call'
app_1 | /usr/local/bundle/gems/railties-5.1.4/lib/rails/engine.rb:522:in `call'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/configuration.rb:225:in `call'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:605:in `handle_request'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:437:in `process_client'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:301:in `block in run'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/thread_pool.rb:120:in `block in spawn_thread'
app_1 | 2017-09-13 15:45:35 +0000: Rack app error handling request { GET /favicon.ico }
app_1 | #<Errno::EADDRNOTAVAIL: Cannot assign requested address - connect(2) for [::1]:3035>
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:1198:in `__connect_nonblock'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:1198:in `connect_nonblock'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:56:in `connect_internal'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:137:in `connect'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:627:in `block in tcp'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:227:in `each'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:227:in `foreach'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:617:in `tcp'
app_1 | /usr/local/bundle/gems/webpacker-3.0.1/lib/webpacker/dev_server.rb:9:in `running?'
app_1 | /usr/local/bundle/gems/webpacker-3.0.1/lib/webpacker/dev_server_proxy.rb:7:in `rewrite_response'
app_1 | /usr/local/bundle/gems/rack-proxy-0.6.2/lib/rack/proxy.rb:57:in `call'
app_1 | /usr/local/bundle/gems/railties-5.1.4/lib/rails/engine.rb:522:in `call'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/configuration.rb:225:in `call'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:605:in `handle_request'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:437:in `process_client'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:301:in `block in run'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/thread_pool.rb:120:in `block in spawn_thread'
app_1 | Started GET "/" for 172.18.0.1 at 2017-09-13 15:45:51 +0000
app_1 | Cannot render console from 172.18.0.1! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
app_1 | Processing by PagesController#index as HTML
app_1 | (0.2ms) BEGIN
app_1 | (0.2ms) ROLLBACK
app_1 | Rendering layouts/application.html.haml
app_1 | Rendering pages/index.html.haml within layouts/application
app_1 | Rendered shared/_locked_flash.html.haml (1.2ms)
app_1 | Rendered pages/index.html.haml within layouts/application (15.5ms)
app_1 | Rendered shared/_head.html.haml (164.7ms)
app_1 | Rendered shared/_flash.html.haml (1.2ms)
app_1 | Rendered shared/_header.html.haml (20.2ms)
app_1 | Rendered shared/_footer.html.haml (8.1ms)
app_1 | Rendered shared/_analytics.html.haml (1.0ms)
app_1 | Rendered layouts/application.html.haml (253.2ms)
app_1 | Completed 200 OK in 294ms (Views: 269.1ms | ActiveRecord: 5.4ms)
app_1 |
app_1 |
app_1 | 2017-09-13 15:45:51 +0000: Rack app error handling request { GET / }
app_1 | #<Errno::EADDRNOTAVAIL: Cannot assign requested address - connect(2) for [::1]:3035>
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:1198:in `__connect_nonblock'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:1198:in `connect_nonblock'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:56:in `connect_internal'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:137:in `connect'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:627:in `block in tcp'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:227:in `each'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:227:in `foreach'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:617:in `tcp'
app_1 | /usr/local/bundle/gems/webpacker-3.0.1/lib/webpacker/dev_server.rb:9:in `running?'
app_1 | /usr/local/bundle/gems/webpacker-3.0.1/lib/webpacker/dev_server_proxy.rb:7:in `rewrite_response'
app_1 | /usr/local/bundle/gems/rack-proxy-0.6.2/lib/rack/proxy.rb:57:in `call'
app_1 | /usr/local/bundle/gems/railties-5.1.4/lib/rails/engine.rb:522:in `call'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/configuration.rb:225:in `call'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:605:in `handle_request'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:437:in `process_client'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:301:in `block in run'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/thread_pool.rb:120:in `block in spawn_thread'
app_1 | 2017-09-13 15:45:51 +0000: Rack app error handling request { GET /favicon.ico }
app_1 | #<Errno::EADDRNOTAVAIL: Cannot assign requested address - connect(2) for [::1]:3035>
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:1198:in `__connect_nonblock'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:1198:in `connect_nonblock'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:56:in `connect_internal'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:137:in `connect'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:627:in `block in tcp'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:227:in `each'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:227:in `foreach'
app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:617:in `tcp'
app_1 | /usr/local/bundle/gems/webpacker-3.0.1/lib/webpacker/dev_server.rb:9:in `running?'
app_1 | /usr/local/bundle/gems/webpacker-3.0.1/lib/webpacker/dev_server_proxy.rb:7:in `rewrite_response'
app_1 | /usr/local/bundle/gems/rack-proxy-0.6.2/lib/rack/proxy.rb:57:in `call'
app_1 | /usr/local/bundle/gems/railties-5.1.4/lib/rails/engine.rb:522:in `call'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/configuration.rb:225:in `call'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:605:in `handle_request'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:437:in `process_client'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:301:in `block in run'
app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/thread_pool.rb:120:in `block in spawn_thread'
Puma caught this error: Cannot assign requested address - connect(2) for [::1]:3035 (Errno::EADDRNOTAVAIL)
/usr/local/lib/ruby/2.4.0/socket.rb:1198:in `__connect_nonblock'
/usr/local/lib/ruby/2.4.0/socket.rb:1198:in `connect_nonblock'
/usr/local/lib/ruby/2.4.0/socket.rb:56:in `connect_internal'
/usr/local/lib/ruby/2.4.0/socket.rb:137:in `connect'
/usr/local/lib/ruby/2.4.0/socket.rb:627:in `block in tcp'
/usr/local/lib/ruby/2.4.0/socket.rb:227:in `each'
/usr/local/lib/ruby/2.4.0/socket.rb:227:in `foreach'
/usr/local/lib/ruby/2.4.0/socket.rb:617:in `tcp'
/usr/local/bundle/gems/webpacker-3.0.1/lib/webpacker/dev_server.rb:9:in `running?'
/usr/local/bundle/gems/webpacker-3.0.1/lib/webpacker/dev_server_proxy.rb:7:in `rewrite_response'
/usr/local/bundle/gems/rack-proxy-0.6.2/lib/rack/proxy.rb:57:in `call'
/usr/local/bundle/gems/railties-5.1.4/lib/rails/engine.rb:522:in `call'
/usr/local/bundle/gems/puma-3.10.0/lib/puma/configuration.rb:225:in `call'
/usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:605:in `handle_request'
/usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:437:in `process_client'
/usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:301:in `block in run'
/usr/local/bundle/gems/puma-3.10.0/lib/puma/thread_pool.rb:120:in `block in spawn_thread'
最佳答案
您需要设置 --listen-host
传递给 webpack-dev-server
的值.
您可以通过编辑文件 config/webpacker.yml
来实现此目的。并更改 development:dev_server:host:
值来自 localhost
至 0.0.0.0
,应该可以解决问题。
关于ruby-on-rails - Rails、Webpacker 和 Docker:无法分配请求的地址 - connect(2) for [::1]:3035,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46188242/
像这样的webpack.config.js文件可以导出多个配置: module.exports = [{entry: 'a.js'}, {entry: 'b.js'}]; 当我调用 webpack 时
我正在尝试在 webpack 配置文件中设置 browserslist,但不知道如何执行此操作。 在 webpack.config 中尝试了以下内容: 'use strict'; module.exp
If you are using webpack v5 or above you do not need to install this plugin. Webpack v5 comes with t
使用webpack 2时,为什么需要以相反的顺序为“use:”键添加加载程序?为什么不从头到尾,从左到右列出每个加载器?有什么理由吗? 最佳答案 看起来像是一种约定,它很容易成为匹配执行顺序和源顺序的
当我 web pack 的时候 --watch --config webpack.production.config.js --mode production 我有这个错误: ERROR in Typ
我有一个使用 Twig 进行模板的项目。其中的所有数据都是静态的,但为了清楚起见,我已经在其他 Twig 文件中分离出部分页面(否则一个文件中会有数百行标记)。 我使用 webpack 作为构建工具,
我使用 cli 创建了一个 vue.js 项目。我使用了 webpack 模板。我已经为此工作了几天,并且工作顺利。 现在我需要向项目添加一个 npm 包。这个包建议我对 webpack 配置进行一些
我正在使用运行“node_modules/.bin/webpack”,但我知道可以配置路径以便您只需键入“webpack ”。不过,我找不到方法。 :/ 最佳答案 如果你安装一个包 globally
我正在服务器渲染我的 react 应用程序,如下所示: export default ({ clientStats }: { clientStats: any }) => async (req: Re
我试过包含一个通配符,它破坏了构建;和多个 favicon字段条目,它只使用最后一个输入。我如何支持使用此插件包含多个网站图标文件? 最佳答案 您还需要包括 favicons-webpack-pl
我正在使用 webpack 编译我的 Reactjs 文件。在我的项目中,我需要对后端进行 API 调用。 现在我有 3 个环境,分别是本地环境、开发环境和生产环境。 所以我有一个constants.
我正在将所有文件构建到“dist”文件夹中。 Dist ->index.html ->bundle.js 我已将配置设置为在我需要的特定端口上运行。 { entry: './src/ind
我想使用由 Closure Compiler 使用 Webpack 生成的 SourceMap,但我不知道该怎么做。 这是我的 webpack 配置: const ClosureCompiler =
有没有办法接收当前文件路径,就像在 requirejs 中一样? define(['module'], function (module) { console.log(module.uri)
关闭。这个问题需要更多focused .它目前不接受答案。 想改善这个问题吗?更新问题,使其仅关注一个问题 editing this post . 4年前关闭。 Improve this questi
我是 webpack 的初学者用户。我想写一个webpack.config.js建立我的项目。但是有什么不对的地方! 这是我的 package.json (已安装所有依赖项): { "name":
我从这里开始:https://github.com/vuejs/vue-cli 我不确定它是否使用 Webpack。 包含/使用 webpack 的项目将包含哪些文件? 最佳答案 如果您的项目正在使用
Webpack,你将要了我的命。 html-webpack-plugin 在生产中运行良好。 'dist' 文件夹加载了我的 html 模板和插入的包。好酷。 但是,webpack-dev-serve
想象一下我有一个这样的项目: /moduleA/src... /moduleB/src... /mainApp/src... 每个模块和主应用程序都有一个单独的 webpack.config。模块是库
根据 webpack 文档,我尝试将 UglifyJSPlugin 添加到 webpack 4 项目中,但我仍然在我的包中看到死代码甚至注释,这让我认为我的 uglify 插件配置没有被使用。 Lin
我是一名优秀的程序员,十分优秀!