I want to create a project using Sencha touch. My OS is Ubuntu. I installed Sencha in Ubuntu, downloaded sencha-touch-2.1.0-gpl and extracted it. I followed instructions in the documentation using terminal with the following code:
sencha generate app GS ../GS But I got an error message:
sencha: command not foundCan anyone help me with this?
5 Answers
[EDIT]
Sencha has released new version of SDK tools and they are now calling it "Sencha CMD"(Not sure why). For Sencha Touch 2.1* you will need to uninstall old sencha SDK tools and install Sencha CMD. It can be downloaded from here:
Old Sencha SDK tools requires "command" directory inside sdk folder but from 2.1.0 that folder is not available. For more details about new CMD please refer
[/EDIT]
[OBSOLETE]
You need to install SDK tools also, so please go to and install correct(Check OS & Bit) Sencha SDK tools. Once installation is successful you should be able to run the command from terminal.
[/OBSOLETE]
Command Not Found
Upon running sencha, if there is an error message appears saying "sencha: command not found" on OS X / Linux or "'sencha' is not recognized as an internal or external command, operable program or batch file." on Windows, follow these steps to troubleshoot:
- Close all existing terminal / command prompt windows and re-open them.
- Make sure that Sencha SDK Tools is properly installed:
- The installation directory exists. By default, the installation path is /Applications/SenchaSDKTools-{version} on OS X, /opt/SenchaSDKTools-{version} on Linux, and C:\Program Files\SenchaSDKTools-{version} on Windows.
- The path to SDK Tools directory is prepended to your system's PATH environment variable. From the terminal, run echo $PATH (echo %PATH% on Windows). The SDK Tools directory should be displayed in part of the output. If this is not the case, add it to your PATH manually.
- The environment variable SENCHA_SDK_TOOLS_{version} is set, with the value being the absolute path to the installation directory mentioned above. For example: If the installed version is '2.0.0-beta2', a SENCHA_SDK_TOOLS_2_0_0_BETA2 must be set. From the terminal, run echo $SENCHA_SDK_TOOLS_2_0_0_BETA2 (echo %SENCHA_SDK_TOOLS_2_0_0_BETA2% on Windows). If the output is empty, set the environment variable manually.
Try this:
I was able to make mine work perfectly. You need to add permission to sencha. and make sure that sencha CMD created a path inside your .bashrc then
Follow Step 4 , "sudo chown -R yourUsername:www-data sencha-touch-2.0.1-gpl"
I used some time and made a little tutorial for this, maybe it works for you, best regards, Victor
1This link works perfectly: how to setup sencha in ubuntu
Or
Just run senchacmd package file which is download from sencha for linux and check .bashrc file, either logout or restart system or best way is to use "source" command e.g source .bashrc (update: run command where your .bashrc file is located, normally it would be located in home/username/.bashrc). After this point your cursor to sencha sdk directory or go through terminal and type sencha generate app app_name ../app_name that's it, you are done!!