diff --git a/Gemfile b/Gemfile index 2b15202b..e266b576 100644 --- a/Gemfile +++ b/Gemfile @@ -106,7 +106,9 @@ if File.readable?(gemfile_local) end # Load plugins' Gemfiles -Dir.glob File.expand_path("../vendor/plugins/*/Gemfile", __FILE__) do |file| - puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v` - instance_eval File.read(file) +["plugins", "chiliproject_plugins"].each do |plugin_path| + Dir.glob File.expand_path("../vendor/#{plugin_path}/*/Gemfile", __FILE__) do |file| + puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v` + instance_eval File.read(file) + end end diff --git a/app/models/repository.rb b/app/models/repository.rb index 9411dfb5..ef44345e 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -200,6 +200,14 @@ class Repository < ActiveRecord::Base encoding.blank? ? 'UTF-8' : encoding end + # Provide a log encoding even if the column was not created yet + # It's used by 20100714111653_build_initial_journals_for_acts_as_journalized + # for initial journal creaetion of the changesets while the colum is only + # created by 20110228000000_add_repositories_log_encoding + def log_encoding + read_attribute(:log_encoding) + end + # Fetches new changesets for all repositories of active projects # Can be called periodically by an external script # eg. ruby script/runner "Repository.fetch_changesets" diff --git a/config/environment.rb b/config/environment.rb index cfb57a65..49b2aeb6 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -18,6 +18,9 @@ # you don't control web/app server and can't set it the proper way # ENV['RAILS_ENV'] ||= 'production' +# use RACK_ENV if we are running as a simple rack app +ENV['RAILS_ENV'] ||= ENV['RACK_ENV'] if ENV['RACK_ENV'] + # Specifies gem version of Rails to use when vendor/rails is not present RAILS_GEM_VERSION = '2.3.14' unless defined? RAILS_GEM_VERSION