Articles

auto_complete problem in ruby 1.9

Recently I upgrade my rails version from 2.3.2  to 2.3.4 and ruby version from 1.8 to 1.9 .
By changing version of ruby,  I was facing problem in auto complete functionality.
To solve the issue , I applied below patch in lib/autocomeplete_macro_helper.rb file

def auto_complete_result(entries, field, phrase = nil)
return unless entries
items = entries.map { |entry| content_tag("li", phrase ? [...]

Sphinx, Chef and EY Cloud

I’m getting a client up and running on EngineYard’s Cloud offering, and it has been a pleasure. One of the things I’ve appreciated about using it is that I’m forced (in a good way) to use Chef, which is awesome.

Getting MacRuby’s compiler to work

MacRuby's logoThere is major news in Rubyland today. MacRuby’s team just released their fist beta of version 0.5 (an experimental, still incomplete version of Ruby), which brings JIT, removal of the dreaded GIL (Global Interpreter Lock), native threads, GCD (Grand Central Dispatch) for multicore computing, and a whole new set of features found in the release announcement to the table.

How To Ensure Your Email Gets Delivered

It goes without saying that email is the de facto method by which online businesses communicate with users and clients; without a doubt, it’s a necessary and core function of business today. That being the case, how does a business know that its  email is actually getting delivered?

Despite how significant email is, there’s confusion and a general lack of education about why email may or may not make it to its destination. So, I’ve spent some time putting together some helpful tips, and just as importantly, a list of things you want to be sure to avoid.

Call Your Code

I don’t typically get excited about phone stuff. I dread making or receiving phone calls like a small child dreads vegetables. But this is cool.

GitHub users troy and eric just launched Cloudvox.

Rails Envy Podcast – Episode #095: 10/08/2009

Episode #095. Dan Benjamin (Playgrounder, Hivelogic) is back this week and we keep it quick while still packing in the news.

Gem Building is Defunct

Gem building has been disabled since the move to Rackspace. This was because the system had to be rewritten to work with the new architecture and we had to provision an entirely new VM for the sandboxed gem building – things we didn’t want holding up the move.

Advanced Messaging & Routing with AMQP

Not all message queues are made equal. In the simplest case, a message queue is synonymous with an asynchronous protocol in which the sender and the receiver do not operate on the message at the same time. However, while this pattern is most commonly used to decouple distinct services (an intermediate mailbox, of sorts), the more advanced implementations also enable a host more advanced recipes: load balancing, queueing, failover, pubsub, etc.

Present.ly Updates iPhone App With Camera and Attachment Integration

Present.ly, our enterprise microblogging platform, which is used daily by many large corporations and government organizations, offers native versions of the application on all major mobile platforms. Today, Apple has approved the latest version of Present.ly for iPhone.

Entrepreneurship: Trial by Fire

 Entrepreneurship: Trial by Fire

Feed items | Rails Fire

Feed items

Great Lakes Ruby Bash

The Great Lakes Ruby Bash is now accepting talk proposals. The conference will be held on Michigan State University’s campus in East Lansing, Michigan on Saturday, April 17th.

We’re looking for passionate speakers to give 25 and 40 minute presentations about their experiences with Ruby and related technologies. Our goal is to engage attendees and inspire them to create great software, empower users, and continue learning with others.

Active Resource in practice

I’m working on app to integrate Pivotal Tracker and Harvest. There’s a great ruby wrapper around Harvest’s API, but there isn’t a decent Ruby wrapper for Tracker’s v3 API, so I thought I would just build one as I needed it.

Passenger and browser testing in virtual machines

If you’re running Passenger in development, here is how to make Windows running in a virtual machine connect to your app in Passenger.

Things that will rock the (my) world in 2010

Here are a few things that I’m really looking forward to using and abusing this year:

MongoDB

We’ve all been trying to shoehorn our Web 2.x applications into a 20 year old technology with an antiquated query language. If you haven’t looked into MongoDB, you need to, and you also need to check out MongoMapper.

acts_as_audited and authlogic

For those using authlogic that have had issues with auditing your User model, version 1.0.2 of acts_as_audited should cure your woes.

All you need to do is exclude the last_request_at and perisable_token fields from being audited. We also excluded a few other fields that don’t need to be audited:

How to Gemify your Rails Plugins

Ever since Rails added support for declaring gem dependencies, there is really no (good) reason to use plain ol’ plugins. We’ve been slowly gemifying all of our plugins as we need them. There’s a few hoops you have to jump through to get Rake tasks and Capistrano recipes working, but it’s fairly straight forward.

Capistrano, Git and SSH keys

This trick has been around for a while, but I’ve talked with several people that didn’t know about it.

When deploying apps with Capistrano, your server needs to have access to the Git repository. Generating an SSH key for each server is a bit of a pain, but there’s an easier way: SSH agent forwarding enables you to use any of your local SSH keys on the server. It’s really easy to set up.

Enable SSH forwarding in deploy.rb:

Cucumber scenarios that depend on Sphinx

I love writing apps that make heavy use of search indexes, but testing them can be a bit of a pain. Here is how I got ThinkingSphinx to play nice with Cucumber.

Here is the relevant part of what I put in features/support/env.rb:

Site-specific app for Rails docs

Unless you’re a Rails genius, you probably need to frequently reference the Rails API docs. And if you haven’t discovered it yet, railsapi.com is awesome.

John Nunemaker suggested that I create a site-specific browser and point it to a local copy of the docs from railsapi.com. I did and have been loving it, so I’m suggesting that you do it too.

Keepin' Sphinx Indexes Fresh

Stale indexes got you down? Embarrassed that your users’ searches are coming up empty? Act now and you can avoid stale indexes with NEW and IMPROVED delayed delta indexing!!