Auto-completion not working in IDEA Ruby plugin?

Hi there,

I am running the Ruby plugin version 2.0.214083 and I cannot seem to get auto-completion of any form working meaning that I press crtl-space and get nothing. Is this a feature only in RubyMine? Are the features between the plugin and RubyMine starting to diverge?

Thanks for the help.

-Reggie

5 comments
Comment actions Permalink

Hi Reggie,

I am running the Ruby plugin version 2.0.214083 and I cannot seem to get auto-completion of any form working meaning that I press crtl-space and get nothing. Is this a feature only in RubyMine? Are the features between the plugin and RubyMine starting to diverge?

RubyMine and IntelliJ IDEA Ruby Plugin are made from the same codebase. Thus set of features are quite similar talking about pure ruby and rails. IntellIJ IDEA plugin has set of JRuby oriented  set of features to enable cross language autocompletion and navigation.

Do you have Ruby module or Java module?
If you have Ruby module please ensure you have selected Ruby SDK for your module, and if you have Java module, please ensure you have JRuby facet correctly configured.

Thanks,
Oleg

0
Comment actions Permalink

Hi Oleg,

I was using a ruby 1.8.7 that I built and installed in /usr/local/bin with the libs and gems in /usr/local/lib/ruby. IDEA found those things OK, but auto completion does not work. When I switched to the system 1.8.6 ruby that comes with Leopard, auto completion works fine. Since I am in "tutorial mode" working through the Agile Web Development with Rails book, I will just update rails and the associated gems in the normal path and use ruby 1.8.6 for now. If you cannot reproduce this problem, I would be happy to help in any way I can to figure out why this feature does not work with an SDK other than the one that came with the OS.

-Reggie

0
Comment actions Permalink

Hello,

At the moment we are working on rewriting Ruby sdk and gems management in RubyMine.
I suppose Rubymine cannot find gems for your Ruby 1.8.7 in your case.
Problem seems to be fixed after we finish this.

Thanks,
Oleg

0
Comment actions Permalink

Hello Oleg,

just to give you an idea how it should work.
The problem is that there is no common approach for require in the Ruby world.In Java you just import what you need in a file.
In Ruby you can do either this or import in central files which is frequently done in larger projects.
The next sample show how this could work.

Install the ramaze webframework
gem install ramaze  
or
jruby -S gem install ramaze

Create a sample application
ramaze --create sample

You will see that starting from the start.rb init.rb files are included, for example controller/init.rb
controller/init.rb in turn will include all controllers. The acquire is a ramaze extension but you can just replace it
with a number of
require 'foocontroller'
require 'barcontroller

I should be able to set such a starting point in my application and everything which is required should be available in all files as well.

Best Regards

Sebastian

0
Comment actions Permalink

Hello Sebastian,

I should be able to set such a starting point in my application and everything which is required should be available in all files as well

Sounds great. Will discuss it. I suppose it will be some ruby module settings to implicitly require several rb files automatically in every file opened in RubyMine / Ruby plugin.

Thanks,
Oleg

0

Please sign in to leave a comment.