0

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
Souljacker
  • 774
  • 1
  • 13
  • 35
Evan Pu
  • 2,099
  • 5
  • 21
  • 36
  • It seems that somehow your system's Ruby is used (`/usr/lib/ruby/1.9.1/`) and that it looks for the rubber gem in the wrong place. – Wukerplank Mar 17 '14 at 20:28
  • I think so... is there some way of correcting it? I don't know much about linux shells but I can give it a good try if you can point me. My ruby itself is managed by rvm though: which ruby /home/evan/.rvm/rubies/ruby-2.1.0/bin/ruby – Evan Pu Mar 17 '14 at 20:30
  • I'm no expert either... First find out which ruby you are using (maybe add the outputs of `ruby -v` and `which ruby` to your question). Then try repeat the process, but ensure you invoke `rvm use [your preferred version]` first. – Wukerplank Mar 17 '14 at 20:35
  • Those seems to be in order though. I included more info in the original post. thx. – Evan Pu Mar 17 '14 at 20:38

1 Answers1

1

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.

Community
  • 1
  • 1
Evan Pu
  • 2,099
  • 5
  • 21
  • 36