Installing Sencha Touch on Windows with IIS

Recently I was installing a copy of Sencha Touch 2.2.1 on my machine at home and I noticed a few issues with the install documentation when installing it on Windows and IIS. Note: This information applies to version of 2.2.1 of Sencha Touch and is really just a rewriting of the instructions to make things easier to install on Windows.

  1. Download Java Runtime Environment version 1.7 (1.6 also works, but 1.7 is best). Sencha Cmd is written in Java and needs the JRE to run.
  2. Download Sencha Cmd.
  3. Download Ruby version 1.9.3 (Ruby version 2.0 doesn’t work correctly with Sencha Cmd).
    Download Ruby 1.9.3.n from Download the RubyInstaller .exe file and run it.
    Set your PATH variable to point to the Ruby 1.9.3 install directory.
  4. Add “application/x-json” as a MIME type for Sencha Touch to work properly. For information on adding this MIME type, see this Stackoverflow article.
  5. Create a project directory where you want to serve applications and ensure the directory is writable. This directory only needs to be writable by the user that is running Sencha Cmd and it needs to be where IIS can see it.
  6. Copy the Sencha Touch unzipped directory to the directory where you are serving applications.

Now at this point you should be able to run the Sencha Cmd app to generate an application. To do this you’ll need to open up a command window (DOS box for us old timers. :-)) and run the following command:
sencha generate app MyApp ../MyApp

You can also run the app in Sencha’s own web server has well, but isn’t really necessary if you’ve got it setup correctly in IIS. To do this run the following command :
sencha fs web -port 8000 start -map <dir_name>

Mike GriffithInstalling Sencha Touch on Windows with IIS