diff --git a/lib/capistrano/rails/console/tasks/remote.cap b/lib/capistrano/rails/console/tasks/remote.cap index ce997d5..63aa9b9 100644 --- a/lib/capistrano/rails/console/tasks/remote.cap +++ b/lib/capistrano/rails/console/tasks/remote.cap @@ -21,10 +21,10 @@ 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 + rails_env = fetch(:rails_env, fetch(:stage, 'production')) + bundle_cmd = (SSHKit.config.command_map[:bundle] rescue nil) || :bundle - cmd = SSHKit::Command.new(((bundle_mapped.first + ' bundle') rescue :bundle), :exec, :rails, :console, rails_env, *rails_console_args, host: host) + cmd = SSHKit::Command.new(bundle_cmd, :exec, :rails, :console, rails_env, *rails_console_args, host: host) SSHKit.config.output << cmd port = host.port || (host.ssh_options || {})[:port]