Closed Dan33l closed 4 years ago
The details about debug message was :
$> ruby ./puppet-languageserver --stdio --puppet-settings=--moduledir,/opt/dockerspace/build/ --debug=stdout
I, [2020-07-10T10:52:59.646178 #40137] INFO -- : Language Server is v0.26.1
D, [2020-07-10T10:52:59.646222 #40137] DEBUG -- : Loading gems...
E, [2020-07-10T10:52:59.673781 #40137] ERROR -- : Error while loading a critical gem: cannot load such file -- puppet ["/home/fcombernous/.rbenv/versions/2.5.3/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:92:in `require'", "/home/fcombernous/.rbenv/versions/2.5.3/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:92:in `require'", "/home/fcombernous/Documents/puppet-editor-services/lib/puppet_languageserver.rb:75:in `require_gems'", "/home/fcombernous/Documents/puppet-editor-services/lib/puppet_languageserver.rb:216:in `init_puppet'", "./puppet-languageserver:13:in `<main>'"]
I, [2020-07-10T10:52:59.674873 #40137] INFO -- : Starting RPC Server...
I, [2020-07-10T10:52:59.675018 #40137] INFO -- : Configured the Language Server to use the Disabled Message Router
D, [2020-07-10T10:52:59.675037 #40137] DEBUG -- : Using STDIO Server
D, [2020-07-10T10:52:59.676712 #40137] DEBUG -- : STDIOSRV: Starting STDIO server...
That we have to understand as ERROR -- : Error while loading a critical gem: cannot load such file -- puppet
. It is missing puppet gem.
So the puppet
gem have to be installed out of bundle process.
And gem install puppet
permitted to start the language server in vim.
Thank you @glennsarti for this debugging session.
Describe the Bug
I am able to start manually the language server with
bundle exec ruby ./puppet-languageserver --debug=stdout
But in vim, when i am editing a manifest i am getting the following message in the status bar
An error occured while starting the Language Server
Expected Behavior
Working with vim + coc and without error message.
Steps to Reproduce
Steps to reproduce the behavior:
git clone https://github.com/lingua-pupuli/puppet-editor-services.git
cd puppet-editor-services
git fetch --all --tag
git checkout tags/0.26.1
bundle install --path vendor
bundle exec rake gem_revendor
vim +CocConfig
to configure Coc with bellow settings.vim /opt/dockerspace/build/puppet-apache/manifest/init.pp
<-- here getting the error messageEnvironment
Additional Context
coc.nvim
,editorconfig-vim
,tabular
,vim-airline
,vim-json
,vim-puppet
,vim-ruby
,yaml-vim
.coc-settings.json
file contains:bundle exec ruby ./puppet-languageserver --stdio --puppet-settings=--moduledir,/opt/dockerspace/build/ --debug=stdout