For some reason, I trust is for a good one which I fail to see, ‘json‘ and ‘yajl-ruby‘ ruby gems required by ‘twitter’ gem, in order to work properly, need root privileges.
I need to install and run the ruby script I prepared on a 24/7-up server and there’s no better place from my remote paid host provider, which gives a shell. It’s a FreeBSD 7.4 server.
I setup manually rubygems, the server only provided ruby1.8 via precompiled binary. So once I installed the gems I start using most of them without issues when I finally crossed ‘twitter’ I got this error:
$ gem install yajl-ruby
Building native extensions. This could take a while…
ERROR: Error installing yajl-ruby:
ERROR: Failed to build gem native extension.
[…]
make install
/usr/bin/install -c -o root -g wheel -m 0755 yajl.so /path/.gems/gems/yajl-ruby-0.8.2/lib
install: /path/.gems/gems/yajl-ruby-0.8.2/lib/yajl.so: chown/chgrp: Operation not permitted
* Error code 71
So I’m kinda stuck.
regards
Using RVM you’ll install gems without sudo.
It is very usefull and “must have” tool anyway 🙂
Also you can try to pass
--install-diroption to your local dir with writing permissions