Last active
December 26, 2015 00:19
-
-
Save tralston/7063431 to your computer and use it in GitHub Desktop.
Ruby gem commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Remove unused gems, clean up broken dependencies | |
# Use with bundle show <gem> to resolve LoadError problems for gems that are installed but not seen by Rails | |
gem clean <gem> | |
# Remove accumulated gem documentation (ri and rdoc) | |
rm -r `gem env gemdir`/doc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was getting an error message from Phusion Passenger (4.0.20) and nginx (1.4.3) for a project that had previous run fine until I upgraded to Rails 4.0.0:
I knew rack was installed, because it was there in Gemfile.lock, gem list, and bundle list. The problem was that the particular version referenced by all of these things was for some reason not linked properly, or deleted. The way I finally figured it out was to run the following:
and it gave:
So then I ran
I thought that worked, but "bundle show rack" still said the gem had been deleted. So I manually installed it again with:
Then "bundle show rack" didn't report any errors. I hope this helps someone else too.