ydkn--capistrano-rails-console/README.md

1.7 KiB

Gem Version Dependencies Code Climate

Join the chat

Capistrano::Rails::Console

Remote rails console and dbconsole for capistrano.

Installation

Add this line to your application's Gemfile:

gem 'capistrano-rails-console', require: false

And then execute:

$ bundle

Or install it yourself as:

$ gem install capistrano-rails-console

Usage

Require in Capfile to use the default task:

require 'capistrano/rails/console'

Run a remote rails console with:

$ cap production rails:console

You can also start a sandbox session:

$ cap production rails:console sandbox=1

Or run a dbconsole:

$ cap production rails:dbconsole

Options

Rails environment

set :console_env, :production # use different environment than deployment environment (rails_env)

User

set :console_user, :appuser # run rails console as appuser through sudo
set :console_user, nil # explicitly disable switching user through sudo

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/ydkn/capistrano-rails-console.

License

The gem is available as open source under the terms of the MIT License.