Behat : No such file or directory - behat

I just installed behat using Behat's install instructions #1
Every time I run bin/behat I am getting the following error:
bin/behat --init
: No such file or directory
How do I fix it? I am new to behat and don't know where to start.

Did you run bin/behat --init?
Make sure it's bin/behat and not vendor/bin/behat.
Have you configured your .yml file?

Run
bin/behat --init
If you have see all the step in 'Behat's install instructions #1', you just have now a folder bin in your main directory (where you have your composer.phar and composer.json files) and inside this bin file, you have a behat file.
Actually vendor/bin/behat it won't work because of this:
"config": {
"bin-dir": "bin/"
}
And this code will create the bin folder. Hope it works for you.

Related

how to run existing grunt command from scripts in package.json

i want to be able to run a grunt command via the scripts section of a package.json file that resides in a different directory than the Gruntfile.
My folder structure is the following:
design
Gruntfile.js
react-ui
package.json
if i run grunt watch:dev in the design folder everything works as expected. How can i run the same command in the package.json since the Gruntfile is in a different folder?

Less file watcher in PhpStorm produces: lessc: ENOENT: no such file or directory

I am trying to set up an file watcher for .less files, but it isn't working.
I have globally installed less via npm (npm install -g less). And after this I set up the file watcher according to this documentation from JetBrains supprt. Here is a picture of the settings:
Everytime I will change my .less files, it will produce the following error:
/usr/local/lib/node_modules/less/bin/lessc --no-color styles.less
lessc: ENOENT: no such file or directory, open '/Applications/PhpStorm.app/Contents/bin/styles.less'
Process finished with exit code 1
What went wrong? Any suggestions?
Using the less compiler directly in the project folder via the command line works perfectly (e.g. $ lessc styles.less styles.css)
Using the less compiler directly in the project folder via the command -- line works perfectly (e.g. $ lessc styles.less styles.css)
Try doing the same then -- please try with $FileDir$ in the "Working Directory" field.

No response from codeception

I am trying to run codeception against my Yii2 project. However, I can getting no response from the simplest command line invocations. The command just sits there, for hours, until I break it.
I have installed this codeception manually, using the official phar and placing it in my path. I also have a copy in my vendors directory. Both of them do no work.
#install
wget http://codeception.com/codecept.phar
cp codecept.phar /usr/local/bin/codecep
#any combination hangs
/usr/local/bin/codecep bootstrap
vendor/bin/codecept build
codecept run
codecept
In am running PHP 5.5, and installed the latest version of codeception from the project web site.
Can not speak for your specific installation of Yii2 (basic/advanced/custom/etc) but this works for myself and my team:
In composer.json of your project ensure the following lines exist:
"require-dev": {
"yiisoft/yii2-debug": "^2.0.0",
"yiisoft/yii2-gii": "^2.0.0",
"yiisoft/yii2-codeception": "^2.0.0",
"yiisoft/yii2-faker": "^2.0.0",
"codeception/codeception": "2.2",
"codeception/specify": "^0.4.3",
"codeception/verify": "^0.3.0"
}
In a CLI client (terminal/cmd/putty) run php composer install from the root of the project and ensure the packages install. Next check inside the ./vendor/bin dir in your project, do you see a file named 'codecept'? You should.
Next, check that ./tests directory exists; again at the root of your project. Inside that should be a file called codeception.yml This is the main configuration file codeception uses the begin the testing process(es). Without it nothing works.
Back in the CLI client run php ./vendor/bin/codecept run -c ./tests/codeception.yml. In the worse case this should provide some output from Codeception.
Try: www.pceuropa.net/blog/yii2-tests-codeception-configuration-first-test/

Urturn API ur: command not found

I am trying to install urturn api and write my own expression for urturn.com
following http://webdoc.github.com/urturn-expression-api/#!guides/start
After:
npm install urturn-toolbelt -g
I am trying to run sandbox with:
ur sandbox
and got error:
-bash: ur: command not found
Please help
P.S. I am on Mac Os
thanks
It is likely your nodeJS npm/bin folder that is not included in your PATH.
Can you check your PATH variable?
Node NPM package bin files are all symlinked in the same ./bin folder. If you installed NodeJS using Homebrew (brew install node), it should be /usr/local/share/npm/bin.
You can echo your current path using:
echo $PATH
If the folder above does not appear in the list, check your .bashrc or .bash_profile files and fix any problem.
A fix that is likely to work is to add the following line in ~/.bash_profile
PATH=$PATH:/usr/local/share/npm/bin

Hadoop MapReduce 1.0.2 eclipse-plugin build fails...I don't get it

I have tried to build the Hadoop MapReduce eclipse-plugin from source, but get the following error.
SRC_BASE_DIR/hadoop-common/hadoop-mapreduce-project/build/ivy/lib/Hadoop/common
does not exist.
I cloned the Hadoop source from the Apache GIT repo and managed to build the actual Hadoop binaries using the following commands
cd SRC_BASE_DIR/hadoop-common
mvn clean install
This was successful so next I changed directory
cd SRC_BASE_DIR/hadoop-common/hadoop-mapreduce-project/src/contrib/eclipse-plugin
I appended eclipse.home property to the build.properties file...
echo "eclipse.home=/opt/eclipse" >> build.properties
then tried to build the plugin...
ant jar
But I still get the error outlined above.
What am I missing?
OK I was missing a step.
In the folder
SRC_BASE_DIR/hadoop-common/hadoop-mapreduce-project
I ran the following command
mvn -DskipTests install
which was successful. Then in folder
SRC_BASE_DIR/hadoop-common/hadoop-mapreduce-project/src/contrib/eclipse-plugin
I ran the command
ant jar
and this time it was succesful and created the JAR file hadoop-1.0.2-eclipse-plugin.jar
Now, I just hope that that the plugin works!