ianhattendorf / autocomplete-ruby

Provides intelligent code completion for Ruby in the Atom editor. Requires RSense.
MIT License
51 stars 9 forks source link

Rsense not starting #12

Closed cartoush closed 8 years ago

cartoush commented 8 years ago

Error starting rsense exec error: Error: Command failed: /bin/sh -c /home/artis/.rvm/gems/ruby-2.3.0/gems/rsense-0.5.18/bin/rsense start --port 47367 --path . /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require': cannot load such file -- jruby-jars (LoadError) from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire' from /home/artis/.rvm/gems/ruby-2.3.0/gems/rsense-0.5.18/lib/rsense/client/daemon.rb:2:in <top (required)>' from /home/artis/.rvm/gems/ruby-2.3.0/gems/rsense-0.5.18/bin/rsense:3:inrequire_relative' from /home/artis/.rvm/gems/ruby-2.3.0/gems/rsense-0.5.18/bin/rsense:3:in `

'

Mexxerio commented 8 years ago

Not really an issue for this package but for rsense https://github.com/rsense/rsense

Did you install Java and/or JRuby correctly? Try this: https://rvm.io/interpreters/jruby

nruth commented 8 years ago

I've also started getting an error like this since a recent update. It looks like someone has hard-coded this or one of the dependencies to look for a ruby 2.3.0 in their home directory instead of looking for the user's current ruby install.

nruth commented 8 years ago

https://github.com/ianhattendorf/autocomplete-ruby/commit/bbcdab60a2b1674dad74e518f0a625b56e8787e2#diff-b7a82c400a5223f9b7a869c32c18359eR8

Mexxerio commented 8 years ago

That can be changed in your package settings.

nruth commented 8 years ago

Just found it, thanks. However, it's not great learning about this via a random atom startup error & going looking through addon bugs.

Mexxerio commented 8 years ago

Yes, I agree. Maybe I will do a PR to update the readme. Or you are also more than welcome to :)

The owner of this package isn't using ruby or atom anymore, so it's up to the users to improve it.

ianhattendorf commented 8 years ago

Ah yes, looks like a side effect from #5.

Regarding the issue, is there any way we could detect if rsense is installed globally? Or do we need the full path? Either way a PR updating the readme would certainly be helpful.

Mexxerio commented 8 years ago

Not sure. Wouldn't it be possible to just call rsense start? So maybe just change the default to rsense

ianhattendorf commented 8 years ago

Could someone test changing this to rsense start as a fix?

manudmz commented 8 years ago

screenshot from 2016-11-01 10 28 09

Been also having an error while starting Atom, is an error about the default directory of Rsense, i'm a Linux user, and the default install directory for Gems is /var/lib/gems/2.3.0/gems/ with an Rsense, version number on the folder, like /var/lib/gems/2.3.0/gems/rsense-0.5.18/ , not ~/.gem/ruby/2.3.0/bin/rsense as the settings in the plug-in say, don't know if this is something specifically of my distro (elementaryOS) or linux systems in general, trying to fix such problem i copied the Rsense folder from the default system directory to the default directory addressed in settings and renamed it, which didn't really solve the problem, cause now i got a permission denied error starting the Rsense package , changed the permission settings in the folder, didn't solve the problem either, making a rsense start also doesn't solve the problem, plus trying to change the default port for Rsense server is a bit trickie.

chrishough commented 8 years ago

I am getting this same error. Has anyone found a fix?

ianhattendorf commented 8 years ago

@alexdmz both the default port and the default path to rsense are in the settings for this plugin, did you try changing them there? You definitely don't want to blindly copy the gems directory somewhere else. Try setting the rsense path in settings to either rsense or /var/lib/gems/2.3.0/gems/rsense-0.5.18/rsense.

For future improvement if anyone wants to submit a PR:

ianhattendorf commented 8 years ago

@chrishough where is your rsense installed? Did you try changing the path in the autocomplete-ruby settings?

chrishough commented 8 years ago

I was able to get around the initial error but updating the path, now it is showing this error...

screen shot 2016-11-01 at 12 36 12 pm

I tried updating java but it did not fix it.

ianhattendorf commented 8 years ago

@chrishough looks like an issue with rsense, does this happen when running it through the command line? (running rsense start in your project directory?)

chrishough commented 8 years ago

For anyone else coming across this thread, you have to install the java jdk which does not come installed on osx sierra 10.12: http://mac.thetutorialfree.com/2016/08/01/how-to-quickstart-with-oracle-java-jdk-8-on-mac-os-x-10-12-sierra-easy-guide/

I am good to go now.

manudmz commented 8 years ago

@ianhattendorf yep i did try to change port and default path in the settings, also changed the default directory to var/lib/gems/2.3.0/gems/rsense-0.5.18 where inside there is no actual only rsense folder so i leave it , like var/lib/gems/2.3.0/gems/rsense-0.5.18 having no success and getting now a permission denied error, even tried starting Atom as Sudo

jfreymann commented 8 years ago

I was also getting this error, here's what I did to fix it. (Note using cask for java install and rbenv)

  1. Updated to the latest version of Java => Java(TM) SE Runtime Environment (build 1.8.0_112-b16)
  2. Edited the settings for the autocomplete-ruby package. atom >> preferences >> packages >> autocomplete-ruby >> settings
  3. Updated the rsense path to the correct path (I'm using rbenv) ~/.rbenv/shims/rsense
  4. Restarted Atom. The errors now gone. Honestly, this started when I updated to Sierra so it might have been java not playing nice as updating the path for me didn't work initially.
contentfree commented 8 years ago

I just fixed by doing:

  1. gem install rsense
  2. Change the rsense path in autocomplete-ruby's settings to just rsense
  3. Restarted Atom.

No more error.

ianhattendorf commented 8 years ago

Good to know that just rsense worked for you, maybe someone could look into detecting if rsense is available from the path or if we need to use GEM_HOME.

Anyway I'm closing this for now. If someone wants to submit a PR to enhance rsense detection that would be welcome.