ERROR: While executing gem (ArgumentError) Illformed requirement

October 4th, 2008 by Justin Ball

I like to use http://mor.ph to deploy my applications because of its simplicity. The other nice thing is that they give you free developer space so if you are just getting an application up and running or just need to show it to a client you can do so without having to pay a bunch of money and spend a bunch of time setting up a VPS.

There are a few issues now and then. Morph has a large number of gems installed by default but occasionally I use one that they don't have. Today I ran into this problem. At first I thought no big deal I can just do a rake gems:unpack and drop the gems into the project and then deploy again.

No go.

Instead I get the following error:

ERROR:  While executing gem ... (ArgumentError)
    Illformed requirement ["\"= 2.2.2\""]

Turns out there is current a bug in Rails 2.1.0 and 2.2.0 that causes the unpack to barf if you specify a version number. Here's the link:
http://rails.lighthouseapp.com/projects/8994/tickets/1003-rake-gemsunpack-version-handling-broken

Since I am using the latest version of all the gems, my solution was to temporarily remove the version numbers from environment.rb.

So this
config.gem 'ruby-openid', :lib => 'openid', :version => '2.1.2'
becomes this
config.gem 'ruby-openid', :lib => 'openid'

Then I did:
rake gems:unpack
and everything worked fine.

Do remember to put the version numbers back when you are done.

Tags:   · · · · · 2 Comments

Leave A Comment

2 responses so far ↓

  • 1 friarminor Oct 4, 2008 at 11:02 pm

    Brilliant as always, Justin!

    Thanks for sharing this. This is definitely a nice add to the resources on our developer site [Hope you won't mind :) ]

    Best.
    alain
    mor.ph

  • 2 Justin Ball Oct 5, 2008 at 11:16 am

    Of course not. If it helps someone feel free to use it.