如何从特定版本的Gem检查gem依赖项?

时间:2014-04-12 04:44:34

标签: ruby-on-rails ruby

我知道你可以这样做:

gem dependency ar_mailer --remote

或者这个:

gem dependency rails_admin --reverse-dependencies

但我想知道过去版本的rails_admin的依赖关系。我该如何指定?

2 个答案:

答案 0 :(得分:0)

尝试:

gem dependency --help


gem dependency rails_admin --version 

rmagnum2002更新

没有--version

user@user:~/projects/new_work$ gem dependency devise
Gem devise-3.0.4
  bcrypt-ruby (~> 3.0)
  orm_adapter (~> 0.1)
  railties (< 5, >= 3.2.6)
  warden (~> 1.2.3)

Gem devise-3.2.2
  bcrypt-ruby (~> 3.0)
  orm_adapter (~> 0.1)
  railties (< 5, >= 3.2.6)
  thread_safe (~> 0.1)
  warden (~> 1.2.3)

with --version

user@user:~/projects/new_work$ gem dependency devise --version 3.0.4
Gem devise-3.0.4
  bcrypt-ruby (~> 3.0)
  orm_adapter (~> 0.1)
  railties (< 5, >= 3.2.6)
  warden (~> 1.2.3)

当您的系统或捆绑包上未找到此类版本时

user@user:~/projects/new_work$ gem dependency devise --version 3.0.6
No gems found matching devise (= 3.0.6)

答案 1 :(得分:0)

$ gem dependency -rv 5.1.2 /^rails$/
Gem rails-5.1.2
  actioncable (= 5.1.2)
  actionmailer (= 5.1.2)
  actionpack (= 5.1.2)
  actionview (= 5.1.2)
  activejob (= 5.1.2)
  activemodel (= 5.1.2)
  activerecord (= 5.1.2)
  activesupport (= 5.1.2)
  bundler (>= 1.3.0, < 2.0)
  railties (= 5.1.2)
  sprockets-rails (>= 2.0.0)

选项:

-v, --version VERSION            Specify version of gem to dependency
-r, --remote                     Restrict operations to the REMOTE domain

P.S。 rails取决于bundler?哦