Archive for the 'Ruby on Rails' category

Announcing CommunityEngine - A social networking plugin for Ruby on Rails

MissingMethod is releasing CommunityEngine, an open source Rails social networking plugin that you can drop into your new or existing application, instantly giving you all the features of a basic community site.

Lately there have been a raft of Rails social networking applications, so how is this one different? Well, other open source solutions like LovdByLess and OneBody are packaged as complete applications, while CommunityEngine is built as a plugin. This makes it easy to customize and even override its functionality.

For people who are interested in adding community features to an existing application, or for people who want to manage multiple communities using common code, CommunityEngine should be quite useful.

EC2 + Rails gets easier and easier

I’ll be talking about using EC2 as a production deployment option for Rails apps at this weekend’s MinneBar, and to be honest, at this point the discussion will revolve around the many excellent options we now have for setting up, deploying and managing Rails apps on EC2 instances. Add this one to the list: ElasticRails - a collection of Capistrano libraries that reduce the process to: cap launch_instance, cap setup_server, and cap initial_install.

Deploying Rails on EC2

I’m a contributing blogger over at Rail Spikes, and my first post is about deploying Rails applications on Amazon’s EC2 service. Go check it out!

R2 says you should!

Update: Snapballot & Feedmarker on EC2

For fun, and because I wanted to learn something new this weekend, I moved Feedmarker and Snapballot over to Amazon’s Elastic Compute Cloud (EC2). They’ve been running happily over there for the last three days! Hopefully I’ll have time to write up my experiences making the move a little later; but for now let me just say that for a non-sysadmin like me, it was actually pretty easy. And now I’ve got a nice little EC2 AMI (Amazon Machine Image) that I can deploy with one click, should I ever need another server instance.

More on this later…

Interview on RubyInside

Hey, check out this interview I did with Peter Cooper of RubyInside:

“Rails allows me to develop and deploy a lot of ideas because it removes barriers from the path. Getting a simple idea to the point where it’s usable in Rails is a matter of hours, so there isn’t a lot of cost/risk in trying things out.”

Snapballot - dead simple surveys

Check out my latest side-project: www.snapballot.com.

I needed a fast, simple, no-frills way to get polls into my posts on Curbly.com, so I built Snapballot!

I’m still working out some of the bugs. In particular I think there may be some problems rendering the charts in IE. So feedback and bug reports are well-appreciated.

Hope you like it!

Continue reading

Oops, my RubyGems broke!

Ok, not really, but I was getting a weird error and I bet others are to. Are you seeing this when you try to install a new gem?

ERROR: While executing gem … (NoMethodError)
>> undefined method `refresh’ for #

If so, you may be having the same trouble I was: something buggy in your gem source cache. To fix it, find out where your source cache is (mine was at /opt/local/ruby/gems/1.8/source_cache, yours might be in /opt/lib/ruby/gems/1.8/source_cache or in ~/.gem/source_cache) and delete it. Then you run sudo gem update –system and you should be good to go!

Social Networking Awards at Mashable.com

Hey everyone, Mashable is running a social networking contest, and we’re mentioned as one of the potential candidates in the ‘niche’ category. Check it out:

Curbly is coming soon…

Ben and I working (feverishly?) on last-minute things for Curbly.com, the DIY Design community for people who love where they live. We’ve already started inviting a few select users and the site is starting to look really good. Watch this space: we’ll let you know when it’s ready.

More RESTful helpers: hash_for_resource_url

When declare a resource in your routes.rb file in Rails, the Simply Restful plugin (now in core) will generate a set of named urls for you. For example, if you do map.resource :users, you’ll get named routes like user_url (#=> users/1) and edit_user_url (#=> users/1;edit). But these named route helpers only give you the string representing the path you’d use to access that particular action. Sometimes you need to merge other parameter into that string.

Well, Rails actually has a helper for that too! When you do map.resource :users, you also get a hash_for_user_url and a hash_for_edit_user_url, which you can then user like this:

link_to user.name, :url => hash_for_edit_user_url(:user_id => user.id, :status => 3)

The keys you supply as arguments to the helper will automatically get merged into the hash. So for the link_to above, you’d get the following URL: /user/1;edit?status=3 .