From: Arseni Anisimovich Date: 2013-01-11T18:39:21+09:00 Subject: Installing and using ruby gems without root privileges --f46d0445182d4cf4b904d2ffb691 Content-Type: text/plain; charset=UTF-8 Hello there! I've encountered an error which I cannon solve by myself. I'm working on a remote server on which I don't have root access. In my work (which by now doesn't involve other server users) I need to install some gems, but due to access limitations I cannot ask root to install them and/or install them from my current user. I followed that guide: http://ptspts.blogspot.com/2009/03/how-to-set-up-ruby-gems-on-debian-etch.html(since we're using Debian), and I managed to install gems into custom directory, but when I try to 'require' them in my scripts, following happens (using weibo2 by acenqiu as an example): /weibo_crawler ./weibo_crawler:3:in `require': no such file to load -- weibo2 (LoadError) from ./weibo_crawler:3 here's the first lines of script: #!/usr/bin/ruby require 'weibo2' Weibo2::Config.api_key = "111111111" Weibo2::Config.api_secret = "0101010101" Any ideas, where I could be wrong in my actions? PS. Ruby 1.8.7 . Gems installed @ /home/user/gems/ env: ... GEM_HOME=/home/anisimovich/gems ... -- Best regads, Arseni Anisimovich --f46d0445182d4cf4b904d2ffb691 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello there!

I've encou= ntered an error which I cannon solve by myself.

I&= #39;m working on a remote server on which I don't have root access. In = my work (which by now doesn't involve other server users) I need to ins= tall some gems, but due to access limitations I cannot ask root to install = them and/or install them from my current user.

I followed that guide: http://ptspts.bl= ogspot.com/2009/03/how-to-set-up-ruby-gems-on-debian-etch.html (since w= e're using Debian), and I managed to install gems into custom directory= , but when I try to 'require' them in my scripts, following happens= (using weibo2 by acenqiu as an example):

/weibo_crawler ./weibo_crawler:3:in `require': no such file to load -- weibo2 (LoadE= rror)
from ./weibo_crawler:3


here's the first lines of script:

#!/usr/bin/ruby

require 'weibo2'
Weibo2::Config.api_key =3D= "111111111"
Weibo= 2::Config.api_secret =3D "0101010101"

Any ideas, where I could be wrong in my actions?
<= div>
PS. Ruby 1.8.7 . Gems installed @ /home/user/gems/
=
env:
...
GEM_HOME=3D/home/anisimovich/gems
...


<= /div>

--
Best regads,
Arseni Anisimovich
--f46d0445182d4cf4b904d2ffb691--