ruby-on-rails - Jelastic CMD /入口点中的bundle exec puma错误
问题描述
我有一个包含 Ruby on Rails 应用程序并使用 Puma 服务器的 docker 映像。
我遇到以下问题...
当我使用CMD / 入口点中的bundle exec puma命令 在Jelastic中部署图像时,run.log 文件向我显示以下错误:
bundler error: command not found: puma
Install missing gem executables with bundle install
但是,如果我通过 ssh 连接到 docker 容器并执行完全相同的命令bundle exec puma(没有exec bundle install),puma 服务器将正确启动。
在 Gemfile 文件和 Gemfile.lock 我有 puma gem。
Dockerfile:
FROM ruby:2.7.1
WORKDIR /root/app
##### throw errors if Gemfile has been modified since Gemfile.lock
RUN bundle config --global frozen 1
RUN apt-get update -qq && apt-get install -y nodejs postgresql-client
COPY Gemfile Gemfile.lock ./
RUN bundle config set deployment 'true'
RUN bundle config set path 'vendor/bundle'
RUN bundle config set without 'development:test'
RUN bundle install -j4
COPY . .
RUN rake assets:precompile
CMD sh bin/web
垃圾箱/网络:
bundle exec puma
有什么建议么?
谢谢
解决方案
推荐阅读
- list - API 工作但返回类名的实例
- java - 用于轻松生成 xpath 的类
- c# - 如何将一堆 json 文件合并到一个大文件中?
- java - Java:有没有转换ArrayList的方法
到 boolean[] (原始数组)? - flutter - Flutter,第二个动画控制器没有动画,为什么?
- c# - 使用相同库 api 的 Rabbitmq 的性能非常不同(python3 与 dotnet)
- perl - 在perl中没有数组的情况下以相反的顺序搜索段落
- regex - 如何使用 PowerShell 实例化对象并设置成员字段?
- java - 点燃缓存事务强制回滚
- python - 将多列拆分为新行