Given code
Net::SSH.start('server name', 'user')
This returns "not an absolute home." The "user" actually has a home directory. One of the suggested methods was to change ~ / .ssh / config with full paths to IdentityFile. This did not solve the problem.
The crazy part of this is that the code works fine if called via irb or console. The moment we try to call it from a class method (with the same code), it returns a "not absolute home" error.
The "user" can also ssh to the server via the command line without any problems. Ubuntu is running on the server.
UPDATE
Thanks to @Phrogz, the fix for this was to install ENV ['HOME'] in '/ home / deploy'. However, I did not understand why $ HOME gets the value ".". on server. So, I will leave this question without an βanswerβ until I, or someone else, knows about it. To manually install HOME, it looks more like a βhackβ than the right solution, but it works.
Jadon
source share