Drupal drush error - drupal-7

I have installed Composer on C drive (C:\Documents and Settings\All Users\Application Data). I have a drupal7 project on D drive (D:\wamp\www\drupal71).
I have installed Drush by this command: composer global require drush/drush:7.* and it successfully downloaded but skipped installing because of naming conflicts. Please see the attached screen shot.
Now when I run the drush command drush status, it shows that "drush is not recognized as an internal or external command".
Can you please guide / help me?

You have to add the PATH to your environment variables. To do this:
Right-click My computer, and go to "Properties"
Go to Advanced System Settings
In the Avanced tab, click Environment Variables
At user variables for User, you should add a line to the "Path" variable ( if you don't have that already create it)
You should add the absolute path where your drush file is DON'T FORGET TO PUT ";" before the other paths which may be already there.
My drush file absolute path was E:/windrush/vendor/drush/drush so I added like the following picture

Related

The term 'behave' is not recognized as the name of a cmdlet, function

I have Python 3.10.7 with the follwing packgaes installed using pip install in command line:
behave 1.2.6
selenium 4.4.3
These have also been added to the packagelist of the project using the project config in pycharm
Also behave is in the systme path as well along with python.
I am trying to use the behave command but I am getting the following error:
behave : The term 'behave' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ behave features\myfeaturefile.feature
Following is my project directory:
Following is my project in pycharm:
I need help in fixing this problem as I am new to this tool. Thanks
First check if you have behave and python in the path variables.
Check if you can execute the below command
C:\demo>behave -h
If this does not return a list of help commands associated with behave, this means that behave is not in the path variables
Alternatively, you can check it via cmd using the "PATH" command. This will show you all the entries in the system path
C:\demo>PATH
PATH=C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\Program Files\AdoptOpenJDK\jdk-11.0.11.9-hotspot\bin...
If behave or python are not in the path variables, you can set them using
set PATH=%PATH%;c:\PATH_TO_BEHAVE
NOTE: Setting path using cmd is only valid till the time the cmd window is open. Once you close it, the path variable will be rest to original values.
Behave, along with a few other .exe files is sitting in the:
C:\Users\chauhany\AppData\Roaming\Python\Python310\Scripts
As per your instructions #Manish Agarwal, I added the C:\Users\chauhany\AppData\Roaming\Python to the PATH from the command line and re-started the machine. But it didn't help. I then moved the behave.exe from the above location to my python 3.10 directory which is sitting in C:\Program Files\Python310 and python is in the system path, and restarted my machine again.
I then deleted and recreated my project with the new feature file (same directory structure).
If I now run the same command, that is, features\myfeaturefile.feature from
C:\Users\chauhany\PycharmProjects\martechBehaveProject>
I get a FileNotFound error
So I went to the folder where the file is actually sitting that is:
C:\Users\chauhany\PycharmProjects\martechBehaveProject\features\steps> and then re-ran the command and it worked.
I was under the impression that if you have just one feature file you don't have to specify the actual feature file and it can be run from anywhere in your project i.e., from any location which certainly is not correct.

Jenkins error: Can't find Xvfb installation

I defined Xvfb installation on Jenkins according to these instructions: https://wiki.jenkins.io/display/JENKINS/Xvfb+Plugin.
Access Manage Jenkins >> Global Tool Configuration. In Section Xvfb installation, put name and fill the field Directory in which to find Xvfb executable with /usr/bin.
But this error appears:
Home path does not contain Xfvb executable: /usr/bin and build fails with following error: No Xvfb installations defined, please define one in the configuration. Once defined you’ll need to choose one under Advanced options for Xvfb plugin job settings and save job configuration.
I have Xvfb plugin version 1.1.3
How can I solve this problem?
Even I faced the same issue while setting up the jenkins
Manually I had to set the path like below
export PATH="$PATH:/usr/bin/Xvfb"
And then adding /usr/bin in Global Tool Configuration under "Directory in which to find Xvfb executable " solved the issue. Hope this helps.

Failed to start Mongodb

I'm studying pro angularjs by adam freeman. I've installed deployd v0.8.8 and created sportsstore. When I run 'dpd –p 5500 sportsstore\app.dpd' form command prompt, it shows 'Failed to start MongoDB Make sure 'mongod' are in your $PATH or use dpd --mongod option. Ref: http://docs.deployd.com/docs/basics/cli.html bye'.
I've found all the possible answers as much as I can. But still can't solve it. I'm using Windows 7 32-bit. Please help me.
Try to run like this: http://pastebin.com/raw/apKQb043 (Moved code snippet to pastebin).
Hello you must install mongodb after this add the path of th folder installation into the windows path environment restart your cli and type again the command
from control panel open up advanced system settings. click on environment variables. under system variables select path and click edit. then add the directory for your mongodb installation in my case is "C:\Program Files\MongoDB\Server\3.2\bin". P.S if you use windows 8.1 or an earlier release of windows OS type a ";" first. leave out out the quotation marks.

How to setup the proxy info in yypkg for sherpa.exe when installing Win-builds Project

I am trying to install the latest GCC compiler on windows 7 by using "Win-builds Project". Since the company I am working for has proxy. When I run the command win-install.bat. I got an error:
http://win-builds.org/1.3.0/packages/windows_64/package_list.el:
2014-02-21 11:39:44 ERROR 407: Proxy Authentication Required.
In the batch file, I found code:
yypkg -init
yypkg -config -setpreds host=%_YY_ARCH%-w64-mingw32
yypkg -config -setpreds target=%_YY_ARCH%-w64-mingw32
sherpa -set-mirror http://win-builds.org/1.3.0/packages/windows_%_YY_BITS%
I think the yypkg.exe does the initialization work and configs sherpa and let sherpa.exe to download and install files.
My question is how can config yypkg my username and password? I did google search, but I cannot find any info about yypkg nor how to config sherpa.
[enter code here][1]Proxy set up can be done via command line
How can I set a proxy server for gem?
set http_proxy=http://your_proxy:your_port
set http_proxy=http://username:password#your_proxy:your_port
set https_proxy=https://your_proxy:your_port
set https_proxy=https://username:password#your_proxy:your_port
These command snippets need to be entered on 'cmd.exe', and before running the wget, to download files manually via portable wget as described on page:
http://win-builds.org/doku.php/download_and_installation_from_windows
few IMPORTANT Pointers, after the packages have been downloaded manually, and running the 'yypkg-1.5.0.exe'
At first the Application UI is unresponsive, DO NOT CLOSE IT
After some time, change mirror dialog appears where you would need to type/paste the Local folders location(this is the folder where files were downloaded manually)
Local folder path needs to be similar to the following where 'package_list.el.tar.xz' file resides.
file:///C:/usr/MinGW/1.5.0/packages/windows_64
after that all works fine

Cannot get the cakephp 2.3 console running on xampp on Windows 7

I am running a cakePHP app which is located in C:xammp\htdocs\scheduling. I am running it on xampp on Windows 7. I have added the following environment variables:
C:\xampp\htdocs\scheduling\app\Console\;C:\xampp\php;
but still cannot get the cakephp console in operation. When I navigate to C:\xampp\htdocs\scheduling\app and try to get the cake console or cake help, I am given a message that it is not recognized as an internal or external command.
And yes, I did reload the cmd after adding the environment variables.
Its Easy just follow the steps as mentioned below:
put Your PHP Path in environment Variable
Open Command Prompt with Admin priviliges
change directory to C:\xampp\htdocs\your_appname\app\console
Type in " Cake Bake " and run
And You Are ready to go...................Happy Baking...........................
Just reloading the cmd is not enough, you need to either reboot your system or add it once manually before you are ready to reboot:
set Path="%Path%;c:\xampp\htdocs\scheduling\app\Console"
If all else fails, you can always call it in full from your app dir:
Console\cake bake
It's a little bit more typing, but this will work regardless of the Path variable settings.

Resources