Tagged: gem

River – Amazon Wishlist Gem

One more post on Amazon Wishlist code. As another follow up to my post on Amazon Wishlist RSS, Ruby and Signing/Authenticating your Requests and the site I built to run the code My Amazon Feeds (post here) I've created a gem to contain all the code. Get it by running


  sudo gem install river

It's a pretty simple gem so working with the code is also pretty easy to do:


am = AmazonRequest.new(amazon_access_key_id, amazon_secret_access_key, ecs_to_rss_wishlist, amazon_associate_tag)
results = am.get_amazon_feeds(username) # username needs to be the user's Amazon email
feeds = results.collect { |result| OpenStruct.new(:url => result, :title => 'Amazon Wishlist', :name => 'wishlist') }

Get amazon_access_key_id and amazon_secret_access_key from your AWS console. The amazon_associate_tag parameter is optional. Throw it in there if you want your Amazon associate information in the feed. May as well :-).

The one parameter that might be confusing is &#...

Continue Reading →

Disguise your Rails Application

I spent quite a while trying to figure out how to theme my Ruby on Rails applications. Turns out after you build a piece of software people want to use it to do other stuff. Go figure.

I really like how simple it is to skin a Wordpress site so I stole borrowed some ideas.

From all of my research and effort and late night I give you disguise the ruby gem that makes it simple to skin your Rails application and impress everyone (ok maybe your mom).

Disguise makes it possible to generate a theme for your Rails website, set the current 'theme' using an admin interface or change the theme based on the current url.

Install the gem:


  sudo gem install disguise

or get the source code at: http://github.com/jbasdf/disguise/tree/master

Continue Reading →

Ruby gems and “Couldn’t get release_id, upload failed?”

I've been experimenting with Ruby gems over the past few weeks. I use a couple of other gems to make the process easier including rubyforge, jeweler and newgem.

Jeweler has a rake task 'rubyforge:release' that uploads your gem for you. The problem was that it would timeout and give me "Couldn't get release_id, upload failed?". I assumed that I had configured something wrong so I tried to upload the file directly to rubyforge. That didn't work either so I assumed (wrongly) that my project had something wrong with it. I was about to give up when I decided to check my gem size. It was 100MB!

Somehow I was packaging the gem inside itself on each release and it had grown into a beast. So if your release is timing out check your gem size and make sure it isn't going nuts.

Continue Reading →

Babelphish – yml Translation Made Simple

You've just finished version one of your most excellent, million dollar application. You've built it the right way. All of your application' strings live in the en.yml file neatly tucked into the locales directory patiently waiting for the day when you hit it big, go international and hire a expensive fancy firm to translate your application for the next big market.

Why wait? Impress your friends, your family, and the ladies right now. Today. In just seconds.

With Google Translate and some gem magic your application can now impress your investors in 41 languages. Win friends and influence people in just three simple steps:

sudo gem install ya2yaml

sudo gem install babelphish

babelphish -y ./locales/en.yml -o

Viola! Your application now has a yml file for every language Google supports. -y gives the path to your source file. Feel free to start with other languages es.yml, jp.yml, etc all work just fine. -o means overwrite the files in the directory. If you have already pai...

Continue Reading →

CMS Lite Gem

A pretty common problem when developing a Rails application or any web application for that matter is how to deal with content. I've often run into situations where the content development team is familiar with html and can produce reasonable content markup. Since you are going to go to all the effort and spend all the money search engine optimization (SEO) in the form of reasonable urls would be nice as well.

Enter CMS Lite.

I've just finished up a gem that makes it simple to keep the content out of the app directory and thus ensure your content developers don't have to worry about messing up code. (You can however use Ruby code in the content pages).

CMS Lite is a gem built specifically for a Rails application. You can find the code and instructions on usage here: or install the gem: sudo gem install jbasdf-cms-lite

I'm hoping to have a rubyforge project soon which will mean you will be able to install the gem this way: sudo gem install cms-lite

Just give me a few da...

Continue Reading →