安装了Bundle,但在app目录

时间:2016-11-16 19:16:01

标签: ruby-on-rails ruby rubygems bundler

我正在设置一台新Mac,并尝试设置dev environemnt。使用Homebrew& RVM作为包管理器。当我从root运行bundler -v时,我安装了捆绑器,它Bundler version 1.13.6没问题。

但是,我刚刚在本地克隆了我的一个应用项目,并且在该应用的目录bundler中返回command not found。 Surley我不需要在每个目录中安装Bundler吗?!?这是一些用户permisisons问题吗?你能帮助我理解这种情况以及为什么Bundler不能在新拉的app目录中工作吗?最后,我只是尝试捆绑为这个新克隆的应用程序安装gemfile。

宝石环境

RubyGems Environment:
  - RUBYGEMS VERSION: 2.4.8
  - RUBY VERSION: 2.2.2 (2015-04-13 patchlevel 95) [x86_64-darwin16]
  - INSTALLATION DIRECTORY: /Users/usr/.rvm/gems/ruby-2.2.2
  - RUBY EXECUTABLE: /Users/usr/.rvm/rubies/ruby-2.2.2/bin/ruby
  - EXECUTABLE DIRECTORY: /Users/usr/rvm/gems/ruby-2.2.2/bin
  - SPEC CACHE DIRECTORY: /Users/usr/.gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /Users/usr/.rvm/rubies/ruby-2.2.2/etc
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-darwin-16
  - GEM PATHS:
     - /Users/usr/.rvm/gems/ruby-2.2.2
     - /Users/usr/.rvm/gems/ruby-2.2.2@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
     - "gem" => "--no-document"
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /Users/usr/.rvm/gems/ruby-2.2.2/bin
     - /Users/usr/.rvm/gems/ruby-2.2.2@global/bin
     - /Users/jusr/.rvm/rubies/ruby-2.2.2/bin
     - /Users/usr/.rvm/bin
     - /usr/local/bin
     - /usr/bin
     - /bin
     - /usr/sbin
     - /sbin

echo $ PATH

/Users/usr/.rvm/gems/ruby-2.2.2/bin:/Users/usr/.rvm/gems/ruby-2.2.2@global/bin:/Users/usr/.rvm/rubies/ruby-2.2.2/bin:/Users/usr/.rvm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

哪个宝石

/Users/usr/.rvm/rubies/ruby-2.2.2/bin/gem

1 个答案:

答案 0 :(得分:0)

您需要发出以下命令:

rmv use 2.2.2