从应用程序获取消息:无效的选项键:在运行生产模式时出错(raise_on_unfiltered_pa​​rameters =(RuntimeError)错误? [英] Getting Message from application: Invalid option key: raise_on_unfiltered_parameters= (RuntimeError) error while running production mode?

查看:118
本文介绍了从应用程序获取消息:无效的选项键:在运行生产模式时出错(raise_on_unfiltered_pa​​rameters =(RuntimeError)错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试以生产模式在docker内部运行rails应用。

Hi I am trying to run the rails app inside a docker in production mode. it is throwing below error.

Message from application: Invalid option key: raise_on_unfiltered_parameters= (RuntimeError)

因此,我的应用程序服务器未启动,并且出现错误页面。

Because of this my application server is not started and i am getting error page.

Dockerfile:

Dockerfile:

FROM docker.aws.com:443/consumertech/ruby-nginx-lua-anti-scrape:latest

# copy app source
RUN mkdir -p /data/app/my-app
RUN mkdir -p /data/app/my-app/log
RUN mkdir -p /data/app/my-app/tmp

RUN touch /data/app/my-app/dockerized
WORKDIR /data/app/my-app

ARG rails_env

ENV BUILD_ENV $rails_env

COPY . /data/app/my-app
RUN gem install bundler

RUN bundle install --with="production development test"
RUN RAILS_ENV=development bundle exec rake assets:precompile


ENV RAILS_ENV $rails_env
ENV NEW_RELIC_KEY "41dfc2f90fb480fbd4d2df35b77fffde68e42c74"

# unicorn
EXPOSE 3000


# need to start both unicorn and nscd
RUN echo "#!/usr/bin/env sh \n \
service nscd start \n \
unicorn -c ./config/unicorn.rb -E ${RAILS_ENV} -p 3000 \n \
bundle exec passenger start -p 3000 \

" > go.sh


RUN chmod 0755 go.sh

CMD ["./go.sh"]


推荐答案

config / initializers / new_framework_defaults.rb 找到包含 raise_on_unfiltered_pa​​rameters 的行并将其删除。

On the config/initializers/new_framework_defaults.rb find a line that includes raise_on_unfiltered_parameters and delete it.

这篇关于从应用程序获取消息:无效的选项键:在运行生产模式时出错(raise_on_unfiltered_pa​​rameters =(RuntimeError)错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆