how to run coffeescript with web storm - coffeescript

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...':

Related

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 eliminate RubyMine false "No such file to load" errors

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.

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 setup grunt in webstorm on windows

I am Using Webstorm (PHPStorm) on Windows 7. On the actual project we are using grunt to concatenate javascript and css and also for several other build processes.
I tried to setup the grunt command as an external run command in Webstorm. The settings i tried for that are:
Name: grunt
Parameters: none
WorkingDirectory: $ProjectFileDir$
So now when I am trying to start my external run command in Webstorm, I always get the error
> grunt
Cannot run program "grunt" (in directory "C:\Users\jawidmer\workspaces\projectname"): CreateProcess error=2, The system cannot find the file specified
When I open my command line tool and navigate to the project folder, I can start grunt without any problems.
I already searched in google and tried all kinds of different combinations of settings but non of them worked..
Do you have any ideas, what I have to change to be able to start grunt from external run commands in Webstorm?
Thanks
Jan
By your description, I assume that the same way I configured it in my WebStorm installation should work just fine for you too:
I hope it helps.
UPDATE
It seems that if you add > %TEMP%\grunt & type %TEMP%\grunt & del %TEMP%\grunt to Parameters (like shown in the updated image), the build errors will be shown.
If you need to configure a task (for example grunt watch), the Parameters field must be the following:
watch > %TEMP%\grunt & type %TEMP%\grunt & del %TEMP%\grunt
Tip taken from here
Maybe this variant will be useful for somebody:
Settings -> External Tools
With this tool I can right-click folder in project and in context menu select grunt -> build
As I had problems with the path of node and grunt in linux. I've decide to add the following in Settings->External Tools, I guess in windows can be done in the same way (PHPstorm 7, in the same dialog as the prior answers):
Name: grunt Group: Node
Program: /opt/nodes/current/bin/node (my path to node files)
Parameters: /my/directory/node_modules/grunt-cli/bin/grunt watch (my path to grunt-cli binary and the parameter to the task of grunt)
Working directory: /home/user/project/ (my path to Gruntfile.js)

Highlighting with Pygmentize in Phabricator not working

I installed Phabricator for working with Python projects. Everything is ok, but files view present them, as plain text. I want to some highlighting provided by Pygmentize utility.
I have installed Pygments
sudo pip install Pygments
Checked from all users, pygmentize script is available, and located at /usr/local/bin.
I changed
'pygments.enabled' => true,
settings in myconfig.conf.php file of phabricator.
But it's not working ?! I can't find any log crashes, or something else. Have you any ideas why it can happen?
I received answer from Github-Issues service. The reason was that httpd user can't call this function, here is sample which extends own $PATH enviroment. I added this to myconfig.conf.php file:
'environment.append-paths' => array('/usr/local/bin'),
It is strongly recommended to add path with pygmentize to your path.
config file located at:
phabricator/conf/local/local.json
I have add in my config
"environment.append-paths": ["\/bin","\/usr\/bin","\/usr\/local\/bin","\/usr\/local\/sbin","\/usr\/local\/bin","\/opt\/local\/sbin","\/opt\/local\/bin","\/usr\/sbin","\/usr\/bin","\/sbin"],
I am using SmartOS ($PATH locates in /usr/local/sbin:/usr/local/bin:/opt/local/sbin:/opt/local/bin:/usr/sbin:/usr/bin:/sbin)