要解决不要以root身份运行Bundler的问题,您可以按照以下步骤进行操作:
/var/app/current
。gem 'bundler', group: :development
这将在开发环境中安装Bundler gem。 4. 保存并关闭Gemfile文件。 5. 运行以下命令安装Bundler gem:
bundle install --path vendor/bundle
这将安装Bundler gem到您的应用程序的vendor/bundle目录中。 6. 确保您在部署或重新启动应用程序时使用正确的用户身份。推荐的方法是使用配置文件或脚本来设置应用程序的用户身份,而不是使用root用户。 7. 重新部署或重新启动您的应用程序。
通过上述步骤,您应该能够在Elastic Beanstalk上使用Rails 6时避免以root身份运行Bundler。