Created
May 13, 2014 18:56
-
-
Save boris/45a538e4daab8c42fd32 to your computer and use it in GitHub Desktop.
this snippet allows you to run `cap rails:console` to connect to your rails console

This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :rails do | |
desc "open console" | |
task :console do | |
on roles(:app) do |host| | |
rails_env = fetch(:stage) | |
execute_interactively "~/.rbenv/shims/bundle exec rails console #{rails_env}" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment