Skip to content

systemd: Neither a valid executable name nor an absolute path error because of ExecStart #313

Description

@steverob

Capistrano::Puma::Systemd is generating a systemd file for Puma with the below ExecStart value which uses the $HOME env var:

ExecStart=$HOME/.rbenv/bin/rbenv exec bundle exec puma -C /home/ubuntu/app/shared/puma.rb

This is causing the following error:

systemd/system/puma.service:9: Neither a valid executable name nor an absolute path: $HOME/.rbenv/bin/rbenv
service: Unit configuration has fatal error, unit will not be started.

Going through systemd's manpage, it does say we need to use an absolute path for ExecStart: (https://man7.org/linux/man-pages/man5/systemd.service.5.html)

For each of the specified commands, the first argument must be either an absolute path...

Systemd version:

ubuntu@ip-172-31-86-176:/etc/systemd$ systemctl --version
systemd 245 (245.4-4ubuntu3.2)
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid

Ubuntu version: Linux ip-172-31-86-176 5.4.0-1029-aws #30-Ubuntu SMP Tue Oct 20 10:06:38 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions