rejeep
rejeep

Reputation: 649

Get list of all gems

What ever happend to Rails.configuration.gems in Rails 3? I guess it has to do with Bundler. But how can I find all gems now?

Thanks

Upvotes: 4

Views: 2467

Answers (1)

bjg
bjg

Reputation: 7477

Yes it has to do with Bundler. In Rails 3 your application's gem manifest is in a file called Gemfile. Some good explanations on the changes and how to use them here, here, here and here.

UPDATE:

The bundle show CLI lists the gems in use by your application. But, programmatically you can get to the same thing as follows:

require 'bundler'
mygems = Bundler.load.specs.map { |spec| spec.name }

The spec object also contains other attributes of interest.

Upvotes: 9

Related Questions