Comprehensive developer toolkit for building, linting, testing, and managing Ruby & Rails applications in Visual Studio Code.
Overview
Ruby Toolkit provides an all-in-one productivity suite for Ruby and Ruby on Rails development. It seamlessly integrates RuboCop linting, autocorrect, Bundler task automation, RubyGems package discovery, snippets, and a searchable language cheat sheet into VS Code.
Features
RuboCop Linter & Autocorrect
- File Linting: Run RuboCop on active Ruby files with immediate terminal diagnostics.
- Automated Autocorrect: Apply safe (
rubocop -a) or comprehensive (rubocop -A) fixes on demand.
- Config Generator: One-click generation of a standard
.rubocop.yml template configured for modern Ruby and Rails projects.
Ruby & Bundle Task Explorer
A dedicated Sidebar in the Activity Bar for running common project tasks:
- Bundler & Gems:
bundle install, bundle update, bundle outdated, Search RubyGems.org
- RuboCop: Lint current file, lint entire workspace, run autocorrect
- Testing:
bundle exec rspec, bundle exec rake test
- Rails & Server:
rails server, rails console, rails routes, rake db:migrate
RubyGems Package Assistant
- Search the public RubyGems.org registry directly from the Command Palette or Sidebar.
- View version info, download metrics, and descriptions.
- Add gems directly via
bundle add <gem> or copy formatted Gemfile dependency declarations.
- Quick links to official documentation and gem homepages.
Interactive Ruby & Rails Cheat Sheet
Searchable reference panel covering core idioms:
- Modern Ruby 3.x: Pattern matching (
case in), Data.define immutable value objects, numbered parameters.
- Enumerable & Collections:
group_by, transform_values, each_with_object, safe navigation &., and dig.
- ActiveRecord & Rails: Scopes, parameter permits, migration templates.
- RSpec:
describe/context/it structure, let memoization, matchers.
- Instant Copy and Insert into Editor actions.
Built-in Snippets
- Quick templates for classes (
cla), modules (mod), methods (def), attr_accessor (attr), RSpec tests (desc, it), and ActiveRecord migrations (mig).
- Displays the active Ruby runtime version in the status bar with a quick action launcher menu.
Commands
| Command |
Title |
ruby-toolkit.openCheatSheet |
Ruby: Open Interactive Cheat Sheet |
ruby-toolkit.runRubocop |
Ruby: Run RuboCop on Current File |
ruby-toolkit.rubocopAutocorrect |
Ruby: Run RuboCop Autocorrect (rubocop -a) |
ruby-toolkit.generateRubocopYml |
Ruby: Generate Default .rubocop.yml |
ruby-toolkit.searchGems |
Ruby: Search & Add RubyGem (RubyGems.org) |
ruby-toolkit.runBundleCommand |
Ruby: Run Bundle / Rake Command... |
ruby-toolkit.refreshBundleView |
Refresh Ruby Tasks |
Extension Settings
| Setting |
Default |
Description |
rubyToolkit.showStatusBar |
true |
Show the active Ruby version in the status bar. |
rubyToolkit.rubocopAutocorrectMode |
safe |
Autocorrect mode: safe (-a) or all (-A). |
rubyToolkit.useBundlerForRubocop |
true |
Execute RuboCop via bundle exec rubocop. |
License
MIT
| |