I'm trying to install watir. Had to upgrade my ruby installation so I installed rvenv and then used it to install ruby v2.0.
Sagis-MacBook-Air:~ sagism$ rbenv shell 2.0.0-rc2
Sagis-MacBook-Air:~ sagism$ ruby -v
ruby 2.0.0dev (2013-02-08 trunk 39161) [x86_64-darwin11.4.2]
Sagis-MacBook-Air:~ sagism$ sudo gem install watir
ERROR: Error installing watir:
rubyzip requires Ruby version >= 1.9.2.
I tried to install ruby 1.9.4 but then I get another error which I cannot resolve (different issue).
Make sure that you ruby environment isn't dropped by
sudo
command:If your environment has reset:
Add into
/etc/sudoers
string like follows, and be sure that you are inwheel
group:Of course you can do it for any group you wish, this should prevent to drop the current environment, when you have to
sudo
, then try again: