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/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] 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