Tag: Bundler
source 'https://rubygems.org' gem 'activerecord' gem 'mysql2'
$ bundle install --path vendor/bundle
require "rubygems" require "bundler/setup" require "active_record"
ruby - Are bundle exec and require 'bundler/setup' equivalent? - Stack Overflowに、bundle execとbundle/setupの違いの説明あり。
bundle gem sampleapp -b -t #rspecが適用 bundle gem sampleapp -b --test=minitest #minitestが適用
/.bundle/configに以下を記述。bundle configで確認できる。
--- BUNDLE_PATH: ./vendor/bundle
$ gem install bundler ERROR: Could not find a valid gem 'bundler' (>= 0), here is why: Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=error: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)
Bundler could not find compatible versions for gem "bundler": In Gemfile: bundler (~> 1.16) Current Bundler version: bundler (2.0.1) This Gemfile requires a different version of Bundler.
gem uninstall bundler -v2.1.4 gem install bundler -v1.17.3