How do I fix this error? config.gem: Unpacked gem authlogic-2.1.3 in vendor/gems has no specification file
Asked Answered
D

6

12

I get this error when launching my Mongrel server...

$ script/server --debugger
=> Booting Mongrel
=> Rails 2.3.5 application starting on http://0.0.0.0:3000
config.gem: Unpacked gem authlogic-2.1.3 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.
=> Debugger enabled
=> Call with -d to detach
=> Ctrl-C to shutdown server

When I run rake gems:refresh_specs like it suggests I get another error though:

rake aborted!
undefined method `installed_source_index' for #<Gem::SourceIndex:0x100551a58>

Any thoughts on how to fix this?

Diaphragm answered 17/2, 2010 at 6:53 Comment(0)
M
22

I am not sure why it is broken in Authlogic, but I had to generate it myself.

Try this in your Rails project:

$prompt> cd vendor/gems/authlogic-2.1.3

$prompt> gem specification authlogic > .specification

Ministry answered 23/2, 2010 at 5:59 Comment(3)
This gives me an error - "ERROR: Unknown gem 'authlogic'" Any idea how to resolve this?Estellestella
gem install authlogic - I had the same problem, I taught it was already installed...Arcade
I'm on Rails 2.3.5 too and get ERROR: Unknown gem 'trial_signup_form on a vendor gem I'm using. Is it bc the gem doesn't exist or am I missing something?Attune
M
4

I'm just going to chime in here, because I experience the same thing today, except with a different gem.

I was updating hoptoad to use the notifier as a gem instead of a plugin, and one of the instructions from the Github page is to unpack the gem into vendor/gems.

I'm on Mac OS X, and I unpacked the gem as so:

$> rake gems:unpack GEM=hoptoad_notifier

After I did this, I got the error specified, and the gem didn't actually unpack (it created the directory in vendor/gems, but didn't actually unpack the gem).

I deleted the directory from vendor/gems, and tried again as:

$> sudo rake gems:unpack GEM=hoptoad_notifier

Worked this time, unpacked properly, and no error.

Monty answered 18/5, 2010 at 16:22 Comment(0)
P
3

I believe this is the reason: http://github.com/binarylogic/authlogic/commit/05e452472616bd60bb81affc75a1cb3d95cf7857

The owner purposely added the gitignore on the .specification file. I'm guessing u freeze this particular gem and submit it in your code branch under vendor/gems/..and as expected, git ignore this particular file per request

Preestablish answered 21/5, 2010 at 0:18 Comment(0)
T
1

I had to pop into vendor/gems/authlogic and remove '.specification' from the .gitignore

Once you've done that you can run rake gems:refresh_specs

Only problem is that the next time you upgrade this gem the bad .gitignore comes back

Tractor answered 9/7, 2010 at 7:27 Comment(0)
M
1

I had the same "unknown GEM" problems. After much faffing about I found the following recipe :

First, I installed the gem using the standard "gem install authlogic", which placed the gem in /Library/Ruby/Gems/1.8.

Within RadRails, I used the rake task "gems:unpack" which seems to gather all the gems relevant to your app and place them in /vendor/gems as desired.

I then uninstalled the system wide gem to check it has really worked with : gem uninstall authlogic --install-dir=/Library/Ruby/Gems/1.8

Seems to work well.

Materialist answered 16/11, 2010 at 16:57 Comment(0)
N
0

Build and install the gem before generating the .specification file

$prompt> cd vendor/gems/authlogic-2.1.3

$prompt> gem build authlogic.gemspec

$prompt> gem install authlogic.gemspec

$prompt> gem specification authlogic > .specification

Nim answered 29/1, 2015 at 6:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.