0

Here is what i want to do:

VAR_NAME="lala123"

Net::SSH.start( HOST, USER ) do |ssh|
  create_file = ssh.exec!('sudo mkdir /path/to/; \
                           sudo touch /path/to/file; \
                           sudo echo #{VAR_NAME} > /path/to/file')
end

The problem is similar with this one

Ruby Net::SSH Change directories using variable interpolation

but i didn't find a way to resolve it with net/ssh neither with Rye. Any hint will be extremly appreciated :).

Regards.

Community
  • 1
  • 1

1 Answers1

0

You are using ' instead of "

The first symbol does not interpolates. While the second one (") does.

eritiro
  • 306
  • 1
  • 6