我已经ruby 2.0
使用rvm
. 我是新手tmux
。
我在.tmux.conf
这个配置中使用 zsh
set-option -g default-shell /bin/zsh
set-option -g default-command "/bin/zsh -i"
我也加载了 rvm 路径.zshrc
source /Users/mgpyone/.rvm/scripts/rvm
现在,这些是我在会话中尝试时的配置。tmux
which ruby
说/Users/mgpyone/.rvm/rubies/ruby-2.0.0-p0/bin/ruby
where ruby
返回为
/Users/mgpyone/.rvm/rubies/ruby-2.0.0-p0/bin/ruby
/Users/mgpyone/.rvm/bin/ruby
/Users/mgpyone/.rvm/bin/ruby
但为什么gem env
显示我的Ruby executable
路径设置为系统路径而不是rvm
RubyGems Environment:
- RUBYGEMS VERSION: 2.0.3
- RUBY VERSION: 2.0.0 (2013-02-24 patchlevel 0) [x86_64-darwin12.3.0]
- INSTALLATION DIRECTORY: /Users/mgpyone/.rvm/gems/ruby-2.0.0-p0
- RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
- EXECUTABLE DIRECTORY: /Users/mgpyone/.rvm/gems/ruby-2.0.0-p0/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-12
- GEM PATHS:
- /Users/mgpyone/.rvm/gems/ruby-2.0.0-p0
- /Users/mgpyone/.rvm/gems/ruby-2.0.0-p0@global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- :benchmark => false
- :sources => ["https://rubygems.org"]
- REMOTE SOURCES:
- https://rubygems.org
而且我无法运行类似的东西,rake
因为我认为它可以使用 System Ruby 执行。
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby app.rb -s puma
app.rb:1:in `require': no such file to load -- sinatra (LoadError)
from app.rb:1
rake aborted!
Command failed with status (1): [/System/Library/Frameworks/Ruby.framework/...]
/Users/mgpyone/work/rb/fileserver/Rakefile:9
(See full trace by running task with --trace)
我该如何解决这个问题?