Ruby 相当于 virtualenv? [英] Ruby equivalent of virtualenv?

查看:71
本文介绍了Ruby 相当于 virtualenv?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有类似于 Python 实用程序 virtualenv 的东西?

Is there something similar to the Python utility virtualenv?

基本上它允许您将 Python 包安装到沙盒环境中,因此 easy_install django 不会进入系统范围的站点包目录,它会进入 virtualenv-created 目录.

Basically it allows you to install Python packages into a sandboxed environment, so easy_install django doesn't go in your system-wide site-packages directory, it would go in the virtualenv-created directory.

例如:

$ virtualenv test
New python executable in test/bin/python
Installing setuptools...cd .........done.
$ cd test/
$ source bin/activate
(test)$ easy_install tvnamer
Searching for tvnamer
Best match: tvnamer 0.5.1
Processing tvnamer-0.5.1-py2.5.egg
Adding tvnamer 0.5.1 to easy-install.pth file
Installing tvnamer script to /Users/dbr/test/bin

Using /Library/Python/2.5/site-packages/tvnamer-0.5.1-py2.5.egg
Processing dependencies for tvnamer
Finished processing dependencies for tvnamer
(test)$ which tvnamer 
/Users/dbr/test/bin/tvnamer

RubyGems 有类似的东西吗?

Is there something like this for RubyGems?

推荐答案

RVM 更接近于 virtualenv 的工作方式,因为它允许您对不同的 ruby​​ 版本及其 gems 等进行沙盒处理.

RVM works closer to how virtualenv works since it lets you sandbox different ruby versions and their gems, etc.

这篇关于Ruby 相当于 virtualenv?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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