Closed jamiejackson closed 3 years ago
I got the message again after an eclipse restart:
After clicking "install gem:"
Hello @jamiejackson! 👋🏻
Sorry to hear that things didn't go smoothly for you. Ignoring the debugger and the launch configurations, there are two main parts to the Ruby funtionnality offered by this plugin:
For some reason, the plugin doesn't seem able to install the Solargraph gem needed for the second bullet point. Could you please open the Eclipse Error Log view and share the message details inside there?
@PyvesB , thanks for the response, that helps.
Will I be able to associate files without the rb
extension (e.g., Vagrantfile
) to the ruby editor?
Here's the error log. I clicked the "install gem" button at 09:52. https://gist.github.com/jamiejackson/fd40216ea542889f1de0ce148bfaef36
Relevant bits:
!ENTRY io.github.pyvesb.eclipse_solargraph 1 0 2020-11-18 09:52:34.527
!MESSAGE Running command [/bin/bash, -c, -l, gem install -V -n "/Users/jjackson/eclipse-workspace/.metadata/.plugins/io.github.pyvesb.eclipse_solargraph" solargraph]
!ENTRY io.github.pyvesb.eclipse_solargraph 4 0 2020-11-18 09:52:37.262
!MESSAGE Unexpected exit value 1 from command [/bin/bash, -c, -l, gem install -V -n "/Users/jjackson/eclipse-workspace/.metadata/.plugins/io.github.pyvesb.eclipse_solargraph" solargraph]
Error details:
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.
Will I be able to associate files without the
rb
extension (e.g.,Vagrantfile
) to the ruby editor?
Yes, if you go to Eclipse's preferences, then General -> Content Types -> Text -> Ruby, you can add new associations there. Alternatively, it would be simple enough to add an entry here so that it just works out of the box without any manual user configuration: https://github.com/PyvesB/eclipse-solargraph/blob/d7223fac64c163f10d3e9afde3bf5db4b30f039d/eclipse-solargraph-plugin/plugin.xml#L22
!ENTRY io.github.pyvesb.eclipse_solargraph 1 0 2020-11-18 09:52:34.527 !MESSAGE Running command [/bin/bash, -c, -l, gem install -V -n "/Users/jjackson/eclipse-workspace/.metadata/.plugins/io.github.pyvesb.eclipse_solargraph" solargraph] !ENTRY io.github.pyvesb.eclipse_solargraph 4 0 2020-11-18 09:52:37.262 !MESSAGE Unexpected exit value 1 from command [/bin/bash, -c, -l, gem install -V -n "/Users/jjackson/eclipse-workspace/.metadata/.plugins/io.github.pyvesb.eclipse_solargraph" solargraph] Error details: ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.
Are you running on macOS by any chance? By default, things are pretty much locked down and the OS won't let you install any gems with the built-in Ruby, see this StackOverflow thread for more details.
Thanks for your replies, @PyvesB. I'm taking the leap and trying out IntelliJ for the 30 day trial. Eclipse has been death by a thousand papercuts for me (I'm not necessarily talking about eclipse-solargraph) for almost a couple decades so I want to try out something new.
I might not get back to this ticket if I end up going all-in with IntelliJ.
Fair enough! For now I'll close this issue, but feel free to reopen or open new ones if you want to give Ruby in Eclipse another spin. 😉
The first thing I wanted to do with this plugin was to edit my Vagrantfile with syntax highlighting.
However, after I installed the plugin, I couldn't find a Ruby editor to open it with.
Then, I created an empty
foo.rb
and clicked on it, but I think I got a prompt that I needed to gem install something. I didn't do the installation but the syntax highlighting seems to at least superficially work as I add ruby tofoo.rb
, even though it opened with "generic text editor."I'm confused as to what this plugin is supposed to do and whether simply installing it from marketplace is really all that is needed.
I'm on Mac Catalina 10.15.7 on a new installation of Eclipse version 2020-09 (4.17.0)