Rubber installed but isn't usable?

105 views Asked by At

I think there's something wrong with my setup.

I am trying to install Rubber following this guide: https://github.com/rubber/rubber/wiki/Quick-Start

It appears that I installed rubber correctly...

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

But I cannot invoke it...

$ 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

I am confused. I use rvm and every gem should be stored inside ~/.rvm/gems. Why is the /usr/lib/ruby directory being involved at all?

Any help would be great

More info on my environment:

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

There are 1 answers

0
Evan Pu On

I got it!!

The problem is I was using rvm but I still prefixed my gem with sudo i.e.

gem install ...

and sudo gem install ...

has completely different environments. See this post: Why do "gem" and "sudo gem" have different installation directories?

I was installing via "sudo gem install" but I was invoking the rubber command without sudo.