mirror of
https://github.com/redmine/redmine.git
synced 2025-12-16 05:20:28 +01:00
Use Bundler for gem management (#5638).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8904 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -5,9 +5,6 @@
|
||||
# Example:
|
||||
#
|
||||
# config.log_level = :debug
|
||||
# config.gem "example_plugin", :lib => false
|
||||
# config.gem "timesheet_plugin", :lib => false, :version => '0.5.0'
|
||||
# config.gem "aws-s3", :lib => "aws/s3"
|
||||
# ...
|
||||
#
|
||||
|
||||
|
||||
@@ -41,6 +41,11 @@ module Rails
|
||||
class Boot
|
||||
def run
|
||||
load_initializer
|
||||
Rails::Initializer.class_eval do
|
||||
def load_gems
|
||||
@bundler_loaded ||= Bundler.require :default, Rails.env
|
||||
end
|
||||
end
|
||||
Rails::Initializer.run(:set_load_path)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -4,9 +4,6 @@
|
||||
# you don't control web/app server and can't set it the proper way
|
||||
# ENV['RAILS_ENV'] ||= 'production'
|
||||
|
||||
# Specifies gem version of Rails to use when vendor/rails is not present
|
||||
RAILS_GEM_VERSION = '2.3.14' unless defined? RAILS_GEM_VERSION
|
||||
|
||||
# Bootstrap the Rails environment, frameworks, and default configuration
|
||||
require File.join(File.dirname(__FILE__), 'boot')
|
||||
|
||||
@@ -54,9 +51,6 @@ Rails::Initializer.run do |config|
|
||||
# It will automatically turn deliveries on
|
||||
config.action_mailer.perform_deliveries = false
|
||||
|
||||
config.gem 'coderay', :version => '~>1.0.0'
|
||||
config.gem 'net-ldap', :version => '~>0.2.2'
|
||||
|
||||
# Load any local configuration that is kept out of source control
|
||||
# (e.g. gems, patches).
|
||||
if File.exists?(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
|
||||
|
||||
@@ -23,7 +23,3 @@ config.action_controller.session = {
|
||||
|
||||
# Skip protect_from_forgery in requests http://m.onkey.org/2007/9/28/csrf-protection-for-your-existing-rails-application
|
||||
config.action_controller.allow_forgery_protection = false
|
||||
|
||||
config.gem "shoulda", :version => "~> 2.10.3"
|
||||
config.gem "edavis10-object_daddy", :lib => "object_daddy"
|
||||
config.gem "mocha"
|
||||
|
||||
20
config/preinitializer.rb
Normal file
20
config/preinitializer.rb
Normal file
@@ -0,0 +1,20 @@
|
||||
begin
|
||||
require "rubygems"
|
||||
require "bundler"
|
||||
rescue LoadError
|
||||
$stderr.puts "Redmine requires Bundler. Please install it with `gem install bundler`."
|
||||
exit 1
|
||||
end
|
||||
|
||||
if Gem::Version.new(Bundler::VERSION) < Gem::Version.new("1.0.21")
|
||||
$stderr.puts "Redmine requires Bundler 1.0.21 (you're using #{Bundler::VERSION}).\nPlease install a newer version with `gem install bundler`."
|
||||
exit 1
|
||||
end
|
||||
|
||||
begin
|
||||
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", __FILE__)
|
||||
Bundler.setup
|
||||
rescue Bundler::GemNotFound
|
||||
$stderr.puts "Some gems may need to be installed or updated. Please run `bundle install`."
|
||||
exit 1
|
||||
end
|
||||
Reference in New Issue
Block a user