$ global variable is unresoved reference in multi-file application
Have a ruby application with multiple files. Have some $ global variables defined in one of the files.Reference is found in file where defined, but in all other files it is marked as unresolved reference.More of an anyonance then an issue, but is there some way to resolve this?
Please sign in to leave a comment.
Hi,
do you require the file which defines this vars in other files?
Regards, Oleg.
Hi,
I'm sure your code does work I just try to understand how the variable is supposed to become available in the particular script
to understand what RubyMine is missing.
Regards, Oleg.
P.S. we can not treat globals from one script as available in another for all cases because not everyone use them this way.
Hi,
you are right untill you will call projectA_unit1.rb directrly. And RubyMine can not be sure that this is not the case :(
We have some assumptions for Rails apps, but not for a regular Ruby apps.
Oleg.
We will think what we can do here.
Regards, Oleg.