Skip to content

Instantly share code, notes, and snippets.

@boris
Created May 13, 2014 18:56
Show Gist options
  • Save boris/45a538e4daab8c42fd32 to your computer and use it in GitHub Desktop.
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 :neckbeard:
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