Tôi đang gặp rắc rối với rvm, bundler và gemets. Tôi đã 3 hồng ngọc được cài đặt trong RVM:Sử dụng RVM, bundler không cài đặt trong gemset thích hợp khi đá quý được cài đặt trong một phiên bản ruby khác nhau
rvm rubies
macruby-0.7.1 [ x86_64 ]
ree-1.8.7-2010.02 [ x86_64 ]
=> ruby-1.9.2-p0 [ x86_64 ]
Và gemsets như vậy:
rvm gemsets
macruby-0.7.1 [ x86_64 ]
ree-1.8.7-2010.02 [ x86_64 ]
[email protected] [ x86_64 ]
[email protected] [ x86_64 ]
[email protected] [ x86_64 ]
[email protected]_rails [ x86_64 ]
ruby-1.9.2-p0 [ x86_64 ]
=> [email protected] [ x86_64 ]
[email protected] [ x86_64 ]
Tôi có một .rvmrc mà chuyển sang ruby 1.9.2 và "Instapaper" gemset:
rvm use [email protected]
Tôi muốn sử dụng trình bao, vì vậy tôi cài đặt trình cài đặt theo cách thủ công trong gemset này và hoạt động tốt.
tôi xây dựng Gemfile tôi:
source "http://rubygems.org"
gem "mechanize"
gem "highline"
gem "www-delicious"
Sau đó, khi tôi chạy "bó cài đặt" nó sử dụng đá quý nó thấy trong ree 1.8.7:
Using highline (1.6.1)
Using nokogiri (1.4.4)
Using mechanize (1.0.0)
Using www-delicious (0.4.0)
Using bundler (1.0.7)
Your bundle is complete! It was installed into /Users/kold/.rvm/gems/ree-1.8.7-2010.02
Nếu tôi chạy "Thông tin RVM" nó phun ra tất cả các thông tin đúng và tôi thậm chí có thể cài đặt một viên ngọc bằng tay mà không có vấn đề:
[email protected] [master*]$ rvm info
[email protected]:
system:
uname: "Darwin Kevin-Olds-MacBook-Pro.local 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386 i386"
bash: "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)"
zsh: "/bin/zsh => zsh 4.3.9 (i386-apple-darwin10.0)"
rvm:
version: "rvm 1.1.0 by Wayne E. Seguin ([email protected]) [http://rvm.beginrescueend.com/]"
ruby:
interpreter: "ruby"
version: "1.9.2p0"
date: "2010-08-18"
platform: "x86_64-darwin10.4.0"
patchlevel: "2010-08-18 revision 29036"
full_version: "ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.4.0]"
homes:
gem: "/Users/kold/.rvm/gems/[email protected]"
ruby: "/Users/kold/.rvm/rubies/ruby-1.9.2-p0"
binaries:
ruby: "/Users/kold/.rvm/rubies/ruby-1.9.2-p0/bin/ruby"
irb: "/Users/kold/.rvm/rubies/ruby-1.9.2-p0/bin/irb"
gem: "/Users/kold/.rvm/rubies/ruby-1.9.2-p0/bin/gem"
rake: "/Users/kold/.rvm/rubies/ruby-1.9.2-p0/bin/rake"
environment:
PATH: "/Users/kold/.rvm/gems/[email protected]/bin:/Users/kold/.rvm/gems/[email protected]/bin:/Users/kold/.rvm/rubies/ruby-1.9.2-p0/bin:/Users/kold/.rvm/bin:/usr/local/bin:/usr/local/mysql/bin:/opt/local/bin:/Users/kold/bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin"
GEM_HOME: "/Users/kold/.rvm/gems/[email protected]"
GEM_PATH: "/Users/kold/.rvm/gems/[email protected]:/Users/kold/.rvm/gems/[email protected]"
MY_RUBY_HOME: "/Users/kold/.rvm/rubies/ruby-1.9.2-p0"
IRBRC: "/Users/kold/.rvm/rubies/ruby-1.9.2-p0/.irbrc"
RUBYOPT: ""
gemset: "instapaper"
Tôi không chắc tại sao nó lại ' s cài đặt những viên đá quý bên ngoài của gemset.
Cập nhật 1:
$ rvm use [email protected] && which bundle
Using /Users/kold/.rvm/gems/ruby-1.9.2-p0 with gemset instapaper
/Users/kold/.rvm/gems/[email protected]/bin/bundle
[email protected] [master*]$ bundle --verbose check
Using highline (1.6.1) from /Users/kold/.rvm/gems/ree-1.8.7-2010.02/specifications/highline-1.6.1.gemspec
Using nokogiri (1.4.4) from /Users/kold/.rvm/gems/ree-1.8.7-2010.02/specifications/nokogiri-1.4.4.gemspec
Using mechanize (1.0.0) from /Users/kold/.rvm/gems/ree-1.8.7-2010.02/specifications/mechanize-1.0.0.gemspec
Using www-delicious (0.4.0) from /Users/kold/.rvm/gems/ree-1.8.7-2010.02/specifications/www-delicious-0.4.0.gemspec
Using bundler (1.0.7) from /Users/kold/.rvm/gems/[email protected]/gems/bundler-1.0.7/lib/bundler
Your bundle is complete! It was installed into /Users/kold/.rvm/gems/ree-1.8.7-2010.02
Bạn có thể đăng đầu ra mà bạn nhận được từ các mục sau: 'rvm use [email protected] && which bundle ' – bowsersenior
Yep, nó được đăng trong" Update 1 " –