ddollar / foreman

Manage Procfile-based applications

Home Page:http://ddollar.github.com/foreman

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

foreman export systemd raises undefined method `exists?' for File:Class (NoMethodError)

snex opened this issue · comments

> foreman export systemd /home/snex/

/home/snex/.rvm/gems/ruby-3.2.1@xpg/gems/foreman-0.87.2/lib/foreman/export/base.rb:86:in `rescue in chown': undefined method `exists?' for File:Class (NoMethodError)
    error("Could not chown #{dir} to #{user}") unless File.writable?(dir) || ! File.exists?(dir)
                                                                                   ^^^^^^^^
Did you mean?  exist?
	from /home/snex/.rvm/gems/ruby-3.2.1@xpg/gems/foreman-0.87.2/lib/foreman/export/base.rb:83:in `chown'
	from /home/snex/.rvm/gems/ruby-3.2.1@xpg/gems/foreman-0.87.2/lib/foreman/export/base.rb:49:in `export'
	from /home/snex/.rvm/gems/ruby-3.2.1@xpg/gems/foreman-0.87.2/lib/foreman/export/systemd.rb:7:in `export'
	from /home/snex/.rvm/gems/ruby-3.2.1@xpg/gems/foreman-0.87.2/lib/foreman/cli.rb:62:in `export'
	from /home/snex/.rvm/gems/ruby-3.2.1@xpg/gems/foreman-0.87.2/lib/foreman/vendor/thor/lib/thor/command.rb:27:in `run'
	from /home/snex/.rvm/gems/ruby-3.2.1@xpg/gems/foreman-0.87.2/lib/foreman/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
	from /home/snex/.rvm/gems/ruby-3.2.1@xpg/gems/foreman-0.87.2/lib/foreman/vendor/thor/lib/thor.rb:369:in `dispatch'
	from /home/snex/.rvm/gems/ruby-3.2.1@xpg/gems/foreman-0.87.2/lib/foreman/vendor/thor/lib/thor/base.rb:444:in `start'
	from /home/snex/.rvm/gems/ruby-3.2.1@xpg/gems/foreman-0.87.2/bin/foreman:7:in `<top (required)>'
	from /home/snex/.rvm/gems/ruby-3.2.1@xpg/bin/foreman:25:in `load'
	from /home/snex/.rvm/gems/ruby-3.2.1@xpg/bin/foreman:25:in `<main>'
	from /home/snex/.rvm/gems/ruby-3.2.1@xpg/bin/ruby_executable_hooks:22:in `eval'
	from /home/snex/.rvm/gems/ruby-3.2.1@xpg/bin/ruby_executable_hooks:22:in `<main>'
/home/snex/.rvm/rubies/ruby-3.2.1/lib/ruby/3.2.0/fileutils.rb:1954:in `getpwnam': can't find user for app (ArgumentError)

      Etc.getpwnam(user) ? Etc.getpwnam(user).uid : nil
                   ^^^^
	from /home/snex/.rvm/rubies/ruby-3.2.1/lib/ruby/3.2.0/fileutils.rb:1954:in `fu_get_uid'
	from /home/snex/.rvm/rubies/ruby-3.2.1/lib/ruby/3.2.0/fileutils.rb:1914:in `chown'
	from /home/snex/.rvm/gems/ruby-3.2.1@xpg/gems/foreman-0.87.2/lib/foreman/export/base.rb:84:in `chown'
	from /home/snex/.rvm/gems/ruby-3.2.1@xpg/gems/foreman-0.87.2/lib/foreman/export/base.rb:49:in `export'
	from /home/snex/.rvm/gems/ruby-3.2.1@xpg/gems/foreman-0.87.2/lib/foreman/export/systemd.rb:7:in `export'
	from /home/snex/.rvm/gems/ruby-3.2.1@xpg/gems/foreman-0.87.2/lib/foreman/cli.rb:62:in `export'
	from /home/snex/.rvm/gems/ruby-3.2.1@xpg/gems/foreman-0.87.2/lib/foreman/vendor/thor/lib/thor/command.rb:27:in `run'
	from /home/snex/.rvm/gems/ruby-3.2.1@xpg/gems/foreman-0.87.2/lib/foreman/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
	from /home/snex/.rvm/gems/ruby-3.2.1@xpg/gems/foreman-0.87.2/lib/foreman/vendor/thor/lib/thor.rb:369:in `dispatch'
	from /home/snex/.rvm/gems/ruby-3.2.1@xpg/gems/foreman-0.87.2/lib/foreman/vendor/thor/lib/thor/base.rb:444:in `start'
	from /home/snex/.rvm/gems/ruby-3.2.1@xpg/gems/foreman-0.87.2/bin/foreman:7:in `<top (required)>'
	from /home/snex/.rvm/gems/ruby-3.2.1@xpg/bin/foreman:25:in `load'
	from /home/snex/.rvm/gems/ruby-3.2.1@xpg/bin/foreman:25:in `<main>'
	from /home/snex/.rvm/gems/ruby-3.2.1@xpg/bin/ruby_executable_hooks:22:in `eval'
	from /home/snex/.rvm/gems/ruby-3.2.1@xpg/bin/ruby_executable_hooks:22:in `<main>'

@snex there is a fix in #788