1

I dont have admit rights in ssh machine so i could not install any gem

gem install json
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions into the /var/lib/gems/1.9.1    directory.

is there any ways to install it without admin rights?

Tharif
  • 13,794
  • 9
  • 55
  • 77
  • 1
    Possible duplicate :http://stackoverflow.com/questions/14607193/installing-gem-or-updating-rubygems-fails-with-permissions-error – Tharif Mar 19 '15 at 11:13

1 Answers1

0
gem install --user-install json

This will attempt to install the gem into ~/.gem/[some subdirectory], which you should be able to write to. (By default gem is trying to write to /var, which you don't have permission to write as a non-admin.)

Note that you will have to append the location the gem is installed to to your PATH variable to use it (on install you should get a warning to that effect). See this blog post about --user-install for more info

Patrick
  • 165
  • 2
  • 13