No code suggestion?

Dear other developers,

I'm new to RubyMine but not to Ruby and Rails. I'm currently working on a nice project in the beautiful city of Munich :)

In RubyMine, code completion once worked out, but currently it stopped working:
rubymine_no_suggestion.png

Is there anything I misconfigured?
rubymine_code_completion_dialog.png

Actually I didn't change anything about that between it was working and now.

I'd appreciate any help in getting code completion running again. Thanks in advance.

Yours
Raul

0
9 comments

Hi Raul,

I see no problems with your settings.  Also I've tried RM 4.5.4 with the same settings and everything works fine.
What version or RM are you using and what OS are you using?

Regards, Oleg.

0

Hi Oleg,

thank you for your answer.
I'm using RubyMine 4.5.3 on Windows 7 x64.

I just realized, code completion is working in migrations but not in views (.html.erb), controllers and models.

Yours
Raul

0

Hi Raul,

it looks like http://youtrack.jetbrains.com/issue/RUBY-7848  Feel free to add you code example to the ticket.

Regards, Oleg.

0

Hi Oleg,

sorry for asking this, I'm new to RubyMine, as I said:

Are you sure it's the same issue? As I said, I have the problem in controllers and models as well while the issue is only about views.
What is in common, though, is that methods like link_to are suggested...

Yours
Raul

0

Hi Raul,

sorry I've missed this :(  But the bug could be the couse of you problems with .erb
As for models and controllers, is the problem reproducible with new/empty rails project,
or it is specific to the one you are currently  working on?

Oleg.

0

Hi Oleg,

thanks for sticking with me, hope you enjoy it as much as I do :)

I created a new Rails project with RubyMine (File -> New Project) and had the some problems, i.e. no code completion in models and controllers.
By going on with my project, I created a new method in a controller. This one is suggested, but my instance variable is not.

Example:

# -*- encoding : utf-8 -*-
class Partner::TimePeriodsController < ApplicationController
     # GET /partner/timed_product_adjustments/1/time_periods
     def new
          @time_period = TimePeriod.new
          @time_period.from_time = round_minutes(Time.now, 15.minutes)
     end

     def round_minutes(time, seconds = 60)
          Time.at((time.to_f / seconds).round * seconds)
     end
end


I'm editing in method "new": (without "s)

  • When I start typing "@time_" and press <ctrl>+<space>, I get  a balloon saying "No suggestions" (like in the screenshot above)
  • When I start typing "round_" and press <ctrl>+<space>, the suggestion box pops up and suggests "round_minutes"


HTH
Raul

PS: Why is there no syntax highlighting for Ruby in this Forum? :)

0

Hi Raul,

> thanks for sticking with me, hope you enjoy it as much as I do :)

Well, I like puzzles ;)

I've create new RoR project and everything works fine for me :(
Though I'm using 4.5.4 and this could be the difference, thus I'd suggest to update your RM first.
Second thing to try (if previous option will not help) invalidate caches (File|Invalide Caches...).

If these two options will not help let me know and I will see what else can be done.

Regards, Oleg.

P.S.
> PS: Why is there no syntax highlighting for Ruby in this Forum? :)
It is a good question but I don not know the right answer for it ;)

0

Hi Oleg,

my RubyMine didn't say anything about an update, so I didn't know there's a newer one.

I invalidated caches and this made my RubyMine 4.5.3 suggest again. Thank you! B-)

Yours
Raul

0

I'm happy that your problem has been resolved.

Have a nice day ;)

Oleg

0

Please sign in to leave a comment.