How do I check that all the dependencies of my installed Ruby gems are satisfied? How do I check that all the dependencies of my installed Ruby gems are satisfied? ruby ruby

How do I check that all the dependencies of my installed Ruby gems are satisfied?


in the bash shell:

gem list --no-version > listgem dependency --pipe > dependsgrep -v -f list depends > failed.txtrm listrm depends

failed.txt will now have a list of all dependencies that are not installed.


I know you said you weren't interested in answers about Bundler, but…

Bundler will handle gem dependency resolution for you and is compatible with Rails 2.3. I've used Bundler with a number of Rails 2 apps and not had any problems with it.

There are instructions for installing Bundler on Rails 2.3 here: http://gembundler.com/rails23.html


Have you tried running gem update? That will run all the dependency tests for all of your gems. You can run this to install into a separate directory.

[edit]Also, what happens when you run gem check? gem dependency will list all gem dependencies. I'm pretty sure that if it doesn't tell you whether something is installed, you could pipe the output to a command like check to see if those gems are installed.[/edit]