redmine4.1service启动报错 shell命令启动正常

xuwei_qiaofeng 2020-10-21 10:40:21
环境:centos7.8
ruby 2.4.9
安装基本参照官方设置

直接用命令启动
/usr/local/rvm/gems/ruby-2.4.9/bin/puma -b tcp://127.0.0.1:9292 -e production



redmine可以正常进入



但是如果把这些写入service文件,通过systemctl start redmine.service启动

[Unit]
Description=Redmine
After=nginx.service
[Service]
Environment=RAILS_ENV=production
Type=simple
WorkingDirectory=/data/wwwroot/redmine
ExecStart=/usr/local/rvm/gems/ruby-2.4.9/bin/puma -b tcp://127.0.0.1:9292 -e production
User=redmine
[Install]
WantedBy=multi-user.target


===错误如下
Oct 21 10:38:41 iZj6c9tbls4i7mkurfz0syZ systemd[1]: Started Redmine.
Oct 21 10:38:41 iZj6c9tbls4i7mkurfz0syZ puma[22210]: /usr/share/rubygems/rubygems/dependency.rb:296:in `to_specs': Could not find 'puma' (>= 0.a) among 6 total gem(s) (Gem::LoadError)
Oct 21 10:38:41 iZj6c9tbls4i7mkurfz0syZ puma[22210]: from /usr/share/rubygems/rubygems/dependency.rb:307:in `to_spec'
Oct 21 10:38:41 iZj6c9tbls4i7mkurfz0syZ puma[22210]: from /usr/share/rubygems/rubygems/core_ext/kernel_gem.rb:47:in `gem'
Oct 21 10:38:41 iZj6c9tbls4i7mkurfz0syZ puma[22210]: from /usr/local/rvm/gems/ruby-2.4.9/bin/puma:25:in `<main>'
Oct 21 10:38:41 iZj6c9tbls4i7mkurfz0syZ puma[22210]: from /usr/bin/ruby_executable_hooks:24:in `eval'
Oct 21 10:38:41 iZj6c9tbls4i7mkurfz0syZ puma[22210]: from /usr/bin/ruby_executable_hooks:24:in `<main>'
Oct 21 10:38:41 iZj6c9tbls4i7mkurfz0syZ systemd[1]: redmine.service: main process exited, code=exited, status=1/FAILURE
Oct 21 10:38:41 iZj6c9tbls4i7mkurfz0syZ systemd[1]: Unit redmine.service entered failed state.
Oct 21 10:38:41 iZj6c9tbls4i7mkurfz0syZ systemd[1]: redmine.service failed.









直接在shell命令启动一切正常,请教一下
...全文
180 回复 打赏 收藏 举报
写回复
回复
切换为时间正序
请发表友善的回复…
发表回复
发帖
Ruby/Rails

2758

社区成员

Web 开发 Ruby/Rails
社区管理员
  • Ruby/Rails社区
加入社区
帖子事件
创建了帖子
2020-10-21 10:40
社区公告
暂无公告