0. Note 1. When using Ruby1.9 + Redmine2.0, some plug-ins may encounter problems during installation, such as: A. Scrum plug-in scrum-pm (redmine_sprints) Errormessage: nosuchfiletoload -- dispatcher
0. Notes
1. When Ruby 1.9 + Redmine 2.0 is used, some plug-ins may encounter problems during installation, for example:
A. Scrum plug-in scrum-pm (REdmine_sprints)
- Error message:
- No such file to load -- dispatcher
- Exception class:
- LoadError
- Application root:
- /Usr/share/redmine
A third-party library reference error may be caused by changes to Ruby 1.9 compared with earlier versions.
Scrum-pm officially does not indicate support for Ruby 1.9, and scrum-pm officially stops support.
2. We recommend that you use earlier Ruby (1.8) and earlier Redmine (1.4) versions)
I. installation environment
1. Operating System
Root @ www.linuxidc.com :~ # Lsb_release-
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.1 LTS
Release: 10.04
Codename: Lucid
2. You have installed MySql properly (sudo apt-get install mysql-server libmysqlclient-dev ):
Root @ www.linuxidc.com :~ # Mysql -- version
Mysql Ver 14.14 Distrib 5.1.54, for debian-linux-gnu (i686) using readline 6.2
3. You have installed Apache2 properly.
Root @ www.linuxidc.com :~ # Apache2-v
Server version: Apache/2.2.17 (Ubuntu)
Server built: Feb 22 2011 18:34:09
Ii. Install ruby 1.9 (including gem)
1. Install the dependency package:
Root @ www.linuxidc.com :~ # Sudo apt-get install gcc g ++ build-essential libssl-dev libreadline-dev zlib1g-dev linux-headers-generic libyaml-dev
2. download the latest stable version of ruby 1.9.
Root @ www.linuxidc.com :~ # Wget http://ftp.ruby-lang.org/pub/ruby/ruby-1.9-stable.tar.gz
Root @ www.linuxidc.com :~ # Tar-zxf./ruby-1.9-stable.tar.gz
3. Compile the ruby source code
Root @ www.linuxidc.com :~ # Cd ruby-1.9.3-p194/
Root @ www.linuxidc.com :~ /Ruby-1.9.3-p194 #./configure -- prefix =/usr/local/ruby
Root @ www.linuxidc.com :~ /Ruby-1.9.3-p194 # make & sudo make install
4. ruby environment variable settings
# PATH settings
Root @ www.linuxidc.com :~ Ruby-1.9.3-p194 # sudo vi/etc/environment
# Add/usr/local/ruby/bin in PATH:
- PATH = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games: /usr/local/ruby/bin"
Root @ www.linuxidc.com :~ Ruby-1.9.3-p194 # source/etc/environment
# Check PATH settings
Root @ www.linuxidc.com :~ /Ruby-1.9.3-p194 # ruby-v
Ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]
Root @ www.linuxidc.com :~ /Ruby-1.9.3-p194 # gems-v
1.8.23
# Modify GEM_HOME
Root @ www.linuxidc.com :~ Ruby-1.9.3-p194 # sudo vim/etc/profile
# Add the following content to/etc/profile:
- Export GEM_HOME =/usr/local/ruby/lib/ruby/gems/1.9.1/
- Export RUBYOPT = rubygems
Root @ www.linuxidc.com :~ /Ruby-1.9.3-p194 # source/etc/profile
# Modify the gem source (You know)
Root @ www.linuxidc.com :~ # Gem source
* ** Current sources ***
Http://rubygems.org/
Root @ www.linuxidc.com :~ # Gem source -- clear-all
* ** Removed specs cache ***
Root @ www.linuxidc.com :~ # Gem source -- add http://ruby.taobao.org/
Http://ruby.taobao.org/added to sources
5. Install bundler
Root @ www.linuxidc.com :~ # Gem install bundler
Root @ www.linuxidc.com :~ # Ln-s/usr/local/ruby/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/bin/bundle/usr/local/ruby/bin/bundle
3. Install redmine 2.0.3
1. Download redmine
Root @ www.linuxidc.com :~ # Git clone https://github.com/redmine/redmine.git
Root @ www.linuxidc.com :~ # Mv-f./redmine // usr/share/redmine
Root @ www.linuxidc.com :~ # Cd/usr/share/redmine/
Root @ www.linuxidc.com:/usr/share/redmine # rm-Rf./. git
2. Modify Gemfile
Root @ www.linuxidc.com:/usr/share/redmine # vim./Gemfile
# Change source to http://ruby.taobao.org/(we all know)
- Source 'HTTP: // ruby.taobao.org /'
# If mysql is used, comment out postgresql-related information.
- # Database gems
- # Platforms: mri,: mingw do
- # Group: postgresql do
- # Gem "pg", "> = 0.11.0"
- # End
3. Install the redmine dependency package
# Possible errors (there may be many errors. Solve them slowly. The following are typical examples ):
A. An error occured while installing mysql2 (0.3.11), and Bundler cannot continue.
# Install libmysqlclient-dev first
Root @ www.linuxidc.com :~ # Sudo apt-get install libmysqlclient-dev
B. An error occured while installing pg (0.14.0), and Bundler cannot continue.
# If you use mysql, you can delete pg from Gemfile or install postgresql. I choose not to install pg.
C. An error occured while installing rmagick (2.13.1), and Bundler cannot continue.
# Imagemagick needs to be installed
Root @ www.linuxidc.com :~ # Sudo apt-get install imagemagick
3. database creation and configuration (myql)
Root @ www.linuxidc.com:/usr/share/redmine # mysql-p
- Create DatabaseRedmineCharacter SetUtf8;
- Create User 'Redmine'@'Localhost'IdentifiedBy 'My _ password';
- Grant All Privileges OnRedmine .*To 'Redmine'@'Localhost';
Root @ www.linuxidc.com:/usr/share/redmine # cp config/database. yml. example config/database. yml
Root @ www.linuxidc.com:/usr/share/redmine # vim config/database. yml
- Production:
- Adapter: mysql2 # ruby1.9 use mysql2
- Database: redmine
- Host: localhost
- Username: redmine
- Password: my_password
Root @ www.linuxidc.com:/usr/share/redmine # rake generate_secret_token
# Creating a database
Root @ www.linuxidc.com:/usr/share/redmine # RAILS_ENV = production rake db: migrate
Root @ www.linuxidc.com:/usr/share/redmine # RAILS_ENV = production rake redmine: load_default_data
4. Modify user permissions
Root @ www.linuxidc.com:/usr/share/redmine # mkdir tmp public/plugin_assets
# To use apache2, set the redmine running user to www-data
Root @ www.linuxidc.com:/usr/share/redmine # sudo chown-R www-data: www-data files log tmp public/plugin_assets
Root @ www.linuxidc.com:/usr/share/redmine # sudo chmod-R 755 files log tmp public/plugin_assets
5. Trial Run
Root @ www.linuxidc.com:/usr/share/redmine # ruby script/rails server webrick-e production
# Browser access: http: // 192.168.1.203: 3000/confirm whether the server can run normally