ruby - Install gem in local folder -


i have limited privileges on shared machine i'm using, can't install gems way i'm used to. example:

$ gem install request-log-analyzer error:  while executing gem ... (gem::filepermissionerror)     don't have write permissions /usr/lib/ruby/gems/1.8 directory.  

is possible install gem locally? (if matters, i'm trying install this gem.)

i saw number of posts on stack overflow talked using bundler or gemfiles i'm not installing gem ruby on rails project - want use in isolation.

i'm running linux, not sure flavor though.

add --local flag install:

gem install --local request-log-analyzer 

if causes problems, try downloading gem manually , pointing gem directly using:

gem install --local path/to/gem/filename.gem 

if want install user home, per rubygems:

when use --user-install option, rubygems install gems directory inside home directory, ~/.gem/ruby/1.9.1. commands provided gems installed end in ~/.gem/ruby/1.9.1/bin. programs installed there available you, need add ~/.gem/ruby/1.9.1/bin path environment variable.

the command

gem install --user-install request-log-analyzer 

Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -