##// END OF EJS Templates
Use Bundler for gem management (#5638)....
Jean-Philippe Lang -
r8784:9315039e0a95
parent child
Show More
@@ -0,0 +1,78
1 source :rubygems
2
3 gem "rails", "2.3.14"
4 gem "i18n", "~> 0.4.2"
5 gem "coderay", "~> 1.0.0"
6
7 # Optional gem for LDAP authentication
8 group :ldap do
9 gem "net-ldap", "~> 0.2.2"
10 end
11
12 # Optional gem for OpenID authentication
13 group :openid do
14 gem "ruby-openid", "~> 2.1.4", :require => "openid"
15 end
16
17 # Optional gem for exporting the gantt to a PNG file
18 group :rmagick do
19 # RMagick 2 supports ruby 1.9
20 # RMagick 1 would be fine for ruby 1.8 but Bundler does not support
21 # different requirements for the same gem on different platforms
22 gem "rmagick", ">= 2.0.0"
23 end
24
25 # Database gems
26 platforms :mri, :mingw do
27 group :postgresql do
28 gem "pg", "~> 0.9.0"
29 end
30
31 group :sqlite do
32 gem "sqlite3"
33 end
34 end
35
36 platforms :mri_18, :mingw_18 do
37 group :mysql do
38 gem "mysql"
39 end
40 end
41
42 platforms :mri_19, :mingw_19 do
43 group :mysql do
44 gem "mysql2", "~> 0.2.7"
45 end
46 end
47
48 platforms :jruby do
49 gem "jruby-openssl"
50
51 group :mysql do
52 gem "activerecord-jdbcmysql-adapter"
53 end
54
55 group :postgresql do
56 gem "activerecord-jdbcpostgresql-adapter"
57 end
58
59 group :sqlite do
60 gem "activerecord-jdbcsqlite3-adapter"
61 end
62 end
63
64 group :development do
65 gem "rdoc", ">= 2.4.2"
66 end
67
68 group :test do
69 gem "shoulda", "~> 2.10.3"
70 gem "edavis10-object_daddy", :require => "object_daddy"
71 gem "mocha"
72 end
73
74 # Load plugins' Gemfiles
75 Dir.glob File.expand_path("../vendor/plugins/*/Gemfile", __FILE__) do |file|
76 puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v`
77 instance_eval File.read(file)
78 end
@@ -0,0 +1,20
1 begin
2 require "rubygems"
3 require "bundler"
4 rescue LoadError
5 $stderr.puts "Redmine requires Bundler. Please install it with `gem install bundler`."
6 exit 1
7 end
8
9 if Gem::Version.new(Bundler::VERSION) < Gem::Version.new("1.0.21")
10 $stderr.puts "Redmine requires Bundler 1.0.21 (you're using #{Bundler::VERSION}).\nPlease install a newer version with `gem install bundler`."
11 exit 1
12 end
13
14 begin
15 ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", __FILE__)
16 Bundler.setup
17 rescue Bundler::GemNotFound
18 $stderr.puts "Some gems may need to be installed or updated. Please run `bundle install`."
19 exit 1
20 end
@@ -1,13 +1,10
1 # Copy this file to additional_environment.rb and add any statements
1 # Copy this file to additional_environment.rb and add any statements
2 # that need to be passed to the Rails::Initializer. `config` is
2 # that need to be passed to the Rails::Initializer. `config` is
3 # available in this context.
3 # available in this context.
4 #
4 #
5 # Example:
5 # Example:
6 #
6 #
7 # config.log_level = :debug
7 # config.log_level = :debug
8 # config.gem "example_plugin", :lib => false
9 # config.gem "timesheet_plugin", :lib => false, :version => '0.5.0'
10 # config.gem "aws-s3", :lib => "aws/s3"
11 # ...
8 # ...
12 #
9 #
13
10
@@ -1,119 +1,124
1 # Don't change this file!
1 # Don't change this file!
2 # Configure your app in config/environment.rb and config/environments/*.rb
2 # Configure your app in config/environment.rb and config/environments/*.rb
3
3
4 if RUBY_VERSION >= '1.9'
4 if RUBY_VERSION >= '1.9'
5 require 'yaml'
5 require 'yaml'
6 YAML::ENGINE.yamler = 'syck'
6 YAML::ENGINE.yamler = 'syck'
7 end
7 end
8
8
9 RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
9 RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
10
10
11 module Rails
11 module Rails
12 class << self
12 class << self
13 def boot!
13 def boot!
14 unless booted?
14 unless booted?
15 preinitialize
15 preinitialize
16 pick_boot.run
16 pick_boot.run
17 end
17 end
18 end
18 end
19
19
20 def booted?
20 def booted?
21 defined? Rails::Initializer
21 defined? Rails::Initializer
22 end
22 end
23
23
24 def pick_boot
24 def pick_boot
25 (vendor_rails? ? VendorBoot : GemBoot).new
25 (vendor_rails? ? VendorBoot : GemBoot).new
26 end
26 end
27
27
28 def vendor_rails?
28 def vendor_rails?
29 File.exist?("#{RAILS_ROOT}/vendor/rails")
29 File.exist?("#{RAILS_ROOT}/vendor/rails")
30 end
30 end
31
31
32 def preinitialize
32 def preinitialize
33 load(preinitializer_path) if File.exist?(preinitializer_path)
33 load(preinitializer_path) if File.exist?(preinitializer_path)
34 end
34 end
35
35
36 def preinitializer_path
36 def preinitializer_path
37 "#{RAILS_ROOT}/config/preinitializer.rb"
37 "#{RAILS_ROOT}/config/preinitializer.rb"
38 end
38 end
39 end
39 end
40
40
41 class Boot
41 class Boot
42 def run
42 def run
43 load_initializer
43 load_initializer
44 Rails::Initializer.class_eval do
45 def load_gems
46 @bundler_loaded ||= Bundler.require :default, Rails.env
47 end
48 end
44 Rails::Initializer.run(:set_load_path)
49 Rails::Initializer.run(:set_load_path)
45 end
50 end
46 end
51 end
47
52
48 class VendorBoot < Boot
53 class VendorBoot < Boot
49 def load_initializer
54 def load_initializer
50 require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
55 require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
51 Rails::Initializer.run(:install_gem_spec_stubs)
56 Rails::Initializer.run(:install_gem_spec_stubs)
52 Rails::GemDependency.add_frozen_gem_path
57 Rails::GemDependency.add_frozen_gem_path
53 end
58 end
54 end
59 end
55
60
56 class GemBoot < Boot
61 class GemBoot < Boot
57 def load_initializer
62 def load_initializer
58 self.class.load_rubygems
63 self.class.load_rubygems
59 load_rails_gem
64 load_rails_gem
60 require 'initializer'
65 require 'initializer'
61 end
66 end
62
67
63 def load_rails_gem
68 def load_rails_gem
64 if version = self.class.gem_version
69 if version = self.class.gem_version
65 gem 'rails', version
70 gem 'rails', version
66 else
71 else
67 gem 'rails'
72 gem 'rails'
68 end
73 end
69 rescue Gem::LoadError => load_error
74 rescue Gem::LoadError => load_error
70 if load_error.message =~ /Could not find RubyGem rails/
75 if load_error.message =~ /Could not find RubyGem rails/
71 STDERR.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.)
76 STDERR.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.)
72 exit 1
77 exit 1
73 else
78 else
74 raise
79 raise
75 end
80 end
76 end
81 end
77
82
78 class << self
83 class << self
79 def rubygems_version
84 def rubygems_version
80 Gem::RubyGemsVersion rescue nil
85 Gem::RubyGemsVersion rescue nil
81 end
86 end
82
87
83 def gem_version
88 def gem_version
84 if defined? RAILS_GEM_VERSION
89 if defined? RAILS_GEM_VERSION
85 RAILS_GEM_VERSION
90 RAILS_GEM_VERSION
86 elsif ENV.include?('RAILS_GEM_VERSION')
91 elsif ENV.include?('RAILS_GEM_VERSION')
87 ENV['RAILS_GEM_VERSION']
92 ENV['RAILS_GEM_VERSION']
88 else
93 else
89 parse_gem_version(read_environment_rb)
94 parse_gem_version(read_environment_rb)
90 end
95 end
91 end
96 end
92
97
93 def load_rubygems
98 def load_rubygems
94 min_version = '1.3.2'
99 min_version = '1.3.2'
95 require 'rubygems'
100 require 'rubygems'
96 unless rubygems_version >= min_version
101 unless rubygems_version >= min_version
97 $stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
102 $stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
98 exit 1
103 exit 1
99 end
104 end
100
105
101 rescue LoadError
106 rescue LoadError
102 $stderr.puts %Q(Rails requires RubyGems >= #{min_version}. Please install RubyGems and try again: http://rubygems.rubyforge.org)
107 $stderr.puts %Q(Rails requires RubyGems >= #{min_version}. Please install RubyGems and try again: http://rubygems.rubyforge.org)
103 exit 1
108 exit 1
104 end
109 end
105
110
106 def parse_gem_version(text)
111 def parse_gem_version(text)
107 $1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/
112 $1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/
108 end
113 end
109
114
110 private
115 private
111 def read_environment_rb
116 def read_environment_rb
112 File.read("#{RAILS_ROOT}/config/environment.rb")
117 File.read("#{RAILS_ROOT}/config/environment.rb")
113 end
118 end
114 end
119 end
115 end
120 end
116 end
121 end
117
122
118 # All that for this:
123 # All that for this:
119 Rails.boot!
124 Rails.boot!
@@ -1,65 +1,59
1 # Be sure to restart your web server when you modify this file.
1 # Be sure to restart your web server when you modify this file.
2
2
3 # Uncomment below to force Rails into production mode when
3 # Uncomment below to force Rails into production mode when
4 # you don't control web/app server and can't set it the proper way
4 # you don't control web/app server and can't set it the proper way
5 # ENV['RAILS_ENV'] ||= 'production'
5 # ENV['RAILS_ENV'] ||= 'production'
6
6
7 # Specifies gem version of Rails to use when vendor/rails is not present
8 RAILS_GEM_VERSION = '2.3.14' unless defined? RAILS_GEM_VERSION
9
10 # Bootstrap the Rails environment, frameworks, and default configuration
7 # Bootstrap the Rails environment, frameworks, and default configuration
11 require File.join(File.dirname(__FILE__), 'boot')
8 require File.join(File.dirname(__FILE__), 'boot')
12
9
13 if RUBY_VERSION >= '1.9' && defined?(Rails) && Rails::VERSION::MAJOR < 3
10 if RUBY_VERSION >= '1.9' && defined?(Rails) && Rails::VERSION::MAJOR < 3
14 Encoding.default_external = 'UTF-8'
11 Encoding.default_external = 'UTF-8'
15 end
12 end
16
13
17 # Load Engine plugin if available
14 # Load Engine plugin if available
18 begin
15 begin
19 require File.join(File.dirname(__FILE__), '../vendor/plugins/engines/boot')
16 require File.join(File.dirname(__FILE__), '../vendor/plugins/engines/boot')
20 rescue LoadError
17 rescue LoadError
21 # Not available
18 # Not available
22 end
19 end
23
20
24 Rails::Initializer.run do |config|
21 Rails::Initializer.run do |config|
25 # Settings in config/environments/* take precedence those specified here
22 # Settings in config/environments/* take precedence those specified here
26
23
27 # Skip frameworks you're not going to use
24 # Skip frameworks you're not going to use
28 # config.frameworks -= [ :action_web_service, :action_mailer ]
25 # config.frameworks -= [ :action_web_service, :action_mailer ]
29
26
30 # Add additional load paths for sweepers
27 # Add additional load paths for sweepers
31 config.autoload_paths += %W( #{RAILS_ROOT}/app/sweepers )
28 config.autoload_paths += %W( #{RAILS_ROOT}/app/sweepers )
32
29
33 # Force all environments to use the same logger level
30 # Force all environments to use the same logger level
34 # (by default production uses :info, the others :debug)
31 # (by default production uses :info, the others :debug)
35 # config.log_level = :debug
32 # config.log_level = :debug
36
33
37 # Enable page/fragment caching by setting a file-based store
34 # Enable page/fragment caching by setting a file-based store
38 # (remember to create the caching directory and make it readable to the application)
35 # (remember to create the caching directory and make it readable to the application)
39 # config.action_controller.cache_store = :file_store, "#{RAILS_ROOT}/tmp/cache"
36 # config.action_controller.cache_store = :file_store, "#{RAILS_ROOT}/tmp/cache"
40
37
41 # Activate observers that should always be running
38 # Activate observers that should always be running
42 # config.active_record.observers = :cacher, :garbage_collector
39 # config.active_record.observers = :cacher, :garbage_collector
43 config.active_record.observers = :message_observer, :issue_observer, :journal_observer, :news_observer, :document_observer, :wiki_content_observer, :comment_observer
40 config.active_record.observers = :message_observer, :issue_observer, :journal_observer, :news_observer, :document_observer, :wiki_content_observer, :comment_observer
44
41
45 # Make Active Record use UTC-base instead of local time
42 # Make Active Record use UTC-base instead of local time
46 # config.active_record.default_timezone = :utc
43 # config.active_record.default_timezone = :utc
47
44
48 # Use Active Record's schema dumper instead of SQL when creating the test database
45 # Use Active Record's schema dumper instead of SQL when creating the test database
49 # (enables use of different database adapters for development and test environments)
46 # (enables use of different database adapters for development and test environments)
50 # config.active_record.schema_format = :ruby
47 # config.active_record.schema_format = :ruby
51
48
52 # Deliveries are disabled by default. Do NOT modify this section.
49 # Deliveries are disabled by default. Do NOT modify this section.
53 # Define your email configuration in configuration.yml instead.
50 # Define your email configuration in configuration.yml instead.
54 # It will automatically turn deliveries on
51 # It will automatically turn deliveries on
55 config.action_mailer.perform_deliveries = false
52 config.action_mailer.perform_deliveries = false
56
53
57 config.gem 'coderay', :version => '~>1.0.0'
58 config.gem 'net-ldap', :version => '~>0.2.2'
59
60 # Load any local configuration that is kept out of source control
54 # Load any local configuration that is kept out of source control
61 # (e.g. gems, patches).
55 # (e.g. gems, patches).
62 if File.exists?(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
56 if File.exists?(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
63 instance_eval File.read(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
57 instance_eval File.read(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
64 end
58 end
65 end
59 end
@@ -1,29 +1,25
1 # Settings specified here will take precedence over those in config/environment.rb
1 # Settings specified here will take precedence over those in config/environment.rb
2
2
3 # The test environment is used exclusively to run your application's
3 # The test environment is used exclusively to run your application's
4 # test suite. You never need to work with it otherwise. Remember that
4 # test suite. You never need to work with it otherwise. Remember that
5 # your test database is "scratch space" for the test suite and is wiped
5 # your test database is "scratch space" for the test suite and is wiped
6 # and recreated between test runs. Don't rely on the data there!
6 # and recreated between test runs. Don't rely on the data there!
7 config.cache_classes = true
7 config.cache_classes = true
8
8
9 # Log error messages when you accidentally call methods on nil.
9 # Log error messages when you accidentally call methods on nil.
10 config.whiny_nils = true
10 config.whiny_nils = true
11
11
12 # Show full error reports and disable caching
12 # Show full error reports and disable caching
13 config.action_controller.consider_all_requests_local = true
13 config.action_controller.consider_all_requests_local = true
14 config.action_controller.perform_caching = false
14 config.action_controller.perform_caching = false
15
15
16 config.action_mailer.perform_deliveries = true
16 config.action_mailer.perform_deliveries = true
17 config.action_mailer.delivery_method = :test
17 config.action_mailer.delivery_method = :test
18
18
19 config.action_controller.session = {
19 config.action_controller.session = {
20 :key => "_test_session",
20 :key => "_test_session",
21 :secret => "some secret phrase for the tests."
21 :secret => "some secret phrase for the tests."
22 }
22 }
23
23
24 # Skip protect_from_forgery in requests http://m.onkey.org/2007/9/28/csrf-protection-for-your-existing-rails-application
24 # Skip protect_from_forgery in requests http://m.onkey.org/2007/9/28/csrf-protection-for-your-existing-rails-application
25 config.action_controller.allow_forgery_protection = false
25 config.action_controller.allow_forgery_protection = false
26
27 config.gem "shoulda", :version => "~> 2.10.3"
28 config.gem "edavis10-object_daddy", :lib => "object_daddy"
29 config.gem "mocha"
@@ -1,97 +1,92
1 == Redmine installation
1 == Redmine installation
2
2
3 Redmine - project management software
3 Redmine - project management software
4 Copyright (C) 2006-2011 Jean-Philippe Lang
4 Copyright (C) 2006-2012 Jean-Philippe Lang
5 http://www.redmine.org/
5 http://www.redmine.org/
6
6
7
7
8 == Requirements
8 == Requirements
9
9
10 * Ruby 1.8.6 or 1.8.7
10 * Ruby 1.8.6 or 1.8.7
11
11 * RubyGems
12 * RubyGems 1.3.7
12 * Bundler >= 1.0.21
13
14 * Ruby on Rails 2.3.14 (official downloadable Redmine releases are packaged with
15 the appropriate Rails version)
16
17 * Rack 1.1.2 gem
18
19 * Rake 0.9.2 gem
20
21 * I18n 0.4.2 gem
22
13
23 * A database:
14 * A database:
24 * MySQL (tested with MySQL 5.1)
15 * MySQL (tested with MySQL 5.1)
25 * PostgreSQL (tested with PostgreSQL 8.4)
16 * PostgreSQL (tested with PostgreSQL 8.4)
26 * SQLite3 (tested with SQLite 3.6)
17 * SQLite3 (tested with SQLite 3.6)
27
18
28 Optional:
19 Optional:
29 * SCM binaries (e.g. svn), for repository browsing (must be available in PATH)
20 * SCM binaries (e.g. svn, git...), for repository browsing (must be available in PATH)
30 * RMagick (to enable Gantt export to png images)
21 * ImageMagick (to enable Gantt export to png images)
31 * Ruby OpenID Library >= version 2 (to enable OpenID support)
32
22
33 == Installation
23 == Installation
34
24
35 1. Uncompress the program archive
25 1. Uncompress the program archive
36
26
37 2. Create an empty database: "redmine" for example
27 2. Install the required gems by running:
28 bundle install --without development test
29
30 If ImageMagick is not installed on your system, you should skip the installation
31 of the rmagick gem using:
32 bundle install --without development test rmagick
33
34 3. Create an empty utf8 encoded database: "redmine" for example
38
35
39 3. Configure the database parameters in config/database.yml
36 4. Configure the database parameters in config/database.yml
40 for the "production" environment (default database is MySQL)
37 for the "production" environment (default database is MySQL)
41
38
42 4. Generate a session store secret
39 5. Generate a session store secret
43
40
44 Redmine stores session data in cookies by default, which requires
41 Redmine stores session data in cookies by default, which requires
45 a secret to be generated. Under the application main directory run:
42 a secret to be generated. Under the application main directory run:
46 rake generate_session_store
43 rake generate_session_store
47
44
48 5. Create the database structure
45 6. Create the database structure
49
46
50 Under the application main directory run:
47 Under the application main directory run:
51 rake db:migrate RAILS_ENV="production"
48 rake db:migrate RAILS_ENV="production"
52
49
53 It will create all the tables and an administrator account.
50 It will create all the tables and an administrator account.
54
51
55 6. Setting up permissions (Windows users have to skip this section)
52 7. Setting up permissions (Windows users have to skip this section)
56
53
57 The user who runs Redmine must have write permission on the following
54 The user who runs Redmine must have write permission on the following
58 subdirectories: files, log, tmp & public/plugin_assets (create the last
55 subdirectories: files, log, tmp & public/plugin_assets.
59 two if they are not yet present).
60
56
61 Assuming you run Redmine with a user named "redmine":
57 Assuming you run Redmine with a user named "redmine":
62 mkdir tmp public/plugin_assets
63 sudo chown -R redmine:redmine files log tmp public/plugin_assets
58 sudo chown -R redmine:redmine files log tmp public/plugin_assets
64 sudo chmod -R 755 files log tmp public/plugin_assets
59 sudo chmod -R 755 files log tmp public/plugin_assets
65
60
66 7. Test the installation by running the WEBrick web server
61 8. Test the installation by running the WEBrick web server
67
62
68 Under the main application directory run:
63 Under the main application directory run:
69 ruby script/server -e production
64 ruby script/server -e production
70
65
71 Once WEBrick has started, point your browser to http://localhost:3000/
66 Once WEBrick has started, point your browser to http://localhost:3000/
72 You should now see the application welcome page.
67 You should now see the application welcome page.
73
68
74 8. Use the default administrator account to log in:
69 9. Use the default administrator account to log in:
75 login: admin
70 login: admin
76 password: admin
71 password: admin
77
72
78 Go to "Administration" to load the default configuration data (roles,
73 Go to "Administration" to load the default configuration data (roles,
79 trackers, statuses, workflow) and to adjust the application settings
74 trackers, statuses, workflow) and to adjust the application settings
80
75
81 == SMTP server Configuration
76 == SMTP server Configuration
82
77
83 Copy config/configuration.yml.example to config/configuration.yml and
78 Copy config/configuration.yml.example to config/configuration.yml and
84 edit this file to adjust your SMTP settings.
79 edit this file to adjust your SMTP settings.
85 Do not forget to restart the application after any change to this file.
80 Do not forget to restart the application after any change to this file.
86
81
87 Please do not enter your SMTP settings in environment.rb.
82 Please do not enter your SMTP settings in environment.rb.
88
83
89 == References
84 == References
90
85
91 * http://www.redmine.org/wiki/redmine/RedmineInstall
86 * http://www.redmine.org/wiki/redmine/RedmineInstall
92 * http://www.redmine.org/wiki/redmine/EmailConfiguration
87 * http://www.redmine.org/wiki/redmine/EmailConfiguration
93 * http://www.redmine.org/wiki/redmine/RedmineSettings
88 * http://www.redmine.org/wiki/redmine/RedmineSettings
94 * http://www.redmine.org/wiki/redmine/RedmineRepositories
89 * http://www.redmine.org/wiki/redmine/RedmineRepositories
95 * http://www.redmine.org/wiki/redmine/RedmineReceivingEmails
90 * http://www.redmine.org/wiki/redmine/RedmineReceivingEmails
96 * http://www.redmine.org/wiki/redmine/RedmineReminderEmails
91 * http://www.redmine.org/wiki/redmine/RedmineReminderEmails
97 * http://www.redmine.org/wiki/redmine/RedmineLDAP
92 * http://www.redmine.org/wiki/redmine/RedmineLDAP
@@ -1,36 +1,37
1 Installing gems for testing
1 Installing gems for testing
2 ===========================
2 ===========================
3
3
4 Run `rake gems RAILS_ENV=test` to list the required gems. Run
4 Remove your .bundle/config if you've already installed Redmine without
5 `rake gems:install RAILS_ENV=test` to install any missing gems.
5 the test dependencies.
6 Then, run `bundle install`.
6
7
7 Running Tests
8 Running Tests
8 =============
9 =============
9
10
10 Run `rake --tasks test` to see available tests.
11 Run `rake --tasks test` to see available tests.
11 `rake test` will run the entire testsuite.
12 `rake test` will run the entire testsuite.
12 You can run `ruby test/unit/issue_test.rb` for an each test.
13 You can run `ruby test/unit/issue_test.rb` for an each test.
13
14
14 Before running tests, you need to configure both development
15 Before running tests, you need to configure both development
15 and test databases.
16 and test databases.
16
17
17 Creating test repositories
18 Creating test repositories
18 ===================
19 ===================
19
20
20 Redmine supports a wide array of different version control systems.
21 Redmine supports a wide array of different version control systems.
21 To test the support, a test repository needs to be created for each of those.
22 To test the support, a test repository needs to be created for each of those.
22
23
23 Run `rake --tasks test:scm:setup` for a list of available test-repositories or
24 Run `rake --tasks test:scm:setup` for a list of available test-repositories or
24 run `rake test:scm:setup:all` to set up all of them
25 run `rake test:scm:setup:all` to set up all of them
25
26
26 Creating a test ldap database
27 Creating a test ldap database
27 =============================
28 =============================
28
29
29 Redmine supports using LDAP for user authentications. To test LDAP
30 Redmine supports using LDAP for user authentications. To test LDAP
30 with Redmine, load the LDAP export from test/fixtures/ldap/test-ldap.ldif
31 with Redmine, load the LDAP export from test/fixtures/ldap/test-ldap.ldif
31 into a testing LDAP server. Test that the ldap server can be accessed
32 into a testing LDAP server. Test that the ldap server can be accessed
32 at 127.0.0.1 on port 389.
33 at 127.0.0.1 on port 389.
33
34
34 Setting up the test ldap server is beyond the scope of this documentation.
35 Setting up the test ldap server is beyond the scope of this documentation.
35 The OpenLDAP project provides a simple LDAP implementation that should work
36 The OpenLDAP project provides a simple LDAP implementation that should work
36 good as a test server.
37 good as a test server.
@@ -1,63 +1,64
1 == Redmine upgrade
1 == Redmine upgrade
2
2
3 Redmine - project management software
3 Redmine - project management software
4 Copyright (C) 2006-2011 Jean-Philippe Lang
4 Copyright (C) 2006-2012 Jean-Philippe Lang
5 http://www.redmine.org/
5 http://www.redmine.org/
6
6
7
7
8 == Upgrading
8 == Upgrading
9
9
10 1. Uncompress the program archive in a new directory
10 1. Uncompress the program archive in a new directory
11
11
12 2. Copy your database settings (RAILS_ROOT/config/database.yml)
12 2. Copy your database settings (RAILS_ROOT/config/database.yml)
13 and your configuration file (RAILS_ROOT/config/configuration.yml)
13 and your configuration file (RAILS_ROOT/config/configuration.yml)
14 into the new config directory
14 into the new config directory
15 Note: before Redmine 1.2, SMTP configuration was stored in
15 Note: before Redmine 1.2, SMTP configuration was stored in
16 config/email.yml. It should now be stored in config/configuration.yml.
16 config/email.yml. It should now be stored in config/configuration.yml.
17
17
18 3. Copy the RAILS_ROOT/files directory content into your new installation
18 3. Copy the RAILS_ROOT/files directory content into your new installation
19 This directory contains all the attached files.
19 This directory contains all the attached files.
20
20
21 4. Copy the folders of the installed plugins and themes into new installation
21 4. Copy the folders of the installed plugins and themes into new installation
22
22
23 5. Generate a session store secret
23 5. Install the required gems by running:
24 bundle install --without development test
25
26 If ImageMagick is not installed on your system, you should skip the installation
27 of the rmagick gem using:
28 bundle install --without development test rmagick
29
30 6. Generate a session store secret
24
31
25 Redmine stores session data in cookies by default, which requires
32 Redmine stores session data in cookies by default, which requires
26 a secret to be generated. Under the new application directory run:
33 a secret to be generated. Under the new application directory run:
27 rake generate_session_store
34 rake generate_session_store
28
35
29 DO NOT REPLACE OR EDIT ANY OTHER FILES.
36 DO NOT REPLACE OR EDIT ANY OTHER FILES.
30
37
31 6. Migrate your database
38 7. Migrate your database
32
39
33 If you are upgrading to Rails 2.3.14 as part of this migration, you
40 If you are upgrading to Rails 2.3.14 as part of this migration, you
34 need to upgrade the plugin migrations before running the plugin migrations
41 need to upgrade the plugin migrations before running the plugin migrations
35 using:
42 using:
36 rake db:migrate:upgrade_plugin_migrations RAILS_ENV="production"
43 rake db:migrate:upgrade_plugin_migrations RAILS_ENV="production"
37
44
38 Please make a backup before doing this! Under the new application
45 Please make a backup before doing this! Under the new application
39 directory run:
46 directory run:
40 rake db:migrate RAILS_ENV="production"
47 rake db:migrate RAILS_ENV="production"
41
48
42 If you have installed any plugins, you should also run their database
49 If you have installed any plugins, you should also run their database
43 migrations using:
50 migrations using:
44 rake db:migrate_plugins RAILS_ENV="production"
51 rake db:migrate_plugins RAILS_ENV="production"
45
52
46 7. Clean up
53 8. Clear the cache and the existing sessions by running:
47
48 Clear the cache and the existing sessions by running:
49 rake tmp:cache:clear
54 rake tmp:cache:clear
50 rake tmp:sessions:clear
55 rake tmp:sessions:clear
51
56
52 8. Restart the application server (e.g. mongrel, thin, passenger)
57 9. Restart the application server (e.g. mongrel, thin, passenger)
53
54 9. Finally go to "Administration -> Roles & permissions" to check/set permissions
55 for new features, if any
56
57 == Notes
58
58
59 * Rails 2.3.14 is required for versions 1.3.x.
59 10. Finally go to "Administration -> Roles & permissions" to check/set permissions
60 for new features, if any
60
61
61 == References
62 == References
62
63
63 * http://www.redmine.org/wiki/redmine/RedmineUpgrade
64 * http://www.redmine.org/wiki/redmine/RedmineUpgrade
General Comments 0
You need to be logged in to leave comments. Login now