橡胶安装但不可用?

时间:2014-03-17 19:38:41

标签: ruby-on-rails rubber

我认为我的设置有问题。

我正在尝试按照本指南安装Rubber: https://github.com/rubber/rubber/wiki/Quick-Start

看来我正确安装了橡胶......

$ sudo gem install rubber
$ Successfully installed rubber-2.7.4
$ 1 gem installed

但我不能援引它......

$ rubber vulcanize complete_passenger_postgresql
$ /usr/lib/ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find rubber (>= 0) amongst [actionmailer-4.0.3, actionmailer-4.0.2

我很困惑。我使用rvm并且每个宝石都应该存储在〜/ .rvm / gems中。为什么/usr/lib/ruby目录完全参与?

任何帮助都会很棒

有关我的环境的更多信息:

gem environment
RubyGems Environment:
  - RUBYGEMS VERSION: 2.2.2
  - RUBY VERSION: 2.1.0 (2013-12-25 patchlevel 0) [i686-linux]
  - INSTALLATION DIRECTORY: /home/evan/.rvm/gems/ruby-2.1.0
  - RUBY EXECUTABLE: /home/evan/.rvm/rubies/ruby-2.1.0/bin/ruby
  - EXECUTABLE DIRECTORY: /home/evan/.rvm/gems/ruby-2.1.0/bin
  - SPEC CACHE DIRECTORY: /home/evan/.gem/specs
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-linux
  - GEM PATHS:
     - /home/evan/.rvm/gems/ruby-2.1.0
     - /home/evan/.rvm/gems/ruby-2.1.0@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /home/evan/.opam/system/bin
     - /home/evan/.rvm/gems/ruby-2.1.0/bin
     - /home/evan/.rvm/gems/ruby-2.1.0@global/bin
     - /home/evan/.rvm/rubies/ruby-2.1.0/bin
     - /home/evan/Apps/AWS-ElasticBeanstalk-CLI-2.6.0/eb/linux/python2.7
     - /usr/local/heroku/bin
     - /usr/lib/lightdm/lightdm
     - /usr/local/sbin
     - /usr/local/bin
     - /usr/sbin
     - /usr/bin
     - /sbin
     - /bin
     - /usr/games
     - /home/evan/Apps/sketch_tar/sketch-1.6.4/sketch-frontend
     - /home/evan/Apps/yices-1.0.39/bin
     - /home/evan/Apps/arduino-1.0.5
     - /home/evan/Apps/cil/cil-1.7.3/bin
     - /home/evan/Apps/intellej/idea-IC-133.696/bin
     - /home/evan/Apps/play-2.2.1
     - /home/evan/Apps/scala-2.10.3/bin
     - /home/evan/Apps/apache-maven-3.0.5/bin
     - /home/evan/Apps/sublime/sublime2
     - /home/evan/.rvm/bin

1 个答案:

答案 0 :(得分:1)

我明白了!

问题是我使用的是rvm,但我仍然用sudo为我的宝石加前缀 即。

gem install ...

和     sudo gem install ...

完全不同的环境。看这篇文章: Why do "gem" and "sudo gem" have different installation directories?

我是通过“sudo gem install”安装的,但是我在没有sudo的情况下调用了橡胶命令。