What are the advantages and disadvantages of installing things in gglset @global in RVM?

What are the advantages and disadvantages of installing things in gglset @global in RVM?


Let's say I want to install different versions of rails on the same server. Then I want several ruby ​​applications to be installed on the same server with minimal duplication of files to save to disk. However, I still want to avoid dependency problems, conflict problems, and other issues.

Suppose also that each application has additional gems that it needs, that I only want the local gemset project in it.

Would be better:

  • Installing both Rails 3 and Rails 2 gems in a @globalgemset
    • ... and use design local gems for your gems ...
  • Installing Rails 3 in a gemset @rails3and Rails 2 in a set @rails2... then cloning for every project I need?
    For instance:
    • rvm use ree@rails3 && rvm gemset export rails3.gems
    • rvm use ree@rails2 && rvm gemset export rails2.gems
    • rvm use --create ree@project1-on-rails3 && rvm gemset import rails3.gems
      • Install more local gem projects here ...
    • rvm use --create ree@project2-on-rails2 && rvm gemset import rails2.gems
      • Install more local gem projects here ...
  • Something else completely ...
+3
source share
1 answer

. , , Bundler . , , Bundler . Bundler, , , , ( bundle install --system, !). gemset , , , .


Rails 3 Rails 2 Bundler , - ( ), Gemfile.lock. , " gem" . , bundle install , Gemfile, Gemfile.lock , Bundler.

, gemsets . , gemsets , :

  • , ( bundle exec).
  • grep , gemset.
  • "", RVM. , gem , bundle exec, , .

, , , , , gemset .

, , rvm , , ruby ​​ ( , ).

+3

All Articles