iftheshoefritz / solargraph-rails

Solargraph plugin to add awareness of Rails-specific code
MIT License
321 stars 29 forks source link

Can this work without including the gem in the Gemfile? #3

Closed iftheshoefritz closed 3 years ago

iftheshoefritz commented 3 years ago

In my own setup I've only tested this when including solargraph and solargraph_rails in my Rails project Gemfile. The Solargraph client starts the server using bundle exec solargraph stdio.

Ideally a project source would not know anything about an individual developer's editor, so it would be best to keep these out of the Gemfile.

julianrubisch commented 3 years ago

Agreed that this should be a globally installed gem like solargraph itself

iftheshoefritz commented 3 years ago

Answer: yes it can run outside of bundler.

It was my own setup with rbenv that was causing hassles. I needed to make sure that solargraph -v returned 0.40.0 (or later) which requires building solargraph from source until Castwide has released v0.40.0+. Then also building this gem from source (at least until this goes into rubygems).

After all that gem install solargraph --local /path/to/solargraph-0.40.0.gem and gem install --local /path/to/solargraph_rails-0.1.0 (substituting whatever versions you have).

Bottom line: solargraph needs to be accessible without bundle exec and it needs to be able to require solargraph_rails without any help from the Gemfile.

iftheshoefritz commented 3 years ago

First closed issue! Wewt!