【发布时间】:2017-12-28 21:56:22
【问题描述】:
我正在尝试安装和运行 puma。
我的 gemfile 有本地提取的 gem(服务器无法访问互联网,捆绑器是通过 gem install 安装的):
gem 'rack', '=2.0.3', :path => "/opt/app-root/src/gems/rack-2.0.3"
gem 'puma', '=3.11.0', :path => "/opt/app-root/src/gems/puma-3.11.0"
我像这样运行 bundle:
bundle install --local --path ./bundle --deployment
产生:
Using bundler 1.16.1
Using puma 3.11.0 from source at `/opt/app-root/src/gems/puma-3.11.0`
Using rack 2.0.3 from source at `/opt/app-root/src/gems/rack-2.0.3`
Bundle complete! 2 Gemfile dependencies, 3 gems now installed.
Bundled gems are installed into `./bundle`
然后运行:
bundle exec "puma --config puma.cfg"
产生缺少分机的问题:
/opt/app-root/src/gems/puma-3.11.0/lib/puma/server.rb:15:in `require': cannot load such file -- puma/puma_http11 (LoadError)
from /opt/app-root/src/gems/puma-3.11.0/lib/puma/server.rb:15:in `<top (required)>'
from /opt/app-root/src/gems/puma-3.11.0/lib/puma/runner.rb:1:in `require'
from /opt/app-root/src/gems/puma-3.11.0/lib/puma/runner.rb:1:in `<top (required)>'
from /opt/app-root/src/gems/puma-3.11.0/lib/puma/cluster.rb:1:in `require'
from /opt/app-root/src/gems/puma-3.11.0/lib/puma/cluster.rb:1:in `<top (required)>'
from /opt/app-root/src/gems/puma-3.11.0/lib/puma/launcher.rb:4:in `require'
from /opt/app-root/src/gems/puma-3.11.0/lib/puma/launcher.rb:4:in `<top (required)>'
from /opt/app-root/src/gems/puma-3.11.0/lib/puma/cli.rb:5:in `require'
from /opt/app-root/src/gems/puma-3.11.0/lib/puma/cli.rb:5:in `<top (required)>'
from /opt/app-root/src/gems/puma-3.11.0/bin/puma:6:in `require'
from /opt/app-root/src/gems/puma-3.11.0/bin/puma:6:in `<top (required)>'
from /opt/app-root/src/ruby/vendor/bundle/ruby/2.4.0/bin/puma:22:in `load'
from /opt/app-root/src/ruby/vendor/bundle/ruby/2.4.0/bin/puma:22:in `<main>'
我可以找到关于这个问题的信息很少,除了这个帖子 https://github.com/bundler/bundler/issues/5398 可能是也可能不是类似的问题 - 但我不知道如何解决它(重新运行 bundler install 对我没有帮助!)
顺便说一句,ext 出现在提取的 gem 中,正如您所期望的那样:
opt/app-root/src/gems/puma-3.11.0/ext/puma_http11
【问题讨论】: