
I’ve been using the new node.js based Cloud9 IDE since version 0.15, though still in need of much polishing, it is a great IDE for node.js applications.
If you want to get up and running with Cloud9 quickly, they now have a hosted commercial version available, which is free for open source projects: cloud9ide.com Actually if you like the idea of accessing your projects from anywhere this may be the best choice.
If you want to run Cloud9 locally, you can download it from github: https://github.com/ajaxorg/cloud9
However, the version on the master branch is 0.20, which is some ways behind the commercial version (which appears to be based off the development branch). The development branch has some nice features including themes, a cleaner interface, easy to access debugger, and built-in jslint style highlighting. The development branch seems to have problems installing under Linux at the moment, so here is a quick tutorial on how to get it running locally:
1. Install node.js
Get the latest version of node.js, currently 0.4.2 (it changes almost every few days), and install it.
1 2 3 4 5 6 7 8 | mkdir nodejs-projects cd nodejs-projects wget http://nodejs.org/dist/node-v0.4.2.tar.gz tar xvf node-v0.4.2.tar.gz cd node-v0.4.2 ./configure make sudo make install |
2. Clone the Cloud9 repository
We also need to switch to the development branch.
From the ~/nodejs-projects directory:
1 2 3 4 5 | git clone https://github.com/ajaxorg/cloud9.git cd cloud9 git branch devel origin/devel git checkout devel bin/cloud9.sh |
The last line will initialize cloud9, but cause an error at the end. Don’t worry we are about to fix that.
3. Compile node-o3-xml
This is necessary until the development branch project starts supporting node.js v0.4.x on Linux.
Again from the ~/nodejs-projects directory:
1 2 3 4 | git clone http://github.com/ajaxorg/o3 cd o3 ./tools/node_modules_build cp build/default/o3.node ../cloud9/support/jsdav/support/node-o3-xml-v4/lib/o3-xml/ |
Note: I also had to install libxml2-dev to get it to build.
4. Run Cloud9 IDE
Create a directory in your nodejs-projects folder for a project, then go to the cloud9 IDE directory and type:
1 | node bin/cloud9.js --workspace ~/nodejs-projects/<project-name> |
Then navigate to http://127.0.0.1:3000/ in your web browser.
6. Final thoughts
This is a development branch, so expect a lot of bugs in it, and be sure to keep pulling the latest changes and reporting issues as they arise.
Just used this to set node and cloud9 running on Debian Lenny. Worked a treat, other than needing to upgrade git from lenny-backports (otherwise git-submodules complains). Thanks so much for writing it up!
I was having this error at step 3 “o3.node: undefined symbol: __sync_add_and_fetch_4″. To fix it, I had to add “-march=i686″ to CCFLAGS and CXXFLAGS in wscript before the build.
Thanks bro