During this post I’ll explain in details on how to set-up your first EXT JS 6 project using the Sencha Cmd tool for Linux.
I will be using Ubuntu, but there isn’t any reason this tutorial shouldn’t work for other distributions as well.
Let’s get get started !
Step 1: Install Java
You should have the JVM already installed on your machine. To check you can run the following command:
If it outputs the version then congrats, skip to Step 2, if you get a ‘command not found’ error. You can install Java by following this tutorial.
When you finish go to Step 2.
Step 2: Install Ruby
We will also need Ruby to run some tools. To install Ruby on Ubuntu 16.04 execute following commands
Then we will need to install a few ruby gems :
gem install compass
gem install sass
Step 3: Downloading the Free (GNU) version of EXT JS 6
To download the free version of EXT JS 6, you will need to fill a form here. Make sure that you understand the GPL License before your proceed.
In the form select “Sencha EXT JS” and then put your email, a download link will be sent to you.
PS: The form won’t be displayed if you have an Ad-Blocker enabled.
You will receive an email with a download link that will redirect you to a extjs.cachefly.net URL, unfortunately that link is broken !
Here is a fix :
In the email, right click on the “Download Now” button and then “Copy Link Location”
Open a terminal, and then type
This should output the HTML of a web page in your terminal.
This HTML should have in the top something like this
var redirecturl = 'http://cdn.sencha.com/ext/gpl/ext-6.2.0-gpl.zip?mkt_tok=Some-token';
We will need to copy that URL and then, in the terminal again type
Once the download is complete, you should have in your directory a ZIP file with EXT JS in it. unzip it somewhere accessible.
For the rest of the tutorial I will assume that I put it in a directory called ‘/path/to/ext‘
Step 4: Downloading Sencha Cmd
Head to this link and click and “Download now”.
This seems broken, for now, as well.
So here is a fix:
Open your terminal and type :
unzip the downloaded file, execute it, and follow the visual installation wizard.
When it is finished, open a new terminal and type
This should output the CMD version and a brief guide on how to use the tool.
Step 5: First EXT JS 6 project
Now that we have the tools set up, it is time to make our first project.
For this type the following in your terminal
sencha -sdk /path/to/ext generate app SampleAppName /path/to/where/put/sampleApp
Edit this, so that the path to the framework and the path to your application suit your needs.
If everything went well and a bunch of [INF] messages appear then congrats ! You have your first application!
However, if you encounter a weird Java IO Exception. Here is how to fix it:
Go to /home/USER_NAME/bin/Sencha/Cmd/184.108.40.206/bin (where you set-up the CMD) and rename the directory there to “linux-x64” this should fix the problem.
That’s it folks !! If you have any questions, don’t hesitate to leave a comment.
Also let me know if you’d like a guide on how to get started with this first sample project.