29/01/2025

gemfile-bundle-ruby

Bundle install ruby yazilim projelerinde kullanilan, dependency leri kurmak icin kullanilir.

  • Gemfile dosyasini okur ve gerekli gemleri (library leri) ögrenir.
  • Dependency leri inceler ve birbirleri ile uyumlu olanlari belirler.
  • Gemleri kurar
  • Gemfile.lock olusturur ki ilerde de uyumluluk takip edilebilsin.

Önce Gemfile olusturuyoruz.

source "https://rubygems.org"

gem "rails", "~> 6.1.0"
gem "pg", "~> 1.2"
gem "puma", "~> 5.0"

sonrasinda da

gem install bundler
bundle install

Cok önemli bir konu fastlane i bundle exec ile kullanmaktir. Böylece Bundle install ile kurulan dependency ler kullanilarak fastlane calisir.

Örnek Fastfile

default_platform(:ios)

platform :ios do
  desc "Runs all the tests"
  lane :test do
    cocoapods(
      clean_install: true,
      podfile: "./Podfile"
    )
    scan
  end
end

Sonrasinda da

bundle exec fastlane test