python - Running bundle command using paramiko -


i trying execute rake task using python's paramiko module.

i have following code:

ssh_client = paramiko.sshclient() ssh_client.load_system_host_keys() ssh_client.connect(myserver, username="root") ssh_stdin, ssh_stdout, ssh_stderr = ssh_client.exec_command("cd /mnt/app-production/current ; export path=/usr/local/rubies/1.9.2-p320/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games ; bundle exec rake images:load_swatch") print ssh_stdout.read() print ssh_stderr.read() 

but following output:

rake aborted! loaderror: no such file load -- ruby-debug /mnt/app-production/releases/20141113171842/config/application.rb:7:in `<top (required)>' /mnt/app-production/releases/20141113171842/rakefile:5:in `require' /mnt/app-production/releases/20141113171842/rakefile:5:in `<top (required)>' (see full trace running task --trace) 

what error? , how can execute command successfully?

thanks

i think problem trying run multiple commands using exec_command. check out: how execute multiple commands in single session in paramiko? (python)


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -