The problem is caused because of the connection name. We are not escaping it correctly. /etc/NetworkManager/system-connections/4g router 5 Gh/z.nmconnection' (Errno::ENOENT).