相关疑难解决方法(0)

使用RVM时,当宝石安装在不同的ruby版本中时,bundler不会安装在正确的gemset中

我遇到了rvm,bundler和gemsets的问题.我在rvm中安装了3个红宝石:

rvm rubies

   macruby-0.7.1 [ x86_64 ]
   ree-1.8.7-2010.02 [ x86_64 ]
=> ruby-1.9.2-p0 [ x86_64 ]
Run Code Online (Sandbox Code Playgroud)

和宝石一样:

rvm gemsets

   macruby-0.7.1 [ x86_64 ]
   ree-1.8.7-2010.02 [ x86_64 ]
   ree-1.8.7-2010.02@chef [ x86_64 ]
   ree-1.8.7-2010.02@global [ x86_64 ]
   ree-1.8.7-2010.02@mobi [ x86_64 ]
   ree-1.8.7-2010.02@temple_rails [ x86_64 ]
   ruby-1.9.2-p0 [ x86_64 ]
=> ruby-1.9.2-p0@instapaper [ x86_64 ]
   ruby-1.9.2-p0@mobi [ x86_64 ]
Run Code Online (Sandbox Code Playgroud)

我有一个.rvmrc切换到ruby 1.9.2和"instapaper"gemset:

rvm use ruby-1.9.2-p0@instapaper
Run Code Online (Sandbox Code Playgroud)

我想使用bundler,所以我在这个gemset中手动安装bundler,这很好用.

我构建我的Gemfile:

source "http://rubygems.org"
gem "mechanize"
gem "highline"
gem "www-delicious"
Run Code Online (Sandbox Code Playgroud)

然后,当我运行"bundle install"时,它使用它在ree 1.8.7中看到的gem:

Using highline (1.6.1) 
Using nokogiri (1.4.4) …
Run Code Online (Sandbox Code Playgroud)

ruby bundler rvm

7
推荐指数
1
解决办法
6367
查看次数

标签 统计

bundler ×1

ruby ×1

rvm ×1