GlinesMome
GlinesMome

Reputation: 1629

JRuby and GEMS_PATH

I'm trying to make a JAR with a Ruby Sinatra-based script, so I need to access to some gems.

I try to install them like that:

$ jruby -S gem install sinatra sqlite3 json              
ERROR:  While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /usr/share/jruby/lib/ruby/gems/1.8 directory.

Is their a way to put them in my home directory? I use Fedora 17 i686 and JRuby 1.6.3.

Upvotes: 0

Views: 1984

Answers (1)

You can install the gems in a specific directory using the -i option:

$ gem install -i /path/to/location sinatra sqlite3 json

Then set the GEM_PATH variable to /path/to/location/gems.

Upvotes: 1

Related Questions