使用宝石而不安装它 [英] Using a gem without installing it

查看:81
本文介绍了使用宝石而不安装它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要运行一些ruby脚本,这些脚本是我在服务器上编写的,我没有sudo访问权限。

在我自己的机器上,我使用' sudo gem install ..'并在我的代码中使用它们。

是否有任何机制可以让我使用这些gem,而无需在远程机器上正式安装它们?

I need to run a bunch of ruby scripts that I have written on a server that I don't have sudo access to.
On my own machine, I have installed a bunch of gems using 'sudo gem install ..' and used them in my code..
Is there any mechanism which would let me use these gems without formally installing them on a remote machine?

推荐答案

您可以将它们安装在用户目录中:
http://docs.rubygems.org/read/chapter/3#page83

You can install them in a user directory: http://docs.rubygems.org/read/chapter/3#page83

这看起来像它可以让您可以随时随地安装宝石。

This looks like it lets you install the gems anywhere you want.

这篇关于使用宝石而不安装它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆