'(-d --daemon)'{-d,--daemon}'[Make server run as a Daemon]'\
'(-u --debugger)'{-u,--debugger}'[Enable ruby-debugging for the server]'\
'(-e --environment)'{-e,--environment=}'[Specifies the environment to run this server under (test/development/production)]:name:(test development production)'\
'(-P --pid)'{-P,--pid=}'[Specifies the PID file]:pid:_files -g "*.pid"'
}
_rails_s(){
_rails_server
}
_rails_dbconsole(){
_arguments \
'(- *)'--help'[Show this help message]'\
'(-p --include-password)'{-p,--include-password}'[Automatically provide the password from database.yml]'\
--mode'[Automatically put the sqlite3 database in the specified mode (html, list, line, column)]:mode:(html list line column)'\
--header
}
_rails_new(){
local context state line curcontext="$curcontext"
local _a rails_options runtime_options
__rails_setup_rails_options
__rails_setup_runtime_options
_arguments -C\
$rails_options\
$runtime_options\
'(-r --ruby)'{-r,--ruby=}'[Path to the Ruby binary of your choice]:path'\
'(-b --builder)'{-b,--builder=}'[Path to a application builder (can be a filesystem path or URL)]: :->path_or_url'\
'(-m --template)'{-m,--template=}'[Path to an application template (can be a filesystem path or URL)]: :->path_or_url'\
--skip-gemfile"[Don't create a Gemfile]"\
--skip-bundle"[Don't run bundle install]"\
'(-G --skip-git)'{-G,--skip-git}'[Skip Git ignores and keeps]'\
'(-O --skip-active-record)'{-O,--skip-active-record}'[Skip Active Record files]'\
install'[Install plugin(s) from known repositories or URLs]'\
remove'[Uninstall plugins]'\
new
}
_rails_plugin_install(){
_arguments \
'(-x --externals)'{-x,--externals}'[Use svn:externals to grab the plugin. Enables plugin updates and plugin versioning]'\
'(-o --checkout)'{-o,--checkout}'[Use svn checkout to grab the plugin. Enables updating but does not add a svn:externals entry]'\
'(-e --export)'{-e,--export}'[Use svn export to grab the plugin. Exports the plugin, allowing you to check it into your local repository. Does not enable updates or add an svn:externals entry]'\
'(-q --quiet)'{-q,--quiet}'[Suppresses the output from installation. Ignored if -v is passed (rails plugin -v install ...)]'\
'(-r --revision)'{-r,--revision=}'[Checks out the given revision from subversion or git. Ignored if subversion/git is not used]:revision'\
'(-f --force)'{-f,--force}"[Reinstalls a plugin if it's already installed]"\
'(-e --environment)'{-e,--environment=}'[Specifies the environment for the runner to operate under (test/development/production)]:name:(test development production)'\