Quần Cam

You don't need RVM gemset

We can’t deny the contribution RVM gemset gave up to the Ruby community, but do we really need gemsets to isolate our project dependencies these days?

Where the idea of gemset came from?

In around 2010, RVM introduced gemset, a huge improvement which changes how the whole Ruby world deals with dependency isolation. From then on, separating Ruby environments on local computers wasn’t tough anymore. Just imagine you’re starting a fresh Rails 5 project while maintaining a Rails 2.3 application, without gemset.

Read this post and you will understand the excitement RVM gemset brought to the world at that moment.

But you don’t need that anymore

Because bundler only got you covered with bundle path.

# This will install all gems into vendor/gems directory of your current project root, and this is a remembered option.
bundle install --path vendor/gems --retry 3

You might want to setup an alias to save your time remembering the path.

# in your .zshrc
alias bi=bundler install --path vendor/gems --retry 3 --jobs 4
alias be=bundler exec

Any thoughts are welcomed!


NGUY HIỂM! KHU VỰC NHIỀU GIÓ!
Khuyến cáo giữ chặt bàn phím và lướt thật nhanh khi đi qua khu vực này.
Chức năng này hỗ trợ markdown và các thứ liên quan.

Bài viết cùng chủ đề

Euruko 2017 Notes

Vừa rồi mình đi Euruko 2017 ở Budapest, một số bài nói cũng khá thú vị nên mình sẽ note lại ở đây.

Six confusing features in Ruby

In this post I am trying to point out some Ruby features you might want to use with a lot of caution.

Bundler Gotcha

A few days ago I encountered a strange behavior of Bundler so this post notes down how my experience with it was.