Server Remote is a gem that provides common application server commands over ssh via a script in
Currently, it provides the following commands:
remote shell– same as ssh’ing to the server (this is the default command, so it can be called with just
remote console– executes a
script/consoleon the server
remote logtail– executes
tail -f log/<environment>.logon the server
remote logtail path/to/logfile– executes
tail -f path/to/logfileon the server
remote cmd <some command>executes command on the server, displaying the result. It @cd@’s to the remote app root first.
remote scp <local_file> :<remote_file>provides scp. Prefix remote files with ‘:’
Configuration is stored in
config/server_remote.yml. On installation, a sample file is copied to
APP_ROOT/config/ (along with
The configuration file groups configurations into profiles. A profile defines the info needed to connect to a server, along with the path to the app and the environment it is running under.
The default profile is app_. This can be changed with the @defaultprofile:@ setting in the config file, and overridden on any call with the
-p profile switch. This switch must be the first argument. Example:
script/remote -p admin console
First, install the gem (from Gemcutter):
gem install server_remote
server_remotify command to create the config and script file in your project:
If either of the
script/ dirs do not exist, they will be created for you.
Note: this plugin uses the ssh and scp binaries, which must be in your path. I have absolutely no idea if it will work on Windows.
Copyright © 2009 Tobias Crawley, released under the MIT license