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 th开发者_运维知识库at were reported missing. Where are the other gem requirements defined?
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.
You might be looking for bundle check
. If you're running RVM rvm requirements
can be quite helpful too.
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?
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
"gem list" will list out gems used in the project
bundle install
sorted this out for me.
精彩评论