Thursday, March 25, 2010

Installing bare bones Eclipse

If you have ever wanted Eclipse without Java, C++, PHP and so on, you can get a bare bones Eclipse here:

http://download.eclipse.org/eclipse/downloads/

To get to the download link, follow these steps:

  • Click the latest release
  • On the next page, on the left menu, click "Platform Runtime Binary"
  • Click the appropriate link for your platform

Sunday, February 21, 2010

The hunt for a Ruby and Ruby on Rails environment

I have been on a quest for a good setup for having some fun with Ruby and Ruby on Rails. The problem is that I'm an IDE-o-holic, so I need an environment that is both fast and where I feel home.

I am developing on Linux, so I will only consider applications available to me on this platform.

My research has resulted in three alternatives:
  • RadRails from Aptana
  • Eclispe with Dynamic Languages Toolkit
  • Vim/gVim
Vim/gVim:

You might ask yourself "Why vim? Isn't that a text editor?" and you'd be right. But with the right combination of plugins, and the time to learn the shortcuts, it's really powerful.

The plugins you'll want are these:
With this combo you will navigate between models, helpers, controllers and other files of interest with ease, as long as you bother to learn the shortcuts.

Eclipse with Dynamic Languages Toolkit: 

This is the pure IDE I've been looking for. It's fast, it's lightweight and it's familliar to me. To get this setup up and running you'll want these:
This setup gave me ALMOST everything I needed. I am on familiar grounds, and it is fast as hell. One problem though, there is no *.erb syntax highlighting (or coloring as Eclipse calls it). This is pretty frustrating, and I haven't been able to work around it completely.

Last but not least:

Aptana RadRails

To get this up and running, you fetch it here:
This is really a complete package, so if you want to get up and running fast, this is it. The webpage can tell you more about its features than I will bother to write here.

Personally I think RadRails is too bloated with features and it feels sluggish for my tastes. It's been a while since I tested Aptana RadRails, so things might've improved, but I feel like it needs to be mentioned in this list.

Read below why I have striked through this.

Conclusion

I ended up with a combination. I am using Eclipse with Dynamic Languages Toolkit for editing pure Ruby files, and through Eclipse I open ERB files in gVim.

This works pretty well for me. I have an environment that is lightning fast and where I get all the features from an IDE I care about.

Update 25.02.2010:
I have now tried RadRails for the past couple of days and I must really say it has improved since last time I used it. It now feels both fast and responsive, and it really does package everything I need into one neat package. I am going to try RadRails for a while now, it really does offer a lot for being free!

Friday, February 19, 2010

Using Windows Vista with Webdav / Web Folders

Using Windows Vista with Webdav proved to be a challenge.

After many hours of packetsniffing and debugging, it boils down to this:
  • Windows Vista needs to be SP1 + Hotfix or SP2 to function 100%
  • If you don't have SSL, you need to implement Digest authentication.
  • If you have a self signed SSL certificate, forget it, it will fail. I had to use a trusted CA to finally get it working.
  • In Windows 7 everything works out of the box.
The MAIN problem is that in Windows Vista and Windows 7, the Webdav implementation that comes with Windows is used. In earlier versions of Windows, the Webdav implementation that comes with Office is used, which is probably a lot more mature (Please correct me if I'm wrong).
Much kudos to this guy for writing up a good overview of the different DLL versions in different flavours of Windows. The list says Windows Vista without any service packs + the Hotfix will work, but for me I had to apply SP1 to get it to work.
For very interested folks, I have created a Webdav Compatibility Matrix you can check too.

Tuesday, January 26, 2010

How to run Firefox 3.7a in headless mode

This post is inspired by a need to get Selenium testsuites running faster. This is done on Ubuntu Linux x86_64 platform.
I will assume you have Firefox 3.7a from the daily repositories installed on your system.
First you have to get the sources for a incubator project called 'Offscreen':
  • wget http://hg.mozilla.org/incubator/offscreen/archive/tip.zip
Unzip them:
  • unzip tip.zip
Download compile configurations for Offscreen and put them in the newly created directory:
  • wget -O mozconfig https://bug446591.bugzilla.mozilla.org/attachment.cgi?id=350162
Inside the new directory, run:
  • make -f client.mk build
You might need some dependencies. Make will tell you what you are missing, I will not describe how to get the dependencies needed, except this:
  • apt-get install autoconf2.13
If everything went correctly, you should now be able to do:
  • ../obj-x86_64-unknown-linux-gnu/dist/bin/xulrunner /usr/lib/firefox-3.7a1pre/application.ini
You should now be presented with lots of output from your newly compiled Xulrunner, most notably when it stops:
  • [url = chrome://ubufox/content/startpage.html]
Congratulations, you now have your very own headless Firefox!

Friday, July 11, 2008

How to set up Zend Studio Neon with a SVN project

  1. In Zend Studio, select File -> Import
  2. Select SVN -> Projects from SVN and click 'Next'
  3. Create a new repository location to your SVN server
  4. Select the Folder you want to be the root of your project
  5. Click Finish
  6. A new dialogue should appear. Select the option to "Check out as a project configured using the New Project Wizard"
  7. Click Finish
  8. Select PHP -> PHP Project and click 'Next'
  9. Give the new project a name and set up any specific project configurations you may have. Click 'finish'.
  10. Voila!

Tuesday, July 8, 2008

How to set up Eclipse and PDT for Cola and DocShare through ECF

1. Follow the instructions to install ECF:
http://www.eclipse.org/ecf/downloads.php

2. In my example let's use gmail as a communications protocol:
  • Open the 'Communications' perspective
  • Click the icon that says 'Connect to Provider'
  • Select XMPPS
  • Input your gmail account and password
3. ECF has a limitation so that you can only use it with the default text editor and the Java editor, but we want to use it with PDT:
  • Open ../eclipse/plugins/org.eclipse.ecf.docshare_2.0.0.v20080623-0024.jar
  • Open the file plugin.xml
  • Paste in this XML:
<extension point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:org.eclipse.php.core.phpsource.source.EditorContext">
<dynamic class="org.eclipse.ecf.internal.provisional.docshare.menu.DocShareRosterMenuContributionItem"
id="org.eclipse.ecf.docshare.php.dynamic3">
</dynamic>
</menuContribution>
</extension>
Now you should have a new menu entry in PHP editing mode that displays "Share Editor With"

How to set up Eclipse, Subversive, JavaHL and Ubuntu

1. Get Subversion sources from here:
https://launchpad.net/ubuntu/intrepid/+source/subversion/1.5.0dfsg1-1ubuntu2

2. Unpack it:
tar zxvf subversion_1.5.0dfsg1.orig.tar.gz

3. Get the needed dependencies packages:
apt-get install libapr1-dev
apt-get install libaprutil1-dev

4. Install Subversion 1.5:
cd subversion-1.5.0dfsg1

./configure --enable-javahl --with-jdk=/usr/lib/jvm/java-6-sun/
make install
make javahl
make install-javahl

5. Specify where Eclipse can find the new java classes you just installed (I have wrapped this in a shell script, but you can also put this in eclipse.ini):
/some/path/eclipse -vmargs -Djava.library.path=/usr/local/lib

6. Add Polarion SVN connector weekly update site:
http://www.polarion.org/projects/subversive/download/eclipse/2.0/weekly-site/

7. Add Subversive weekly update site:
http://download.eclipse.org/technology/subversive/0.7/weekly-site/

8. Install Subversive and your Native JavaHL Connector for Subversion 1.5 through the update tool in Eclipse.

9. Enjoy!

I hope I didn't miss anything important, since I wrote this after I successfully got it all installed.