“PHP Composer” compared with “Ruby Gems and Bundler”

后端 未结 1 371
面向向阳花
面向向阳花 2021-02-06 01:01

(As first, this question is not \"which is better\" question. I just want to know how they are similar and differ in functionality perspective.)

I\'m php

相关标签:
1条回答
  • 2021-02-06 01:29

    1) Composer is more similar to bundler. Composer brings everything in your project, bundler brings everything to your system and "links" them in the context of your project. Bundler is working with gems in the back.

    2) yes. gem install does things system-wide (or per user if you use something like rbenv or rvm)

    3) see 1. system wide and are correctly picked according to the Gemfile when you run things through bundle exec

    4) I recommend using a Gemfile, putting the version you're interested in there and letting bundler do the rest (it will in the back install multiple versions and pick the right one). Be sure to run "bundle exec" though. You also have the option of using an rvm gemset if you're into rvm but that's harder to handle and you will have a really bad time when attempting to deploy.

    0 讨论(0)
提交回复
热议问题