Namespace sufolders not found
已完成
Hi, i have a couple of subfolders for the models in my rails project for which RubyMine fails to find any target.
class Foo::Bar < ActiveRecord::Base
and the folder structure
foo
--> bar
Everthing works fine but RubyMine says "Cannot find 'Foo' "
Is there a way to fix that?
请先登录再写评论。
Hi, Sebastian,
I didn't manage to reproduce the problem. What version are you using? If it's on the last one, then could you please try doing File | Invalidate Caches and restarting IDE.
Hi,
i am using rails 4.2.7.1 and ruby 2.3.0
Restarting and cache reloading does not help.
However if the code looks like:
module Foo
class Bar < ActiveRecord::Base
...
end
The RMine stops complaining and rails does not care either. My guess is that RubyMine tries to look up a Module if it encounters this Foo::Bar syntax and complains if there is no explicit Module Foo.
Both seem to be valid in rails :)
We have the same Problem here in our project.
So I just deactivated the inspection:
Settings > Editor > Inspections > Unresolved Ruby Reference
A real pity.
@Sebastian @Merkdir
sorry for such a delay. The fix most likely will be included to RubyMine 2016.3.1.
I have a similar problem. Follows attached image of RubyMine 2016.3 not recognizing the namespace.
@Fernando,
could you please check how it goes in RubyMine 2016.3.1?
Seems it's working on 2016.3.1 :) Thank you.
Great to hear that :)