3

While trying to produce some diagrams with Railroad on an existing Rails application, I fell into the endless cycle of receiving a "Could not find gem GEMNAMEHERE ... " and issuing a "gem install GEMNAMEHERE" command, just to find the next gem that's missing ... over 30 times.

Is there some rake tasks or gem option call that would list all the gems required by a Rails app, so I can install them with one call to "gem install"?

I tried to "less config/environment.rb | grep config.gem", but it returns only some of the gems that were reported missing. Where are the other gem requirements defined?

Vladimir
  • 31
  • 1
  • 2

6 Answers6

0

You might be looking for bundle check. If you're running RVM rvm requirements can be quite helpful too.

linuxdan
  • 4,476
  • 4
  • 30
  • 41
0

Try gem dependency rails. This will list all the gems required by Rails.

You can use it to list all dependencies of any gem, like gem dependency devise.

Ref : rubygems.org gem dependency and also How do I find out which gem has a specific dependency?

Community
  • 1
  • 1
Eric Lavoie
  • 5,121
  • 3
  • 32
  • 49
0

Check these articles:

http://railscasts.com/episodes/110-gem-dependencies

http://blog.joopp.com/2009/01/26/plugin-gem-dependencies-in-your-environmentrb/

http://www.railsdispatch.com/posts/bundler (for Rails 3)

So yes, there's a rake command for that.

Berin Loritsch
  • 11,400
  • 4
  • 30
  • 57
0

Simply open the Gemfile file located in the root folder of the Ruby on Rails application or run the bundle list command in the root folder of the application

gyousefi
  • 306
  • 3
  • 9
0

"gem list" will list out gems used in the project

Rakesh
  • 793
  • 4
  • 22
-2

bundle install sorted this out for me.

drew
  • 21
  • 1
  • 5