TextMate command to annotate your current ActiveRecord Model with the DB Schema
Edit: If you can’t wait until the end, here is the download link. Who hasn’t used the Annotate Models plugin written by Dave Thomas, of Rails Pragmatic Studio fame? If you haven’t don’t fret… The...
View ArticleRun gem install behind a firewall in Windows
I’m contracting at a client running a Novell network and wanted to create some small little ruby scripts to automate some tasks for me. But I ran into problems using gem install behind their firewall....
View ArticleDatabind a Combobox to an Enum Property – Version 2.0
I’ve first posted this tip on the 14 of May 2005 and I still get good traffic to the post. So I decided to update the post and code samples to use Framework 2.0 (I’m still not using 3.5) and improve...
View ArticleEasily create strong passwords
Create strong passwords on the command line by typing openssl rand -base64 6 and the output: => 050L+4Kx Run the command again: => /sUIIy8s Cool, now you should be able to create strong passwords...
View ArticleExecute sql within rails environment without using your models
When you have a query that you need to run as raw sql against the database, like batch data processing or maybe some data cleanup, and you don`t want to create ActiveRecord models to handle the data....
View ArticleMy bash history
Inspired by Ben Maybey and his bash history summary, here is mine: → 'history 1000 | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head 242 cd 117 clear 96 rake 70 sudo 57 ss 52...
View ArticlescrAPI on Snow Leopard
Today I needed to scrape some data from a website and tried to use the trusted old scrAPI to do the job. Grrrr, its not working. Throwing an error: Scraper::Reader::HTMLParseError:...
View ArticleHow to fix the iconv require error in Ruby 1.9
So you’re trying out the pre-release version of Rails 3.0 with Ruby 1.9 and you keep on getting the following error: activesupport-3.0.pre/lib/active_support/inflector/transliterate.rb:2:in `require’:...
View ArticleGems, gems, and more gems…
I’ve been working frantically at gemifying some plugins. I can’t unfortunately lay claim to have written these gems, but I needed to use them as gems with the new bundler system. So I created or forked...
View ArticleInstall RabbitMQ on Snow Leopard with Macports
Before we can start to install RabbitMQ, we need to update the MacPorts repository to use the latest RabbitMQ release: Open /opt/local/etc/macports/sources.conf in text editor, and replace the...
View Article
More Pages to Explore .....