<commit_before># via: https://exceptiontrap.com/blog/5-run-rails-production-console-with-capistrano

namespace :rails do
  desc "Remote console"
  task :console, roles: :app do
    run_interactively "bundle exec rails console #{fetch(:stage)}"
  end
end

def run_interactively(command, server=nil)
  server ||= find_servesr_for_task(current_task).first
  exec %Q(ssh -l #{user} #{server} -t 'su - #{user} -c "cd #{current_path} && #{command}"')
end<commit_msg>[fix] rails console recipe 'run_interactively' command typo<commit_after># via: https://exceptiontrap.com/blog/5-run-rails-production-console-with-capistrano

namespace :rails do
  desc "Remote console"
  task :console, roles: :app do
    run_interactively "bundle exec rails console #{fetch(:stage)}"
  end
end

def run_interactively(command, server=nil)
  server ||= find_servers_for_task(current_task).first
  exec %Q(ssh -l #{user} #{server} -t 'su - #{user} -c "cd #{current_path} && #{command}"')
end
{'fraction_non_alphanumeric': 0.14906832298136646, 'fraction_numerical': 0.002070393374741201, 'mean_word_length': 5.2387096774193544, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1552417', 'n_tokens_mistral': 337, 'n_tokens_neox': 322, 'n_words': 85}