Thursday, June 18, 2009

Unintuitive error

Error:

>ruby script/server
config.gem: Unpacked gem mislav-will_paginate-2.3.2 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem ruby-hmac-0.3.2 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.
no such file to load -- hmac-sha1
...
(trace)
...
no such file to load -- unicode
...
(trace)

>rake gems:refresh_specs
(same as above)

Actual issue:

There is no spec for these gems because there was an attempt to rm, git rm, or svn rm them at some point which worked locally, but didn't end up working after going through the version control. A symptom of this is a version mismatch between what is in environment.rb, gem list, and /vendor/gems. Also, the gems in gem list will say that they're frozen, but they aren't. They just have hobbled directories.

Solution:
1. Try to install the gems.
2. Delete the offending gem folders in /vendor/gems
3. rake gems:install

No comments:

Post a Comment