Using Ruby Enterprise Edition, gems are not installed where I would expect

前端 未结 2 965
陌清茗
陌清茗 2021-02-11 05:46

I have just installed Ruby Enterprise Edition and am installing some gems for it. Stock Ruby 1.8.6 is also installed on the server.

I have added /opt/ruby-enterpri

相关标签:
2条回答
  • 2021-02-11 06:18

    A solution I used to a similar problem is to set up an alias to your REE gem command.

    I.e.

    alias reegem='/opt/ruby-enterprise-1.8.6-20090201/bin/gem'
    
    0 讨论(0)
  • 2021-02-11 06:26

    There's a good explanation of what's going on here:

    sudo changes PATH - why?

    This assumes you're using Ubuntu. sudo does change the path under ubuntu.

    The gem you have in /usr/bin/ is probably a symlink to /usr/bin/gem1.8. What I did was symlink ruby-enterprise's gem to /usr/bin/ree-gem like this:

    sudo ln -s /opt/ruby-enterprise-1.8.6-20090201/bin/gem /usr/bin/ree-gem

    then I just use:

    sudo ree-gem install some_gem

    to install gems specifically for ree. If you're not using the ruby 1.8.6 rubygem, you can symlink REE's gem to /usr/bin/gem instead:

    sudo ln -s /opt/ruby-enterprise-1.8.6-20090201/bin/gem /usr/bin/gem

    0 讨论(0)
提交回复
热议问题