TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Vruby alpha – like virtualenv, but for ruby

2 点作者 joefiorini大约 10 年前

1 comment

joefiorini大约 10 年前
For the last few months before I stopped doing Ruby full time I was using a workflow (on OS X) in which I downloaded a binary Ruby build (the one rvm uses when you do &quot;rvm install --binary&quot; on OS X) and extracted it to &quot;&#x2F;opt&#x2F;rubies&#x2F;2.1.0&quot;. I created a script called &quot;activate&quot; that exports the environment variables necessary to run Ruby and placed it under &quot;bin&quot;.<p>Then for each project I would copy the entire ruby installation to my project root in a folder called &quot;vruby&quot;. To load ruby for that project I would run &quot;source vruby&#x2F;bin&#x2F;activate&quot;. It would setup all the environment variables with GEM_HOME pointing to a &quot;.gem&quot; folder under the project&#x27;s root. Therefore gems are isolated to each project. To unload, I just close the terminal.<p>The vruby project automates this workflow, by installing a binary ruby using Traveling Ruby and symlinking it to the local project using GNU stow. The plan is to eventually support multiple Ruby versions and more platforms than just my Linux box. Unfortunately, I no longer do Ruby full time and don&#x27;t have the bandwidth to make it as robust as I&#x27;d like. If you like this solution and need help setting it up, don&#x27;t be afraid to get in touch.