开发者

Which would work for a multi-user Ruby setup? RVM or RBenv?

开发者 https://www.devze.com 2023-04-11 12:01 出处:网络
At work we have a development machine setup much like a production machine. For each project running we use a different user. Until now we only did Java and PHP projects, but now I want to start doing

At work we have a development machine setup much like a production machine. For each project running we use a different user. Until now we only did Java and PHP projects, but now I want to start doing Ruby on Rails projects, so I want to be able to setup my Rails apps the same as we do for Java and PHP, where each project has another user.

Which Ruby version manager should I use to do this? RVM or RBenv? I couldn't find anythin开发者_C百科g about RBenv supporting multiple users.

When we do a multi-user (System-wide) setup of RVM is it possible to set a default Ruby version per user so there is one default RVM for everyone but overwrite this default for certain users?

Our web server is Apache so far, so is mod passenger the best choice to run my Rails projects?

I also looked at Pow, but I don't think it's a good solution to use in a multi-user setup.

Any idea's about this?


Umm, RVM is definitely built for multiple users AS WELL AS per user installations. Please see the installation page for more information.

Also, please see the integration section and Passenger page in that section for using multiple gemsets with Passenger, however, Passenger is limited to a single Ruby.

For the ability to use any Ruby and any gemset within that Ruby's space, you want to set up Unicorn for that. You can easily use Apache and Unicorn or NGinx and Unicorn to accomplish all you want.


RVM and RBENV keep their files (rubies/gems etc) in user folders (~/.rvm, ~/.rbenv). So you can use the one you like.

You can use passenger with a small projects, but for a big ones - try Unicorn or Thin.


You might want to try chruby. chruby was specifically designed to allow using Rubies installed into /usr/local/$ruby or /opt/$ruby, but still allow users to install gems into ~/.gem/$ruby/$version/. If you use chruby as root, gems are installed into /path/to/$ruby/$gem_dir/.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号