Skip to content

Instantly share code, notes, and snippets.

@sixtyfive
Last active March 6, 2024 12:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sixtyfive/9fb6f703d85d2163468d0262884029dd to your computer and use it in GitHub Desktop.
Save sixtyfive/9fb6f703d85d2163468d0262884029dd to your computer and use it in GitHub Desktop.
# ~/.ruby-lsp-gemset/.tool-versions
ruby 3.3.0

Ruby LSP for legacy ruby 2.7.8 projects

  • Install asdf
  • Install ruby 3.3.0
  • Save the other two files of this Gist to their specified locations
  • Inside of $HOME/.ruby-lsp-gemset/, run bundle install
  • In VSCode, set rubyLsp.bundleGemfile to $HOME/.ruby-lsp-gemset/Gemfile
  • Reload the extension

For further info, see https://github.com/Shopify/ruby-lsp/tree/main/vscode.

# ~/.ruby-lsp-gemset/Gemfile
# frozen_string_literal: true
source 'https://rubygems.org'
gem 'ruby-lsp'
gem 'rubocop'
gem 'rubocop-packaging'
gem 'rubocop-performance'
gem 'rubocop-rspec'
gem 'rubocop-thread_safety'
gem 'rubocop-rails'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment