Coc-solargraph not starting/working

I installed coc-solargraph on my neovim which is a language server for ruby, however when I try to open a ruby file I get a pop-up saying “Solargraph not found. Run gem install solargraph or update your Gemfile., Install Now? (y/n)” If I say yes it’s gonna reappear in a few seconds, if I say no it won’t reappear but it’s still not working. In both options I see [coc.vim] Solargraph failed to initialize. at the bottom, I already did gem install solargraph and even vscode if I install “Ruby Solargraph” doesn’t work

If there’s a better alternative I would like to know