I am using rvm, ruby 2.0.0 and bundler.
我正在使用rvm,ruby 2.0.0和bundler。
My Gemfile looks like this:
我的Gemfile看起来像这样:
source 'https://rubygems.org'
gem 'logger'
gem 'mygem', :path => '.'
bundle
installs both of them gems. bundle show
shows logger
is installed in ~/.rvm/gems/ruby-2.0.0-p247/gems
, but mygem
is installed in the path where the gem is located.
bundle安装它们都是宝石。 bundle show shows logger安装在〜/ .rvm / gems / ruby-2.0.0-p247 / gems中,但是mygem安装在gem所在的路径中。
Is there any way to get bundle
to install the local gem into rvm's gems
directory?
有没有办法让bundle将本地gem安装到rvm的gems目录中?
1 个解决方案
#1
1
No, Bundler treats path gems differently and does not install them to your GEM_PATH
. This is so that you don't need to reinstall as you make changes.
不,Bundler以不同方式处理路径宝石,并且不会将它们安装到您的GEM_PATH中。这样您在进行更改时无需重新安装。
It is not normal or necessary for a gem to point to itself or its runtime dependencies in its Gemfile
. You might want to add gemspec
to do this automatically. See http://bundler.io/v1.3/rubygems.html
gem在其Gemfile中指向自身或其运行时依赖项是不正常的或必需的。您可能希望添加gemspec以自动执行此操作。见http://bundler.io/v1.3/rubygems.html
#1
1
No, Bundler treats path gems differently and does not install them to your GEM_PATH
. This is so that you don't need to reinstall as you make changes.
不,Bundler以不同方式处理路径宝石,并且不会将它们安装到您的GEM_PATH中。这样您在进行更改时无需重新安装。
It is not normal or necessary for a gem to point to itself or its runtime dependencies in its Gemfile
. You might want to add gemspec
to do this automatically. See http://bundler.io/v1.3/rubygems.html
gem在其Gemfile中指向自身或其运行时依赖项是不正常的或必需的。您可能希望添加gemspec以自动执行此操作。见http://bundler.io/v1.3/rubygems.html