TextMate reigns supreme with ‘Ack in Project’
The one thing holding TextMate back from Ruby / Rails domination is its horribly slow search functionality. Using ‘Search in Project’ will take what seems like an eternity to pop up any results. The only real attempt at solving this headache was to use ‘Grep in Project’, but it left a lot to be desired including search speed. Now comes the solution, ‘Ack in Project’ was a project created on GitHub back in August to use the much more efficient Ack library for searching. With enhanced output, it has given other IDEs like NetBeans and IntelliJ a swift quick to the balls as to what is the best Ruby / Rails editor.
$ cd /Applications/TextMate.app/Contents/SharedSupport/Bundles/ $ sudo git clone git://github.com/protocool/ack-tmbundle.git Ack.tmbundle
Use Ack in Project with Cmd+Shift+A
2008090808_moving_to_denver.rb
The lack of posting was not done in vein. Over the past few weeks I have been interviewing with companies and finally settled on Factory Design Labs. This will be a nice move away from the Java world that I have been seemingly trapped inside for the past few months into a Rails position. Since I am in Chicago and the new position is in Denver, that means its time to move and to what a better city! I am an avid fan of everything outdoors and living close to the elements. This post is just a status update for anyone contemplating removing my blog from RSS for lack of updates. I will begin posting regularly again after my first few days at Factory Labs on September 23.
Rubyme opens its doors.
I have been working long hours getting this site up and running. The concept was initially drafted after some tutoring work I had done and the difficulty I had in coordinating everything. If you have not yet figured out, the site is called Rubyme (www.rubyme.net). The goal of the site is to provide an easy way for users to find help on anything from specific project difficulties to a more typical tutor style. Currently many of the features are still under heavy development, but the basic functionality is there. I encourage you to sign up and become a tutor. It is a great way to make some money, get exposure, and learn. There will be ongoing patches, so please report any problems to my email address: justin.smestad@gmail.com
mod_rails setup issues and solution
So I was migrating my server over to Debian Lenny from Etch and ran into some interesting problems along the way. The first of which is related to an open ticket on the mod_rails issue tracker. The conflict appears to be with Wordpress permalinks, .htaccess and mod_rails. However, without my knowing when I installed mod_rails (a.k.a Passenger) via the script it disabled by rewrite module. So when I went back to check this blog, running wordpress, all the permalinks were broken. I had tried everything from setting ‘RailsAutoDetect off’ and ‘RailsAllowModRewrite on’, however neither of these are even needed. I just had to issue the simple commands:
sudo a2enmod rewrite sudo /etc/init.d/apache2 restart
After these two commands, you can stop pulling out your hair and begin shaking your fist at the sneaky passenger/mod_rails installer. Just goes to show that automated installers are not always the holy grail.
rboard is one step closer to a reality
Radar, a friend of mine in the Ruby community, has finally achieved success with his most recent project. He is working on implementing the ‘ideal forum application’ for the folks over at Rails Forum. I was lucky enough to give him a hand for a small chunk of his code, topic moving! Figured it was blog worthy and if you want to see some intimidating code, rboard is as good as any!
JRuby & JTestR in Eclipse
Continuing my rampage upon the JRuby community, I have achieved beautiful success with running my tests inside of the eclipse IDE as a JUnit test. Now I have limited knowledge in the JUnit realm and encourage those to improve upon my approach.
In your eclipse Package Manager sidebar, Right Click -#> Run As.. -#> Run Configurations. Go ahead and select ‘JUnit’ and hit the ‘New Launch Configuration’ button.
Fill in the configuration as follows:
* Run a single test Project: your-project-name Test class: org.jtestr.ant.JtestRSuite
Now just open the ‘Arguments’ tab and inside the ‘VM arguments:’ box
-Djtestr.junit.tests=rspec_tests
rspec_tests is the folder where my tests are stored, feel free to change this to something like /test/jtestr/funny_test or whatever structure you store your files in.
I am still trying to figure out a more effecient way to get these test to run under eclipse. Till than I can always fall back on this approach as well as the standard ant task.
Git your own server!
With the recent boom of GitHub, there are thousands migrating from old subversion and even cvs servers to git. Surprisingly however, many people would rather pay GitHub to host their site instead of doing it themselves. Well I may be on the git bandwagon, but I am definitely not on the pay-for-git one. I recently setup two git servers (for redundancy). This will be a brief tutorial on getting your own git server running on Debian Etch/Lenny/Sid (or Ubuntu).
First we need to install git. Simple enough with this command:
$ sudo apt-get install git-core git-doc git-svn git-email git-cvs
Now we want to ensure git installed correctly
$ git --version git version 1.5.6.3
If you are running Debian Etch, you need to use the backports-etch repo to install git >= 1.5. Or compile it from source.
Alright then just follow the commands:
$ sudo apt-get install python $ sudo apt-get install python-setuptools
Once those are installed just copy paste the following commands. We are going to use gitosis as a way to manage repositories and git access privileges.
$ git clone git://eagain.net/gitosis $ cd gitosis $ python setup.py install
If you receive any errors from running the setup.py script, ensure you installed all the packages above from apt-get.
$ sudo adduser \
--system \
--shell /bin/sh \
--gecos 'git version control' \
--group \
--disabled-password \
--home /home/git \
git
This will setup all your repositories inside of /home/git, feel free to change this to whatever location you desire. Now thats all done, we just need to get your SSH certificate setup so that you can initialize your gitosis install.
This is how it would be done on OSX (this guide for full info on generating SSH keys). From your local machine, issue this command:
$ scp ~/.ssh/id_rsa.pub yourusername@yourserver:/tmp/
Now to wrap this up quickly, go back to your server and setup the SSH key for the gitosis repo.
$ sudo -H -u git gitosis-init < /tmp/id_rsa.pub
If you get an error on initialization then you do not have git >= 1.5. For the rest of us, now we just need to edit the gitosis repo to add/delete users and git repositories! Issuing a simple git push, will propegate the change. For full information, see the gitosis README.
My Design_fu is lacking, need help!
This time had to come sometime, I have been ignoring it for just too long. I need to find a web designer. For years I have been able to get away with modifying open source layouts and copying trends on other sites. Well it just isn’t going to cut it for the web applications I have coming through the pipe right now. This definitely is an interesting problem that I am sure many software developers face. Exactly how I am going to find someone and build a work relationship remains to be seen. The majority of designers are either of ‘template monster’ quality or they are working for larger media/print corporations which are FAR out of my budget. Maybe I should write 37signals and tell them to add a chapter on this to their ‘Get Real?’ book…
As always, I will keep blogging as the search continues to unfold. Wish me luck!
JtestR - alive and kicking
Last week I posted about my JtestR problems and the lack of any solution. Well after some generous help from Ola Bini, JtestR’s lead developer, we found the problem. Apparently, you cannot run your Java application with the jtestr.jar file inside the root directory. The jar must be placed within a subdirectory, otherwise your Ruby runtime will try to include the JtestR.jar file through its require ‘jtestr’ statement. Its an odd quirk, with an easy workaround. Ola Bini has said its fixed in the latest trunk build, but to use the workaround until 0.4 comes out. I would like to thank him for all his help troubleshooting this issue. Cheers!
datamapper_fu
I have been discussing the potential of developing a datamapper-native attachment_fu port in the #merb and #datamapper channels. The response seems to be in agreement that this type of plugin needs to be developed, as building an ORM agnostic plugin of this type would add user configuration and confusion. Also in the spirit of Merb, “no code is faster than no code”. This may spawn other merb plugins under the _fu tag, but we have to start somewhere! Its also being discussed as to what happens with attachmerb_fu, and it seems to be heading down the AR-native route.
The project has its initial commit and encourage you to come contribute either through testing or actual code.

Comments (16)