Unpacked gem...in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this

When you have unpacked/localised a gem for an earlier version of rails (before rails 3 and the concept of bundler came in vogue), the specification file under the vendor/gems folder might be missing which gives the error in the title of the post. Don't have to panic, you can easily generate a specification file for the same.

Go to the gem directory under the vendor/gems/ folder

  1. cd vendor/gems/ factory_girl_rails-1.0.1
  2. gem specification factory_girl_rails > .specification [Don't specify the gem version while generating the specification file].
  3. Or if you have to mention the version use the syntax below
gem specification factory_girl_rails -v 1.0.1 > .specification

Comments

Rohan Daxini said…
Thanks for posting this Doel. We indeed faced this issue in one of our project.
Doel said…
my pleasure Rohan :)

Popular Posts