Log In
Log In
Places
All Projects
Status Monitor
Collapse sidebar
obs:server:fedora:2.6:testing
obs-server
obs-server-2.6.6-0002-api-Use-bundler_ext-inste...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File obs-server-2.6.6-0002-api-Use-bundler_ext-instead-of-bundler-if-Gemfile.in.patch of Package obs-server
From 35b2e6a5e8debdac959e0235f15c471fcf08cd6a Mon Sep 17 00:00:00 2001 From: Oleg Girko <ol@infoserver.lv> Date: Sun, 18 May 2014 01:39:45 +0100 Subject: [PATCH 2/9] [api] Use bundler_ext instead of bundler if Gemfile.in file present. This is needed for installations where Ruby gems are managed by system package manager (like RPM or APT), so bundler should not interfere with that and refuse to start application if gems with versions slightly different than ones mentioned in Gemfile.lock are installed in the system. Signed-off-by: Oleg Girko <ol@infoserver.lv> --- src/api/config/application.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/api/config/application.rb b/src/api/config/application.rb index a0322bb..184e2d2 100644 --- a/src/api/config/application.rb +++ b/src/api/config/application.rb @@ -2,8 +2,14 @@ require File.expand_path('../boot', __FILE__) require 'rails/all' -# Assets should be precompiled for production (so we don't need the gems loaded then) -Bundler.require(*Rails.groups(assets: %w(development test))) +gemfile_in = File.expand_path('../../Gemfile.in', __FILE__) +if File.exist?(gemfile_in) + require 'bundler_ext' + BundlerExt.system_require(gemfile_in, *Rails.groups(assets: %w(development test))) +else + # Assets should be precompiled for production (so we don't need the gems loaded then) + Bundler.require(*Rails.groups(assets: %w(development test))) +end require_relative '../lib/engines/base.rb' OBSEngine::load_engines -- 2.1.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Contact
Support
@OBShq
The Open Build Service is an
openSUSE project
.
Log In
Places
Places
All Projects
Status Monitor