scp-in remote rails server

Yesterday I was trying to scp some of the logs from Rails EC2 Server, for my colleague. For a long time the scp dint work exiting with status 1. It also gave only a cryptic message as output saying “Using System Ruby Now”.

I couldn’t figure what the problem might be, expecting something to be messing from the client side{My local machine}. verbose scp output


...
debug1: Sending command: scp -v -f -- /****/shared/log/logfile.log
Sink: Now using system ruby.
Now using system ruby.
➜ staging-de1 Sending file modes: C0664 1583336 logfile.log
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: free: client-session, nchannels 1
...

gave some hints that the remote system was sending to “Sink”, my machine instead of the file, output “Now using system ruby”

Evidently, while we checked the server, these existed a “rvm use” call in the bashrc file, that lead to echo the above output on every login.

Strangely enough, I thought scp should have handled this by purging the terminal output, but it didn’t.

So later the scp was successful, after the echo was removed.

Hope, scp in future introduces feature that purges this kind of output from shell, to honor only the file contents.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s