Fedora 10 w/ Aptana Studio 1.2 & RadRails

Here’s a short recipe for getting Fedora 10 up and running, with RadRails. Fedora 10 comes with Eclipse 3.4, so for this we’re going to use the stock MySQL & Eclipse from the repositories, then add the Aptana Plugin to Eclipse, then add the relevant Ruby Gems to the root filesystem.

I’ve done it this way because: Eclipse from the repositories also includes some nice Fedora niceties, Aptana’s PHP editor has a unique cloud feature, and Fedora’s repositories don’t have all the Ruby Gems required. Using the RubyGems package manager in this instance is better than using the Fedora one.

1. yum install mysql-server eclipse-pde ruby ruby-devel ruby-mysql [if you get problems w/ sqlite3 and directory names, go with MySQ. You need the "SDK" version of eclipse, not the "Platform" version , and I think PDE provides it. You'll need a Ruby interpreter (this one is the slower stable 1.8 interpreter, not the newer 1.9 development interpreter) and the Ruby header files].

2. Scan through some existing documentation from Aptana. Follow the steps documented on this page.

3. Once you have Aptana running within Eclipse, open up the “My Aptana” page. Click on the “Plugins” button of the My Aptana page (subtitle: Extensions for Studio. It’s the yellow one, you can’t miss it, the fourth icon from the left).

Screenshot of Eclipse with the My Aptana page open

Screenshot of Eclipse with the My Aptana page open

4. Choose the RadRails plugin. If you also do PHP development, I also recommend installing the PHP Extension. This is unique because you can develop PHP projects locally then deploy to Aptana’s Cloud service in one-click.

5. Once RadRails is installed in Eclipse, you will also need Rails on your local Linux system. Open a terminal, become root (su -), download the latest RubyGems file from RubyForge. You’ll need 1.3.1 or above. Un tar the file (tar -zxf rubygems-1.3.1.tar.gz), then go into the rubygems directory you just created (cd rubygems-1.3.1) and run the setup (ruby setup.rb)

6. Congrats – you have Eclipse w/ Aptana Studio & RadRails set up, and a local install of Ruby w/ RubyGems. Now install all the gems you’ll need for RadRails (gem install actionmailer actionpack activerecord activeresource activesupport cgi_multipart_eof_fix gem_plugin mongrel rails rake ruby-debug-base ruby-debug-ide ruby-prof -V) Note: the -V is the verbose switch.

7. Viola, you should now have a working install. Go to RadRails and create a new project, everything should be automated and Eclipse should create for you a nice shiny new Rails project. Good luck & Have Fun!

CakePHP vs Django dilemma

I have a nice little pet project to work on … but I’m facing a bit of a dilemma right now. The project is a web-based tool to analyse information, and my debate is … which of the these 2x awesome tools should I use?

Django (which runs on the Python language) is what I’m currently experimenting with. And the one I’m thinking of using is CakePHP (which runs on the PHP language). Both Python and PHP are what I’d consider, “Scripting” high-level languages. Python is a great “glue” language. I feel Python has more promise than Perl for multi-developer situations, in that Python encourages good programming style, while Perl gives you enough rope to do the job, with left over to hang yourself, your tester, maintainer, and documenter with. PHP suffers a bit of the “spaghetti” criticism too. Continue reading