]> scripts.mit.edu Git - www/raw.git/blob - faq/148.mdwn
Import from TextPattern
[www/raw.git] / faq / 148.mdwn
1 [[!meta title="How can I install Ruby gems in my locker?"]]
2 First, note that many Ruby gems are already installed on
3 scripts.mit.edu, and we\92re generally pretty willing to install
4 generally-useful software globally; email us at scripts@mit.edu to
5 ask. This has the advantage that you won\92t have to worry about
6 keeping the packages up to date; in some cases, using out-of-date
7 modules could lead to security vulnerabilities in your site.
8 Furthermore, a frequent practice in the Ruby community is to have
9 sets of Ruby packages associated with deployments, in which case
10 installing a gem in your locker might be too global.
11
12 In order to install a Ruby gem to your locker, you will first need
13 to create the directory to install into and give scripts.mit.edu
14 permission to it. From an Athena prompt, do the following, where
15 lockername is the name of your locker:
16
17     add consult
18     mkdir /mit/lockername/.gem
19     mkdir /mit/lockername/.bundle
20     fsr sa /mit/lockername/.gem daemon.scripts write
21     fsr sa /mit/lockername/.bundle daemon.scripts write
22
23 To tell a bundler configured app to use this local Gem store, run
24 this command on a Scripts server, in the directory of your
25 application:
26
27     bundle config path ~/.gem/ruby/1.8
28
29 Then, to install a gem, SSH into Scripts and run:
30
31     gem install -l gemname
32
33
34