Deprecated: Creation of dynamic property c2c_AddAdminCSS::$admin_options_name is deprecated in /var/www/html/wp-content/plugins/add-admin-css/c2c-plugin.php on line 106 Deprecated: Creation of dynamic property c2c_AddAdminCSS::$config is deprecated in /var/www/html/wp-content/plugins/add-admin-css/c2c-plugin.php on line 106 Deprecated: Creation of dynamic property c2c_AddAdminCSS::$disable_contextual_help is deprecated in /var/www/html/wp-content/plugins/add-admin-css/c2c-plugin.php on line 106 Deprecated: Creation of dynamic property c2c_AddAdminCSS::$disable_update_check is deprecated in /var/www/html/wp-content/plugins/add-admin-css/c2c-plugin.php on line 106 Deprecated: Creation of dynamic property c2c_AddAdminCSS::$hook_prefix is deprecated in /var/www/html/wp-content/plugins/add-admin-css/c2c-plugin.php on line 106 Deprecated: Creation of dynamic property c2c_AddAdminCSS::$form_name is deprecated in /var/www/html/wp-content/plugins/add-admin-css/c2c-plugin.php on line 106 Deprecated: Creation of dynamic property c2c_AddAdminCSS::$menu_name is deprecated in /var/www/html/wp-content/plugins/add-admin-css/c2c-plugin.php on line 106 Deprecated: Creation of dynamic property c2c_AddAdminCSS::$name is deprecated in /var/www/html/wp-content/plugins/add-admin-css/c2c-plugin.php on line 106 Deprecated: Creation of dynamic property c2c_AddAdminCSS::$nonce_field is deprecated in /var/www/html/wp-content/plugins/add-admin-css/c2c-plugin.php on line 106 Deprecated: Creation of dynamic property c2c_AddAdminCSS::$settings_page is deprecated in /var/www/html/wp-content/plugins/add-admin-css/c2c-plugin.php on line 106 Deprecated: Creation of dynamic property c2c_AddAdminCSS::$show_admin is deprecated in /var/www/html/wp-content/plugins/add-admin-css/c2c-plugin.php on line 106 Deprecated: Creation of dynamic property c2c_AddAdminCSS::$textdomain is deprecated in /var/www/html/wp-content/plugins/add-admin-css/c2c-plugin.php on line 106 Deprecated: Creation of dynamic property c2c_AddAdminCSS::$textdomain_subdir is deprecated in /var/www/html/wp-content/plugins/add-admin-css/c2c-plugin.php on line 106 Deprecated: Creation of dynamic property c2c_AddAdminCSS::$author_prefix is deprecated in /var/www/html/wp-content/plugins/add-admin-css/c2c-plugin.php on line 109 Deprecated: Creation of dynamic property c2c_AddAdminCSS::$id_base is deprecated in /var/www/html/wp-content/plugins/add-admin-css/c2c-plugin.php on line 110 Deprecated: Creation of dynamic property c2c_AddAdminCSS::$options_page is deprecated in /var/www/html/wp-content/plugins/add-admin-css/c2c-plugin.php on line 111 Deprecated: Creation of dynamic property c2c_AddAdminCSS::$plugin_basename is deprecated in /var/www/html/wp-content/plugins/add-admin-css/c2c-plugin.php on line 112 Deprecated: Creation of dynamic property c2c_AddAdminCSS::$plugin_file is deprecated in /var/www/html/wp-content/plugins/add-admin-css/c2c-plugin.php on line 113 Deprecated: Creation of dynamic property c2c_AddAdminCSS::$plugin_path is deprecated in /var/www/html/wp-content/plugins/add-admin-css/c2c-plugin.php on line 114 Deprecated: Creation of dynamic property c2c_AddAdminCSS::$u_id_base is deprecated in /var/www/html/wp-content/plugins/add-admin-css/c2c-plugin.php on line 115 Deprecated: Creation of dynamic property c2c_AddAdminCSS::$version is deprecated in /var/www/html/wp-content/plugins/add-admin-css/c2c-plugin.php on line 116 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-content/plugins/add-admin-css/c2c-plugin.php:106) in /var/www/html/wp-includes/rest-api/class-wp-rest-server.php on line 1768 {"id":197,"date":"2022-07-06T11:19:54","date_gmt":"2022-07-06T04:19:54","guid":{"rendered":"https:\/\/erwin.co\/?p=197"},"modified":"2022-07-06T11:19:54","modified_gmt":"2022-07-06T04:19:54","slug":"docker-gemfile-gemfile-lock-rbenv-rubygems-bundler-or-why-good-planning-can-often-beat-evolution","status":"publish","type":"post","link":"https:\/\/erwin.co\/docker-gemfile-gemfile-lock-rbenv-rubygems-bundler-or-why-good-planning-can-often-beat-evolution\/","title":{"rendered":"Docker, Gemfile, Gemfile.lock, rbenv, rubygems, bundler or why good planning can often beat evolution"},"content":{"rendered":"\n
Rbenv \u00e2\u2020\u2019 specifies a Ruby version<\/p>\n\n\n\n
Ruby \u00e2\u2020\u2019 loads some gems that are part of the base Ruby distribution (bundler, rubygems, irb, etc)<\/p>\n\n\n\n
Rubygems \u00e2\u2020\u2019loads other gems (for the system or user) \u00e2\u2020\u2019 Bundler \u00e2\u2020\u2019 loads other gems (for the current project) \u00e2\u2020\u2019 So basically Ruby ships with a bunch of gems, rubygems manages most of the gems you install, and bundler manages all of the gems for a specific project, and both rubygems and bundler ship with Ruby.<\/p>\n\n\n\n The initial release of Docker<\/em> was done at PyCon in 2013, but I wonder how much Ruby<\/em> and the various shades of gem catostrophe helped inspire Docker adoption?<\/p>\n\n\n\n If you're using Docker and thus only running a single set of You'll want to check what bundler<\/strong> and rubygems<\/strong> detect as the environment via:<\/p>\n\n\nGEM_HOME<\/code> and
GEM_PATH<\/code><\/p>\n\n\n\n
BUNDLE_PATH<\/code><\/p>\n\n\n\n
gems<\/code> at a time, I think you should simplify the models as much as possible. For a ruby focused docker container, just skip
rbenv<\/code> and similar tools, try to bypass the system gems as much as possible, and try to get bundler \/ rubygems to force everything into \/gems.<\/p>\n\n\n\n