Gemfile xauv yog dab tsi?
Gemfile xauv yog dab tsi?

Video: Gemfile xauv yog dab tsi?

Video: Gemfile xauv yog dab tsi?
Video: happy_gemfile - Organise your Gemfile 2024, Hlis ntuj nqeg
Anonim

Cov Gemfile . xauv cov ntaub ntawv yog qhov twg Bundler sau cov qauv tseeb uas tau teeb tsa. Txoj kev no, thaum tib lub tsev qiv ntawv / qhov project tau thauj khoom ntawm lwm lub tshuab, khiav cov khoom nruab yuav saib ntawm Gemfile . Kev khiav haujlwm sib txawv ntawm cov tshuab sib txawv tuaj yeem ua rau kev sim tawg, thiab lwm yam.

Ntawm no, Gemfile yog dab tsi?

A Gemfile yog ib cov ntaub ntawv peb tsim uas yog siv los piav txog lub pov haum dependencies rau Ruby cov kev pab cuam. Lub pov haum yog ib phau ntawm Ruby code uas peb tuaj yeem rho tawm mus rau hauv "sau" uas peb tuaj yeem hu tom qab.

Tsis tas li ntawd, Gemfile nyob qhov twg? Gemfile yog ib cov ntaub ntawv uas yuav tsum yog nyob hauv paus ntawm koj qhov project rails. Nws yog siv los piav txog lub pov haum kev vam meej rau Ruby cov kev pab cuam. Thawj qhov hauv koj gemfile yog ib qhov chaw uas koj qhia rau Gemfile qhov twg mus nrhiav gems. Qhov chaw tuaj yeem hu ua qhov thaiv thiab koj tuaj yeem muaj ntau qhov chaw hauv koj li gemfile.

Yog li ntawd, kuv yuav tsum tau mus xyuas hauv Gemfile xauv?

Piv txwv tias koj tsis sau ib lub rubygem, Gemfile . xauv yuav tsum nyob hauv koj qhov chaw khaws cia. Nws yog siv raws li ib tug snapshot ntawm tag nrho cov koj xav tau gems thiab lawv dependencies. Yog tias koj ua haujlwm ntawm lub pov haum, ces TSIS TAU kuaj hauv koj Gemfile.

Kuv yuav hloov Gemfile li cas?

2 Teb. Mus rau hauv paus ntawm koj daim ntawv thov, thiab nrhiav Gemfile . Lub hauv paus ntawm daim ntawv thov yog qhov twg koj khiav rails server los ntawm, nyob rau hauv cov ntaub ntawv koj twb wondering:) Qhib Gemfile siv cov ntawv nyeem koj nyiam, thiab sim hloov rubygems los ntawm HTTP rau

Pom zoo: