Skip to content

Instantly share code, notes, and snippets.

@webcracy
Created March 22, 2010 15:58
Show Gist options
  • Save webcracy/340208 to your computer and use it in GitHub Desktop.
Save webcracy/340208 to your computer and use it in GitHub Desktop.
ss is a ./script/server shortcut
#!/usr/local/bin/ruby
#
# Name: ss
# Description: ss is a ./script/server shortcut
# Author: Alex Solleiro <alex@webcracy.org>
# Instructions:
# Save this file as 'ss' within a directory in your $PATH
# Make it executable, ex: 'chmod +x ss'
# Type 'ss' at the root of a Rails app to run './script/server'
# You can pass arguments in the usual way
# Ex: 'ss -p 4000' runs './script/server -p 4000'
if File.executable?(Dir.getwd + '/script/server')
cmd = './script/server ' + ARGV.join(' ')
puts cmd
system(cmd)
exit
else
puts "!! Error: I don't think you're at the root of a Rails app."
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment