0

When starting Ruby on Rails WEBrick server (Ubuntu 14.04) the following message appears: "Warning: You're using Rubygems 1.8.23 with Spring. Upgrade to at least Rubygems 2.1.0 and run gem pristine --all for better startup performance."

I've upgraded Rubygems and ran gem pristine --all, but it seems to have trouble with the thor gem. The reason is I have the following installed thor gem versions (according to gem list command):

thor (0.19.1, 0.18.1.20140116)

and there is NO 'thor' gem version 0.18.1.20140116 anywhere. I can't uninstall it and I can't install it. If I install and uninstall 0.18.1 version, it doesn't affect 0.18.1.20140116 version at all.

So gem pristine --all command stops when checking thor with the following error:

Restored thor-0.19.1 Cached gem for thor-0.18.1.20140116 not found, attempting to fetch... ERROR: While executing gem ... (Gem::Exception) Cannot load gem at [/usr/share/rubygems-integration/1.9.1/cache/thor-0.18.1.20140116.gem] in /home/****/******/*********

How can I remove that funny 0.18.1.20140116 version from system or make gem pristine not to check the thor gem?

Thank you!

Baldrick
  • 23,882
  • 6
  • 74
  • 79
Rustam Rakhimov
  • 115
  • 1
  • 7

2 Answers2

0

Was there any error message when you uninstall "thor 0.18.1.20140116"?

I wonder if it helps to uninstall all versions of thor and reinstall 0.19.1.

gem uninstall thor # Select "All versions" here
gem install thor -v 0.19.1
  • Unfortunately, `thor (0.18.1.20140116)` string remains in the result of the `gem list` command after `gem uninstall thor`. And when I try to remove this particular version it throws `INFO: gem "thor" is not installed` error. The problem is in that `20140116`. – Rustam Rakhimov Feb 19 '15 at 15:47
  • Umm... Have you seen this post? It feels similar: [Error encountered running: sudo -i gem pristine --all](http://stackoverflow.com/questions/23759717) Also this [GitHub thread](https://github.com/rails/spring/issues/320) – Mengchen Yu Feb 19 '15 at 17:16
0

I solved that problem by deleting

/usr/share/rubygems-integration/1.9.1/specifications/thor-0.8.1.20140116.gemspec

manually with root rights.

Thank you guys for help!

Rustam Rakhimov
  • 115
  • 1
  • 7