Thursday, May 21, 2009

Keywords in the Location Bar: I'm Feeling Lucky

So, I use Firefox whenever possible on whatever machine I happen to be on. Most of the time that's on my laptop and I have several plugins that enhance my Firefox experience. I'm a big fan of the delicious and evernote plugins.

What I wanted was the ability to do an "I'm feeling lucky" search from the browser bar somewhere. What I found was there's a setting for that.

Go to the keyword.URL setting in about:config on your Firefox 3 browser. Don't worry there wasn't a warranty in the first place, but do be careful when you're playing around in here.



That is the url you hit when the jibberish you type into the location bar of the browser doesn't look like a website. So this is the setting to change. The url I use is:

http://www.google.com/search?btnI=I%27m+Feeling+Lucky&ie=UTF-8&oe=UTF-8&q=

Make sure the keyword.enabled is true. It should be by default but just make sure.

Now you can type in:



And be directed straight to the rdocs on paperclip.. If you're as lucky as you feel of course.

Friday, May 15, 2009

Quick Heads up: Upgrading from Rails 1.2.6 to 2.3.2

I was just upgrading one of our apps into the new age from 1.2.6 to 2.3.2 and found an interesting issue. With the corresponding upgrade of Rspec. The new rspec generates a spec_helper.rb file with this line at the top:


ENV["RAILS_ENV"] ||= 'test'


For some reason this plays funny with our environment in that all of our dev machines were running the tests in development mode. Obviously somewhat less than ideal. Just take out the 'or' from the 'or equals' and we're set.


ENV["RAILS_ENV"] = 'test'


There is probably more to this story but just in case this could help someone wanted to jot it down real quickly.