How to eliminate RubyMine false "No such file to load" errors - rubymine

I've recently installed RubyMine on a second machine and cloned a GitHub repository there.
My application runs exactly the same as on the first machine, but the RM code inspection result is radically different: I get dozens of "No such file to load" errors.
This even though the application runs fine both from the command line and from RM.
In dialog Run/Debug Configurations, I have specified load paths (-I. -I..) in the Ruby arguments.
Does the code inspection not honor the configuration? Or perhaps it's using a different configuration?

A bit late, but you may need to mark the directories that are load path roots in your app within the Rubymine tree - right click and do "Mark Directory As/Load Path Root".

For me the other solutions did not work. However, the problem was that RubyMine detected the wrong ruby version - while rvm for the project was ruby 2.4.1, in RubyMine it defaulted to the last version it had (2.4.2). So going to RubyMine > Preferences > Ruby SDK & Gems and changing the version for the project to the correct one solved it.

If you use the "Mark Directory As/Load Path Root" action, this will apply for IDE autocompletion only. It will not be propagated onto the interpreter (as it would be in PyCharm with Python).
You have to either keep using the -I switch, or configure $LOAD_PATH in your code, or (preferably) set up a Gem project with bundler support. You can then configure the path in a gemspec file. See https://www.jetbrains.com/help/ruby/creating-gem-project.html.
Sources:
https://intellij-support.jetbrains.com/hc/en-us/community/posts/206741945-Load-Path-not-working-at-all-
https://intellij-support.jetbrains.com/hc/en-us/community/posts/206727915-Building-RubyGems-lib-in-load-path-

You can try changing Project Path Mappings and set relative Local Path and Remote Path to get it to work.

Related

how to compile kdesvn from githib repo

I've downloaded the sources for kdesvn from the github repo as I'm thinking to look into working on an addition to the project. Now turns out, I'm not even able to properly compile the downloaded sources: I've created a directory kdesvn-build changed into it and launched cmake ../ (as described on https://github.com/KDE/kdesvn/blob/master/INSTALL-cmake) which does some stuff but then stops saying:
CMake Error: The following variables are used in this project, but
they are set to NOTFOUND. Please set them or make sure they are set
and tested correctly in the CMake files: SUBVERSION_INCLUDE_DIR
Now, I don't know what SUBVERSION_INCLUDE_DIR should be set to nor could I find it searching around the web. Anyone?
It is a directory containing svn_*.h files. If you are on Linux, you'd need to install something like subversion-dev package. On FreeBSD headers are installed with main package, and the directory is /usr/local/include/subversion-1/.

Netbeans, phpdocumentor, and custom phpdoc.dist.xml by project

I am using Netbeans 8.0.2 and phpdocumentor 2.8.2 on a windows 7 platform.
I would like to use custom phpdoc.dist.xml config files by project so I can specify framework directories and etc. to exclude from the generated doc. I also want to keep my Netbeans PHPDOC plugin config as generic as possible, without specific output directories, ignore options, config path parameters, etc., so on, so that that the config will apply to all my projects.
The phpdoc.dist.xml file works great. The doc generated is exactly what I want.
The problem or feature, and it seems to be a phpdocumentor one as it also applies from plain command line, is that the phpdoc.bat command (without a specific config parm) has to be run from the same root directory as the phpdoc.dist.xml file, or it ignores it. No problem if I'm using command line as I can change into that directory first, but I would like to use Netbeans. I have searched on this extensively and cannot find an answer.
I considered whether to modify the phpdocumentor files to insert cd /D path/to/myproject/dir to change the directory using some Netbeans variable to represent myproject/dir, but I could not find the right place in the code or the variable to use. Plus, then I'm supporting a custom mod to phpdocumentor.
I did find these directions for a PHPStorm setup, where the author specified a PHPStorm variable for the --config command line option to point to his custom phpdoc.dist.xml.
--config="$ProjectFileDir$/phpdoc.dist.xml"
If I could do the same in Netbeans like maybe "${BASE_DIR}/phpdoc.dist.xml" it would be great, but so far I haven't hit on anything Netbeans will recognize/pay attention to in the PhpDoc script: box.
I have also tried writing a wrapper .bat file to capture my own command line variable %1 and do the directory change to that before calling phpdoc.bat, but Netbeans throws and error and says that's not a valid .bat file. I cannot find any phpdocumentor parameter to configure by specific Netbeans project but the output directory. And I would prefer not to be defining a bunch of projects on subdirectories in Netbeans, just to address phpdocumentor.
Now I am out of ideas. Can anyone point me to a solution?

how to configure less in eclipse?

I downloaded the plugin from http://www.normalesup.org/~simonet/soft/ow/eclipse-less.en.html.
and installed in on eclipse however when I try to compile the less to css I get this error
Cannot be launched because of an I/O exception
Cannot run program "lessc": CreateProcess error=2, The system cannot find the file specified
can anyone whose successfully installed this guide me in the right direction ? Also xtext is installed already.
There is a similar issue for the lessc GitHub repo: issues/213
I added a new launch configuration as follows:
LESS command: lessc (existing)
Compress the generated CSS file (existing)
Use this launch configuration as default
Your have to change the "LESS Command".
Please filling your "lessc" physical path, just like "C:\Users\[Yourname]\AppData\Roaming\npm\lessc.cmd"
(Windows 7, node.js standard installer)
That means you must indicate the full path of lessc.cmd

how to run coffeescript with web storm

I'm having trouble running a coffeescript configuration with webstorm. If I enable the coffeescript plugin in the run configuration I get the following error
/usr/bin/coffee app.coffee
env: node: No such file or directory
I tried the solution in the support forums of adding my path variable to the environment variables but still no fix.
Because, the executable file is not found yet.
Goto Terminal and type: echo NODE_PATH or echo $NODE_PATH to see where is the file.
On windows, C:\Users[YOUR_USER_NAME]\AppData\Roaming\npm\node_modules\coffee-script\bin\coffee
So, use Spotlight search tool to have a look at /usr/local/npm ..... or somewhere else.
Try to pass absolute path to your app.js. Webstorm sometimes mess with relative paths.
On Windows, I had a lot of trouble with this, you must find your "coffee" file. BTW, this could help you too.
After you installed Node.js and installed the CoffeScript plugin:
Download the last version (or source) from CoffeeScript.org
Unzip it wherever you want. In my case I unzipped the jashkenas-coffeescript-1.10.0-0-gf26d33d.tar.gz on D:\tools\
Check 'Run with CoffeeScript plugin'
Target the coffee executable on menu 'Run > Edit Configurations...':

Program "make" not found in PATH

I'm having the Program "make" not found in PATH error in eclipse. I checked the path variable which is:
C:\cygwin\bin;
%JAVA_HOME%\bin;
%ANT_HOME%\bin;
%ANDROID_SDK%\tools;
%ANDROID_SDK%\platform-tools;
%ANDROID_NDK%;
%CommonProgramFiles%\Microsoft Shared\Windows Live;
C:\Program Files\NVIDIA Corporation\PhysX\Common;
%SystemRoot%\system32;
%SystemRoot%;
%SystemRoot%\System32\Wbem;
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;
C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;
C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;
C:\Program Files\Git\cmd
The PATH starts with the folder which contains make (I checked and make.exe is in there), but eclipse still goes Program "make" not found in PATH.
I have tried changing the path and restarting several times but nothing seems to change.
You may try altering toolchain in case if for some reason you can't use gcc. Open Properties for your project (by right clicking on your project name in the Project Explorer), then C/C++ Build > Tool Chain Editor. You can change the current builder there from GNU Make Builder to CDT Internal Builder or whatever compatible you have.
Are you trying to run "Hello world" for the first time? Please make sure you choose proper toolchain. For Windows you have to choose MinGW GCC.
To make MinGW GCC compiler as default or change you original project with error "Program “make” not found in PATH" or "launch failed binary not found eclipse c++" when you trying to run program simply go to
Windows >> Preferences >> C\C++ Build >> Tool Chain Editor >> Change Current toolchain to MinGW GCC
In MinGW, I had to install the following things:
Basic Setup -> mingw32-base
Basic Setup -> mingw32-gcc-g++
Basic Setup -> msys-base
And in Eclipse, go to
Windows -> Preferences -> C/C++ -> Build -> Environment
And set the following environment variables (with "Append variables to native environment" option set):
MINGW_HOME C:\MinGW
PATH C:\MinGW\bin;C:\MinGW\msys\1.0\bin
Click "Apply" and then "OK".
This worked for me, as far as I can tell.
If you are using MinGw, rename the mingw32-make.exe to make.exe in the folder " C:\MinGW\bin " or wherever minGw is installed in your system.
Just to clarify the details that Adel's linked eclipse forum covers, here's how I solved this (on OS X):
Note: for me, even though my personal environment (i.e. if in bash, echo $PATH) had /Developer/usr/bin in it, I still had to add it to Eclipse's Environment variables:
Go to Eclipse Preferences -> C/C++ -> Build -> Environment -> Add.. -> "${PATH}:/Developer/usr/bin"
In the case of some other OS, just use the right path where make exists.
If you are using MinGW toolchain for CDT, make.exe is found at C:\MinGW\msys\1.0\bin
(or search the make.exe in MinGW folder.)
Add this path in eclipse
window->preferences->environment
Make sure you have installed 'make' tool through Cygwin's installer.
If you are using GNU MCU Eclipse on Windows, make sure Windows Build Tools are installed, then check the installation path and fill the "Global Build Tools Path" inside Eclipse Window/Preferences... :
Probably there are some files inside C:\cygwin\bin called xxxxxmake.exe, try renaming it to make.exe
I had the same problem.
Initially I had setup Eclipse CDT with Cygwing & was working smoothly. One day there happened a problem due to which I had to reset windows. After that when I opened Eclipse I started facing the issue described above. This is how I solved it.
First I searched that in the error the PATH variable value is same as the PATH variable of windows ( just by manual comparison of both two values ). I found that to be same. Now I realized that it is a PATH problem.
Then started looking for Cygwin whether it is there or not? It was there. I located & found that it exists in
C:\cygwin64\bin>
C:\cygwin64\bin>dir ma*
Volume in drive C is Windows8_OS
Volume Serial Number is 042E-11B5
Directory of C:\cygwin64\bin
16-05-2015 18:34 10,259 mag.exe
13-08-2013 04:57 384 mailmail
11-04-2015 02:56 4,252 make-emacs-shortcut
15-02-2015 23:25 194,579 make.exe
04-05-2015 21:36 40,979 makeconv.exe
29-07-2013 11:57 29,203 makedepend.exe
16-05-2015 18:34 79,891 makeindex.exe
16-05-2015 18:34 34,323 makejvf.exe
07-05-2015 03:04 310 mako-render
18-04-2015 02:07 92,179 man.exe
18-04-2015 02:07 113,683 mandb.exe
13-08-2013 04:57 286 manhole
18-04-2015 02:07 29,203 manpath.exe
24-10-2014 13:31 274,461 mate-terminal.exe
24-10-2014 13:31 1,366 mate-terminal.wrapper
15 File(s) 905,358 bytes
0 Dir(s) 373,012,271,104 bytes free
C:\cygwin64\bin>
Then I simply went ahead & updated the PATH variable to include this path & restarted eclipse.
The code compiles & debugging (GDB ) is working nicely.
Hope this helps.
Go to Project> Properties> C/C++ Build> Environment. You will see three fields, choose PATH. See if the folder containing make.exe is appended to the path or not. Sometimes the change to the System PATH variable (made from My Computer> Properties> Advanced System Settings...) is NOT reflected in Eclipse. This solved the problem for me, hope it helps you too!
Additional hint: If you have multiple projects with different toolchains open, check the build console header for the failing project's path.
I've just spent half an hour trying to fix a build that showed this error because another project with hopelessly outdated toolchain settings was open in the same workbench. Closing the other project re-enabled the build.
I also faced this problem but solved it by installing QT and extract the omnet5.6 folder in C: