BUNDLE_FROZEN是一个常用的环境变量,在开发Ruby on Rails应用程序时,可以被用来设置运行时Bundle的安装位置以及构建应用程序时使用的gem版本。
使用BUNDLE_FROZEN,需要在应用程序的Gemfile中添加以下代码:
source 'https://rubygems.org'
ruby '2.6.3'
Set the Rubygems source to avoid timeouts
#rubygems_sources = ENV['RUBYGEMS_SOURCE'] || 'https://rubygems.org'
#source rubygems_sources, :ssl_verify_mode => OpenSSL::SSL::VERIFY_PEER
Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.0'
Use postgresql as the database for Active Record
gem 'pg', '>= 0.18', '< 2.0'
Use Puma as the app server
gem 'puma', '~> 3.0'
Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
See https://github.com/rails/execjs#readme for more supported runtimes
gem 'therubyracer', platforms: :ruby
Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
Use jquery as the JavaScript library
gem 'jquery-rails'
Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
Use Redis adapter to run Action Cable in production
gem 'redis', '~> 4.0'
Use ActiveModel has_secure_password
gem 'bcrypt', '~> 3.1.7'
group :development, :test do
Call 'byebug' anywhere in the code to stop execution and get a debugger