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命令启动一切正常,请教一下
...全文
8132 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

2,763

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Ruby/Rails
社区管理员
  • Ruby/Rails社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧