dense-analysis / dense-analysis/ale

Ruby LSP error

Open
#4,968 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Vim Script
Stars
14k
Forks
1.5k
Avg merge
17h 49m
Merged PRs (30d)
1

Description

## Information

**VIM version**

NVIM v0.11.1
Build type: Release
LuaJIT 2.1.1741730670

Operating System: Linux Mint

## What went wrong

I'm not sure if this is an issue with ale or something deeper, but when I have ale enabled and I open a Ruby file, I get the following error:

```
Error executing vim.schedule lua callback: ...nvimkGhbbF/usr/share/nvim/runtime/lua/vim/lsp/client.lua:551: RPC[Error] code_name = InternalError, message = "[TypeError] no implicit conversion of Array
into Hash"
stack traceback:
[C]: in function 'assert'
...nvimkGhbbF/usr/share/nvim/runtime/lua/vim/lsp/client.lua:551: in function ''
vim/_editor.lua: in function
```

## Reproducing the bug

Set up ale on Neovim and open a Ruby file.

### :ALEInfo

Expand
```
Current Filetype: ruby
Available Linters: ['brakeman', 'cspell', 'debride', 'packwerk', 'rails_best_practices', 'reek', 'rubocop', 'ruby', 'solargraph', 'sorbet', 'standardrb', 'steep']
Linter Aliases:
'sorbet' -> ['srb']
Enabled Linters: ['brakeman', 'cspell', 'debride', 'packwerk', 'rails_best_practices', 'reek', 'rubocop', 'ruby', 'solargraph', 'sorbet', 'standardrb', 'steep']
Ignored Linters: []
Suggested Fixers:
'prettier' - Apply prettier to a file.
'remove_trailing_lines' - Remove all blank lines at the end of a file.
'rubocop' - Fix ruby files with rubocop --auto-correct.
'rubyfmt' - A formatter for Ruby source code
'rufo' - Fix ruby files with rufo
'sorbet' - Fix ruby files with srb tc --autocorrect.
'standardrb' - Fix ruby files with standardrb --fix
'syntax_tree' - Fix ruby files with stree write
'trim_whitespace' - Remove all trailing whitespace characters at the end of every line.

Linter Variables:
" Press Space to read :help for a setting
let g:ale_ruby_brakeman_executable = 'brakeman'
let g:ale_ruby_brakeman_options = ''
let g:ale_ruby_debride_executable = 'debride'
let g:ale_ruby_debride_options = ''
let g:ale_ruby_packwerk_executable = 'packwerk'
let g:ale_ruby_packwerk_options = ''
let g:ale_ruby_rails_best_practices_executable = 'rails_best_practices'
let g:ale_ruby_rails_best_practices_options = ''
let g:ale_ruby_reek_executable = 'reek'
let g:ale_ruby_reek_options = ''
let g:ale_ruby_reek_show_context = 0
let g:ale_ruby_reek_show_wiki_link = 0
let g:ale_ruby_rubocop_executable = 'rubocop'
let g:ale_ruby_rubocop_options = ''
let g:ale_ruby_ruby_executable = 'ruby'
let g:ale_ruby_solargraph_executable = 'solargraph'
let g:ale_ruby_solargraph_options = {}
let g:ale_ruby_sorbet_enable_watchman = 0
let g:ale_ruby_sorbet_executable = 'srb'
let g:ale_ruby_sorbet_options = ''
let g:ale_ruby_standardrb_executable = 'standardrb'
let g:ale_ruby_standardrb_options = ''
let g:ale_ruby_steep_executable = 'steep'
let g:ale_ruby_steep_options = ''

Global Variables:
" Press Space to read :help for a setting
let g:ale_cache_executable_check_failures = v:null
let g:ale_change_sign_column_color = v:null
let g:ale_command_wrapper = ''
let g:ale_completion_delay = v:null
let g:ale_completion_enabled = v:false
let g:ale_completion_max_suggestions = v:null
let g:ale_disable_lsp = 'auto'
let g:ale_echo_cursor = v:true
let g:ale_echo_msg_error_str = 'Error'
let g:ale_echo_msg_format = '%code: %%s'
let g:ale_echo_msg_info_str = 'Info'
let g:ale_echo_msg_warning_str = 'Warning'
let g:ale_enabled = 1
let g:ale_fix_on_save = v:false
let g:ale_fixers = {}
let g:ale_history_enabled = v:true
let g:ale_info_default_mode = 'preview'
let g:ale_history_log_output = v:true
let g:ale_keep_list_window_open = 0
let g:ale_lint_delay = 200
let g:ale_lint_on_enter = v:true
let g:ale_lint_on_filetype_changed = v:true
let g:ale_lint_on_insert_leave = v:true
let g:ale_lint_on_save = v:true
let g:ale_lint_on_text_changed = 'normal'
let g:ale_linter_aliases = {}
let g:ale_linters = {}
let g:ale_linters_explicit = v:false
let g:ale_linters_ignore = {}
let g:ale_list_vertical = v:false
let g:ale_list_window_size = 10
let g:ale_loclist_msg_format = '%code: %%s'
let g:ale_max_buffer_history_size = 20
let g:ale_max_signs = v:null
let g:ale_maximum_file_size = v:null
let g:ale_open_list = v:false
let g:ale_pattern_options = v:null
let g:ale_pattern_options_enabled = v:null
let g:ale_root = {}
let g:ale_set_balloons = v:false
let g:ale_set_highlights = 0
let g:ale_set_loclist = v:true
let g:ale_set_quickfix = v:false
let g:ale_set_signs = v:true
let g:ale_sign_column_always = 1
let g:ale_sign_error = v:null
let g:ale_sign_info = v:null
let g:ale_sign_offset = v:null
let g:ale_sign_style_error = v:null
let g:ale_sign_style_warning = v:null
let g:ale_sign_warning = v:null
let g:ale_sign_highlight_linenrs = v:null
let g:ale_type_map = {}
let g:ale_use_neovim_diagnostics_api = v:true
let g:ale_use_global_executables = v:null
let g:ale_virtualtext_cursor = 'all'
let g:ale_warn_about_trailing_blank_lines = v:true
let g:ale_warn_about_trailing_whitespace = v:true

Command History:

(executable check - failure) brakeman
(executable check - failure) cspell
(executable check - failure) debride
(executable check - failure) packwerk
(executable check - failure) rails_best_practices
(executable check - failure) reek
(executable check - success) rubocop
(finished - exit code 0) ['/bin/bash', '-c', '''rubocop'' --format json --force-exclusion --stdin ''/home/fletch/Dropbox/projects/open_source/subsequent/spec/spec_helper.rb'' < ''/tmp/nvim.fletch/gfhDTW/1/spec_helper.rb''']

<<>>
{"metadata":{"rubocop_version":"1.71.0","ruby_engine":"ruby","ruby_version":"3.4.1","ruby_patchlevel":"0","ruby_platform":"x86_64-linux"},"files":[{"path":"spec/spec_helper.rb","offenses":[]}],"summary":{"offense_count":0,"target_file_count":1,"inspected_file_count":1}}
<<>>

(executable check - success) ruby
(finished - exit code 0) ['/bin/bash', '-c', '''ruby'' -w -c ''/tmp/nvim.fletch/gfhDTW/2/spec_helper.rb''']

<<>>

(executable check - success) solargraph
(executable check - failure) srb
(executable check - failure) standardrb
(executable check - failure) steep
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.