From 238405c3b41906f948ef4088ab66ea58649f7fad Mon Sep 17 00:00:00 2001 From: RedVulps Date: Fri, 12 Jun 2015 11:45:48 -0300 Subject: [PATCH 1/2] Add bundle command mapping check --- lib/capistrano/rails/console/tasks/remote.cap | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/capistrano/rails/console/tasks/remote.cap b/lib/capistrano/rails/console/tasks/remote.cap index 5e4ff0b..6db0bcc 100644 --- a/lib/capistrano/rails/console/tasks/remote.cap +++ b/lib/capistrano/rails/console/tasks/remote.cap @@ -22,8 +22,9 @@ namespace :rails do rails_console_args << '--sandbox' if ENV.key?('sandbox') || ENV.key?('s') rails_env = fetch(:rails_env, fetch(:stage, 'production')) + bundle_mapped = SSHKit.config.command_map.prefix[:bundle] rescue nil - cmd = SSHKit::Command.new(:rails, :console, rails_env, *rails_console_args, host: host) + cmd = SSHKit::Command.new(((bundle_mapped.first + ' bundle') rescue :bundle), :exec, :rails, :console, rails_env, *rails_console_args, host: host) SSHKit.config.output << cmd port = host.port || (host.ssh_options || {})[:port] From 97087ab371eb13e5fabc1898ef3f37d596356852 Mon Sep 17 00:00:00 2001 From: RedVulps Date: Fri, 12 Jun 2015 11:45:57 -0300 Subject: [PATCH 2/2] Version bump --- CHANGELOG.md | 4 ++++ lib/capistrano/rails/console/version.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ecc826b..203f473 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ ### Feature - support for ssh keys +## 0.5.3 (2015-06-12) +### Fixed +- Add bundle command mapping check(this fixes console with RVM and other gems that map 'bundle' command) + ## 0.5.2 (2015-04-02) ### Fixed - removed rails binary check due to different environments in sshkit and the ssh shellout diff --git a/lib/capistrano/rails/console/version.rb b/lib/capistrano/rails/console/version.rb index f89d48a..b6dbcb7 100644 --- a/lib/capistrano/rails/console/version.rb +++ b/lib/capistrano/rails/console/version.rb @@ -5,7 +5,7 @@ module Rails # Console module Console # gem version - VERSION = '0.5.2' + VERSION = '0.5.3' end end end