Specify gem installation directory

后端 未结 4 713
温柔的废话
温柔的废话 2020-12-28 13:54

I have some trouble here. I am working with a Rails 2.3 project (working on the production server through ssh - don\'t ask why). Here is the Gemfile. When delayed_jobs is t

4条回答
  •  抹茶落季
    2020-12-28 14:13

    To install foo gem to a specified folder, just use --install-dir option, i.e.

    $ gem install --install-dir /path/to/gems/folder foo
    

    It helps when:

    • one cannot use bundle install - e.g. if one wants to install bundle gem itself, or wants to install a gem (which is not listed in Gemfile) into the bundle folder
    • sudo gem install command fails due to lack of write-permissions for a default installation path

    Hope that helps.

提交回复
热议问题