Aug 14, 2012

Notes on compiling Redmine 2.0.3 on CentOS 5.5

185 which ruby # check ruby's verison

# required
186 yum -y install zlib-devel curl-devel openssl-devel httpd-devel
apr-devel apr-util-devel mysql-devel

# system info: Centos 5.5
# kernel version does not matter
188 cat /etc/motd
189 uname -a

# required
220 yum -y install openssl-devel readline-devel zlib-devel
curl-devel libyaml-devel
221 yum install mysql-server mysql-devel
222 yum install httpd httpd-devel

# ruby's version should be 1.9.3
227 lynx http://www.ruby-lang.org/ja/downloads/xvjf
ruby-1.9.3-p194.tar.bz2
229 tar xvjf ruby-1.9.3-p194.tar.bz2
230 cd ruby-1.9.3-p194
232 ./configure ; make ; make install
233 cd

# check ruby's version again
234 which ruby

# symlink, safer for standard $PATH
235 ln -s /usr/local/bin/ruby /usr/bin/
236 which ruby
237 whereis ruby
238 /usr/bin/ruby -v

# No gem now, let's install
243 which gem
244 gem install bundler --no-rdoc --no-ri

# make UTF-8 default encoding for MySQL
249 cd /etc
250 ls my.cnf
251 cp my.cnf my.cnf.`date -I`.orig
252 vi my.cnf

# The change
[vuhung@ ~]$ diff /etc/my.cnf /etc/my.cnf.2012-08-08.orig
13,14d12
< character-set-server=utf8
<
18,23d15
<
<
< [mysql]
< default-character-set=utf8
<
<
[vuhung@ ~]$ cat /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

# Disabling symbolic-links is recommended to prevent assorted security
risks;
# to do so, uncomment this line:
# symbolic-links=0

character-set-server=utf8

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid


[mysql]
default-character-set=utf8

# mysql -uroot -p
mysql> create database redmine default character set utf8;
mysql> grant all on redmine.* to redmine identified by '<redmine's mysql
password';
mysql> flush privileges;
mysql> exit;

# restart mysql (to reload new configurations)
253 /etc/init.d/mysqld restart

# let's make mysqld and httpd starts up on boot, by default
254 chkconfig mysqld on
255 chkconfig httpd on

# install redmine
261 cd /var/www/
263 wget
http://rubyforge.org/frs/download.php/76259/redmine-2.0.3.tar.gz
264 gem install bundler

# yaml is needed by bundler
267 cd /usr/src/
270 wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
271 tar xvzf yaml-0.1.4.tar.gz
272 cd yaml-0.1.4
273 ./configure --prefix=/usr/local/
274 make
275 make install

# reinstall (remake) ruby 1.9.3
276 cd ..
277 ls
278 cd ruby-1.9.3-p194
279 make clean
280 ./configure ; make ; make install
281 gem install bundler
282 bundle install --without development test
283 pwd
284 cd /var/www/

286 tar xvzf redmine-2.0.3.tar.gz

# symlink to redmine, for the sake of simplicity when cd'ing
288 ln -s redmine-2.0.3 redmine
289 cd redmine

298 bundle install --without development test postgresql sqlite
299 cd /usr/src/mv/

# remove old versioned ImageMagick, if any
312 rpm -e `rpm -qa | grep ImageMagick`

# Download and compile ImageMagick
316 wget
http://image_magick.veidrodis.com/image_magick/ImageMagick-6.7.8-8.tar.xz
325 xz -d ImageMagick-6.7.8-8.tar.xz
327 tar xvf ImageMagick-6.7.8-8.tar
328 cd ImageMagick-6.7.8-8
329 ./configure
330 time make
331 make install
332 cd ..
333 cd /var/www/redmine

334 gem install bundler --no-rdoc --no-ri

# Configure Redmine's database adaptor, make sure "adapter" is "mysql2"
(not "mysql")
338 vi database.yml
[vuhung@myserver config]$ cat /var/www/redmine/config/database.yml
production:
adapter: mysql2
database: redmine
host: localhost
username: redmine
password: <redmine's mysql password>
encoding: utf8

341 bundle install --without development test postgresql sqlite

351 export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
352 cd /var/www/redmine
353 gem install rmagick -v '2.13.1'
354 rake generate_secret_token

356 gem install mocha
357 rake generate_secret_token
358 gem install fastercsv

361 bundle install
362 rake generate_secret_token
363 RAILS_ENV=production rake db:migrate
364 gem install passenger --no-rdoc --no-ri
365 passenger-install-apache2-module

# Integrate redmine (passenger) and Apache
372 vi /etc/httpd/conf.d/passenger.conf

[vuhung@ redmine]$ cat /etc/httpd/conf.d/passenger.conf

LoadModule passenger_module
/usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.15/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.15
PassengerRuby /usr/local/bin/ruby

Header always unset "X-Powered-By"
Header always unset "X-Rack-Cache"
Header always unset "X-Content-Digest"
Header always unset "X-Runtime"

PassengerMaxPoolSize 20
PassengerMaxInstancesPerApp 4
PassengerPoolIdleTime 3600
PassengerUseGlobalQueue on
PassengerHighPerformance on
PassengerStatThrottleRate 10
RailsSpawnMethod smart
RailsAppSpawnerIdleTime 86400
RailsFrameworkSpawnerIdleTime 0

RailsBaseURI /redmine

# make apache, the Linux's user who runs apache server owner of the
directory /var/www/redmine
392 cd /var/www/
394 chown -R apache.apache redmine
396 chown -R apache.apache redmine-2.0.3

# Initilize redmine's database, environment
400 RAILS_ENV=production bundle exec rake redmine:load_default_data
401 RAILS_ENV=production bundle exec rake generate_session_store

414 mkdir public/plugin_assets

# make plugins, log, files, upload writable
416 useradd redmine
417 chown -R redmine:redmine files log tmp public/plugin_assets/
418 chmod -R 755 files log tmp public/plugin_assets
419 ln -s /var/www/redmine/public /var/www/html/redmine

# recheck
420 vi /etc/httpd/conf.d/passenger.conf

# restart (reload) apache's configuration
421 /etc/init.d/httpd configtest
422 /etc/init.d/httpd graceful

428 ln -s /var/www/redmine/public redmine

# make Redmine sends email with Google's SMTP
Configurate emails:
[vuhung@ ~]$ cat /var/www/redmine/config/configuration.yml

# ==== SMTP server at using TLS (GMail)
#
# This might require some additional configuration. See the guides at:
# http://www.redmine.org/projects/redmine/wiki/EmailConfiguration
#
#default:
production:
email_delivery:
delivery_method: :smtp
smtp_settings:
# tls: true
enable_starttls_auto: true
address: "smtp.gmail.com"
port: '587'
domain: "smtp.gmail.com"
authentication: :plain
user_name: "noreply@domain.com"
password: "password"

development:
email_delivery:
delivery_method: :smtp
smtp_settings:
# tls: true
enable_starttls_auto: true
address: "smtp.gmail.com"
port: '587'
domain: "smtp.gmail.com"
authentication: :plain
user_name: "noreply@domain.com"
password: "password"


Cf. http://blog.redmine.jp/articles/redmine-2_0-installation_centos/
Cf.
http://www.redmine.org/projects/redmine/wiki/HowTo_install_Redmine_on_CentOS_5
Cf. http://www.redmine.org/projects/redmine/wiki/RedmineInstall
Cf. http://www.redmine.org/projects/redmine/wiki/EmailConfiguration
Cf.
http://collectiveidea.com/blog/archives/2011/10/31/install-ruby-193-with-libyaml-on-centos/

Trouble shootings etc...:

It seems your ruby installation is missing psych (for YAML output).
http://collectiveidea.com/blog/archives/2011/10/31/install-ruby-193-with-libyaml-on-centos/

[root@myserver redmine]# bundle install --without development test
Fetching gem metadata from http://rubygems.org/.......
Using rake (0.9.2.2)
Installing i18n (0.6.0)
Installing multi_json (1.3.6)
Installing activesupport (3.2.6)
Installing builder (3.0.0)
Installing activemodel (3.2.6)
Installing erubis (2.7.0)
Installing journey (1.0.4)
Installing rack (1.4.1)
Installing rack-cache (1.2)
Installing rack-test (0.6.1)
Installing hike (1.2.1)
Installing tilt (1.3.3)
Installing sprockets (2.1.3)
Installing actionpack (3.2.6)
Installing mime-types (1.19)
Installing polyglot (0.3.3)
Installing treetop (1.4.10)
Installing mail (2.4.4)
Installing actionmailer (3.2.6)
Installing arel (3.0.2)
Installing tzinfo (0.3.33)
Installing activerecord (3.2.6)
Installing activeresource (3.2.6)
Using bundler (1.1.5)
Installing coderay (1.0.7)
Installing json (1.7.4) with native extensions
Installing mysql2 (0.3.11) with native extensions
Installing net-ldap (0.3.1)
Installing pg (0.14.0) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native
extension.

/usr/local/bin/ruby extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
--with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/ruby
--with-pg
--without-pg
--with-pg-dir
--without-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/lib
--with-pg-config
--without-pg-config
--with-pg_config
--without-pg_config


Gem files will remain installed in
/usr/local/lib/ruby/gems/1.9.1/gems/pg-0.14.0 for inspection.
Results logged to
/usr/local/lib/ruby/gems/1.9.1/gems/pg-0.14.0/ext/gem_make.out
An error occured while installing pg (0.14.0), and Bundler cannot continue.
Make sure that `gem install pg -v '0.14.0'` succeeds before bundling.
[root@myserver redmine]#

An error occured while installing rmagick (2.13.1), and Bundler cannot
continue.
Make sure that `gem install rmagick -v '2.13.1'` succeeds before bundling.

[root@myserver redmine]# gem install rmagick
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
extconf.rb:128: Use RbConfig instead of obsolete and deprecated Config.
checking for gcc... yes
checking for Magick-config... yes
checking for ImageMagick version >= 6.4.9... no
Can't install RMagick 2.13.1. You must have ImageMagick 6.4.9 or later.

*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/ruby


Gem files will remain installed in
/usr/local/lib/ruby/gems/1.9.1/gems/rmagick-2.13.1 for inspection.
Results logged to
/usr/local/lib/ruby/gems/1.9.1/gems/rmagick-2.13.1/ext/RMagick/gem_make.out
[root@myserver redmine]#


[root@myserver redmine]# gem install rmagick -v '2.13.1'
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
extconf.rb:128: Use RbConfig instead of obsolete and deprecated Config.
checking for gcc... yes
checking for Magick-config... yes
checking for ImageMagick version >= 6.4.9... yes
checking for HDRI disabled version of ImageMagick... yes
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `MagickCore.pc'
to the PKG_CONFIG_PATH environment variable
No package 'MagickCore' found
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `MagickCore.pc'
to the PKG_CONFIG_PATH environment variable
No package 'MagickCore' found
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `MagickCore.pc'
to the PKG_CONFIG_PATH environment variable
No package 'MagickCore' found
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `MagickCore.pc'
to the PKG_CONFIG_PATH environment variable
No package 'MagickCore' found
checking for stdint.h... yes
checking for sys/types.h... yes
checking for wand/MagickWand.h... no

Can't install RMagick 2.13.1. Can't find MagickWand.h.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/ruby


Gem files will remain installed in
/usr/local/lib/ruby/gems/1.9.1/gems/rmagick-2.13.1 for inspection.
Results logged to
/usr/local/lib/ruby/gems/1.9.1/gems/rmagick-2.13.1/ext/RMagick/gem_make.out
[root@myserver redmine]#


--
Best Regards,
Nguyen Hung Vu [aka: NVH] ( in Vietnamese: Nguyễn Vũ Hưng )
vuhung16plus{remove}@gmail.dot.com , YIM: vuhung16 , Skype:
vuhung16plus, twitter: vuhung, MSN: vuhung16.
http://www.facebook.com/nguyenvuhung
Nguyễn Vũ Hưng's blog on Free and Open Source:
http://nguyenvuhungvietnam.wordpress.com/
Học tiếng Nhật: http://hoc-tiengnhat.blogspot.com/
Vietnamese LibreOffice: http://libo-vi.blogspot.com/
Mozilla & Firefox tiếng Việt: http://mozilla-vi.blogspot.com/

Disclaimer: When posted to social networking groups include, but not limited Linux Users' Groups,
Free and Open Sources forums, mailing lists, the above is my personal opinion and is *not*
the opinion of my employer(s), associations and/or groups I join.

Conceptual Skills: Khả năng khái niệm hóa

Conceptual Skill
- Là kỹ năng quan trọng
- Khó, đòi hỏi mức độ tổng quát hóa, kiến thức tổng hợp cao
- Cần với lãnh đạo và quản lý ở cấp cao
- Visualize vấn đề

Conceptual Skills (khả năng khái niệm (hóa)) are the skills managers must have to think and to conceptualize ( khái niệm hóa vấn đề)  about abstract and complex situations (vấn đề trừu tượng và phức tạp). Using these skills, managers must be able to see the organization as a whole, understand the relationships among various subunits, and visualize how the organization fits into its broader environment. These skills are most important at the top level management.


--   Best Regards,  Nguyen Hung Vu [aka: NVH] ( in Vietnamese: Nguyễn Vũ Hưng )  vuhung16plus{remove}@gmail.dot.com , YIM: vuhung16 , Skype:  vuhung16plus, twitter: vuhung, MSN: vuhung16.  http://www.facebook.com/nguyenvuhung  Nguyễn Vũ Hưng's blog on Free and Open Source:  http://nguyenvuhungvietnam.wordpress.com/  Học tiếng Nhật: http://hoc-tiengnhat.blogspot.com/  Vietnamese LibreOffice: http://libo-vi.blogspot.com/  Mozilla & Firefox tiếng Việt: http://mozilla-vi.blogspot.com/    Disclaimer: When posted to social networking groups include, but not limited Linux Users' Groups,  Free and Open Sources forums, mailing lists, the above is my personal opinion and is *not*  the opinion of my employer(s), associations and/or groups I join.

CentOS /etc/xinetd.conf

Question: What is the meaning of "status 0" and "status 1" in /var/log/message?

Answer:
- status 0 means "success"
- status 1 means "failure"

The log file:
/var/log/messages
Aug 13 23:09:38 servername xinetd[2909]: EXIT: smtp status=1 pid=32191 duration=1(sec)
Aug 13 23:09:38 servername xinetd[2909]: EXIT: smtp status=0 pid=32191 duration=1(sec)

Configuragion file: /etc/xinetd.conf
    log_type    = SYSLOG daemon info
    log_on_failure  = HOST
    log_on_success  = PID HOST DURATION EXIT


EXIT — Logs the exit status or termination signal of the service (log_on_success).

cf. "man xinetd.conf"
cf. http://www.centos.org/docs/4/html/rhel-rg-en-4/s1-tcpwrappers-xinetd-config.html
--   Best Regards,  Nguyen Hung Vu [aka: NVH] ( in Vietnamese: Nguyễn Vũ Hưng )  vuhung16plus{remove}@gmail.dot.com , YIM: vuhung16 , Skype:  vuhung16plus, twitter: vuhung, MSN: vuhung16.  http://www.facebook.com/nguyenvuhung  Nguyễn Vũ Hưng's blog on Free and Open Source:  http://nguyenvuhungvietnam.wordpress.com/  Học tiếng Nhật: http://hoc-tiengnhat.blogspot.com/  Vietnamese LibreOffice: http://libo-vi.blogspot.com/  Mozilla & Firefox tiếng Việt: http://mozilla-vi.blogspot.com/    Disclaimer: When posted to social networking groups include, but not limited Linux Users' Groups,  Free and Open Sources forums, mailing lists, the above is my personal opinion and is *not*  the opinion of my employer(s), associations and/or groups I join.

Aug 13, 2012

Redmine: fixed: ActionView::Template::Error (incompatible character encodings: ASCII-8BIT and UTF-8)

Solution:
/var/www/redmine/config/database.yml

production:
# old adapter: mysql

# new: changed from 'mysql' to 'mysql2'
adapter: mysql2
database: redmine
host: localhost
username: redmine
password:
encoding: utf8

Environment:
CentOS 6.3, Redmine 2.0.3,
ruby 1.9.3p194 (2012-04-20) [i686-linux]
gem 1.8.23

Error:
ActionView::Template::Error (incompatible character encodings:
ASCII-8BIT and UTF-8)

Action:
ruby script/rails server webrick -e production

Redmine console log:
Started GET "/projects/<project>/issues" for 172.20.111.27 at 2012-08-13
15:57:37 +0700
Processing by IssuesController#index as HTML
Parameters: {"project_id"=>"<project>"}
Rendered queries/_filters.html.erb (21.9ms)
Rendered queries/_columns.html.erb (2.0ms)
Rendered issues/_list.html.erb (118.7ms)
Rendered issues/index.html.erb within layouts/base (148.7ms)
Completed 500 Internal Server Error in 240ms

ActionView::Template::Error (incompatible character encodings:
ASCII-8BIT and UTF-8):
57: <p class="nodata"><%= l(:label_no_data) ></p>
58: < else >
59: <= render :partial => 'issues/list', :locals => {:issues => @issues,
:query => @query} >
60: <p class="pagination"><= pagination_links_full @issue_pages,
@issue_count ></p>
61: < end >
62:
63: < other_formats_links do |f| %>
app/views/issues/index.html.erb:60:in
`_app_views_issues_index_html_erb__327313672_102555190'
app/controllers/issues_controller.rb:83:in `block (2 levels) in index'
app/controllers/issues_controller.rb:82:in `index'


[root@redmine config]# gem list

*** LOCAL GEMS ***

actionmailer (3.2.6)
actionpack (3.2.6)
activemodel (3.2.6)
activerecord (3.2.6)
activeresource (3.2.6)
activesupport (3.2.6)
arel (3.0.2)
bigdecimal (1.1.0)
builder (3.0.0)
bundler (1.1.5)
coderay (1.0.7)
erubis (2.7.0)
factory_girl (4.0.0)
factory_girl_rails (4.0.0)
hike (1.2.1)
i18n (0.6.0)
io-console (0.3)
journey (1.0.4)
json (1.7.3, 1.5.4)
mail (2.4.4)
metaclass (0.0.1)
mime-types (1.19)
minitest (2.5.1)
mocha (0.12.0)
multi_json (1.3.6)
mysql (2.8.1)
mysql2 (0.3.11)
net-ldap (0.3.1)
polyglot (0.3.3)
prototype-rails (3.2.1)
rack (1.4.1)
rack-cache (1.2)
rack-openid (1.3.1)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.2.6)
railties (3.2.6)
rake (0.9.2.2)
rdoc (3.12, 3.9.4)
rmagick (2.13.1)
ruby-openid (2.1.8)
shoulda (2.11.3)
simplecov (0.6.4)
simplecov-html (0.5.3)
simplecov-rcov (0.2.3)
sprockets (2.1.3)
thor (0.15.4)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.33)
yard (0.8.2.1)
[root@redmine config]#

--
Best Regards,
Nguyen Hung Vu [aka: NVH] ( in Vietnamese: Nguyễn Vũ Hưng )
vuhung16plus{remove}@gmail.dot.com , YIM: vuhung16 , Skype:
vuhung16plus, twitter: vuhung, MSN: vuhung16.
http://www.facebook.com/nguyenvuhung
Nguyễn Vũ Hưng's blog on Free and Open Source:
http://nguyenvuhungvietnam.wordpress.com/
Học tiếng Nhật: http://hoc-tiengnhat.blogspot.com/
Vietnamese LibreOffice: http://libo-vi.blogspot.com/
Mozilla & Firefox tiếng Việt: http://mozilla-vi.blogspot.com/

Disclaimer: When posted to social networking groups include, but not limited Linux Users' Groups,
Free and Open Sources forums, mailing lists, the above is my personal opinion and is *not*
the opinion of my employer(s), associations and/or groups I join.

Connecting rake, ruby with yaml

Solution:
$ wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
$ tar xzvf yaml-0.1.4.tar.gz
$ cd yaml-0.1.4
$ ./configure --prefix=/usr/local
$ make
$ make install

$ wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz
$ tar xzvf ruby-1.9.3-p194.tar.gz
$ cd ruby-1.9.3-p194
$ ./configure --prefix=/usr/local --enable-shared --disable-install-doc --with-opt-dir=/usr/local/lib
$ make
$ make install

Environment:
[root@redmine ruby-1.9.3-p194]# head /var/www/redmine-2.0/doc/CHANGELOG
== Redmine changelog

Redmine - project management software
Copyright (C) 2006-2012  Jean-Philippe Lang
http://www.redmine.org/

== 2012-06-18 v2.0.3

* Defect #10688: PDF export from Wiki - Problems with tables
* Defect #11061: Cannot choose commit versions to view differences in Git/Mercurial repository view
[root@redmine ruby-1.9.3-p194]# rake --version
rake, version 0.9.2.2
[root@redmine ruby-1.9.3-p194]# ruby -v
ruby 1.9.3p194 (2012-04-20) [i686-linux]
[root@redmine ruby-1.9.3-p194]#

The bug:
[root@redmine redmine]# rake db:migrate_plugins RAILS_ENV=production
rake aborted!
cannot load such file -- bundler/setup

(See full trace by running task with --trace)
[root@redmine redmine]#
[root@redmine redmine]# gem install bundler
/usr/local/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.

Fetching: bundler-1.1.5.gem (100%)
Successfully installed bundler-1.1.5
1 gem installed
Installing ri documentation for bundler-1.1.5...
Installing RDoc documentation for bundler-1.1.5...
[root@redmine redmine]#
[root@redmine redmine]# bundle install
/usr/local/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
Fetching gem metadata from http://rubygems.org/.......
Fetching gem metadata from http://rubygems.org/.......
Using rake (0.9.2.2)
Installing i18n (0.6.0)
Installing multi_json (1.3.6)
Installing activesupport (3.2.6)
Installing builder (3.0.0)
Installing activemodel (3.2.6)
Installing erubis (2.7.0)
Installing journey (1.0.4)
Installing rack (1.4.1)
Installing rack-cache (1.2)
Installing rack-test (0.6.1)
Installing hike (1.2.1)
Installing tilt (1.3.3)
Installing sprockets (2.1.3)
Installing actionpack (3.2.6)
Installing mime-types (1.19)
Installing polyglot (0.3.3)
Installing treetop (1.4.10)
Installing mail (2.4.4)
Installing actionmailer (3.2.6)
Installing arel (3.0.2)
Installing tzinfo (0.3.33)
Installing activerecord (3.2.6)
Installing activeresource (3.2.6)
Using bundler (1.1.5)
Installing coderay (1.0.7)
Installing factory_girl (4.0.0)
Installing rack-ssl (1.3.2)
Installing json (1.7.3) with native extensions
Installing rdoc (3.12)
Installing thor (0.15.4)
Installing railties (3.2.6)
Installing factory_girl_rails (4.0.0)
Installing metaclass (0.0.1)
Installing mocha (0.12.0)
Installing mysql (2.8.1) with native extensions
Installing mysql2 (0.3.11) with native extensions
Installing net-ldap (0.3.1)
Installing rails (3.2.6)
Installing prototype-rails (3.2.1)
Installing ruby-openid (2.1.8)
Installing rack-openid (1.3.1)
Installing rmagick (2.13.1) with native extensions
Installing shoulda (2.11.3)
Installing simplecov-html (0.5.3)
Installing simplecov (0.6.4)
Installing simplecov-rcov (0.2.3)

Installing yard (0.8.2.1)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
[root@redmine redmine]#
[root@redmine redmine]#
[root@redmine redmine]#
[root@redmine redmine]# bundle show
/usr/local/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
Gems included by the bundle: * actionmailer (3.2.6) * actionpack (3.2.6) * activemodel (3.2.6) * activerecord (3.2.6) * activeresource (3.2.6) * activesupport (3.2.6) * arel (3.0.2) * builder (3.0.0) * bundler (1.1.5) * coderay (1.0.7) * erubis (2.7.0) * factory_girl (4.0.0) * factory_girl_rails (4.0.0) * hike (1.2.1) * i18n (0.6.0) * journey (1.0.4) * json (1.7.3) * mail (2.4.4) * metaclass (0.0.1) * mime-types (1.19) * mocha (0.12.0) * multi_json (1.3.6) * mysql (2.8.1) * mysql2 (0.3.11) * net-ldap (0.3.1) * polyglot (0.3.3) * prototype-rails (3.2.1) * rack (1.4.1) * rack-cache (1.2) * rack-openid (1.3.1) * rack-ssl (1.3.2) * rack-test (0.6.1) * rails (3.2.6) * railties (3.2.6) * rake (0.9.2.2) * rdoc (3.12) * rmagick (2.13.1) * ruby-openid (2.1.8) * shoulda (2.11.3) * simplecov (0.6.4) * simplecov-html (0.5.3) * simplecov-rcov (0.2.3) * sprockets (2.1.3) * thor (0.15.4) * tilt (1.3.3) * treetop (1.4.10) * tzinfo (0.3.33) * yard (0.8.2.1)
[root@redmine redmine]#


--   Best Regards,  Nguyen Hung Vu [aka: NVH] ( in Vietnamese: Nguyễn Vũ Hưng )  vuhung16plus{remove}@gmail.dot.com , YIM: vuhung16 , Skype:  vuhung16plus, twitter: vuhung, MSN: vuhung16.  http://www.facebook.com/nguyenvuhung  Nguyễn Vũ Hưng's blog on Free and Open Source:  http://nguyenvuhungvietnam.wordpress.com/  Học tiếng Nhật: http://hoc-tiengnhat.blogspot.com/  Vietnamese LibreOffice: http://libo-vi.blogspot.com/  Mozilla & Firefox tiếng Việt: http://mozilla-vi.blogspot.com/    Disclaimer: When posted to social networking groups include, but not limited Linux Users' Groups,  Free and Open Sources forums, mailing lists, the above is my personal opinion and is *not*  the opinion of my employer(s), associations and/or groups I join.

Redmine backup scripts

This is a short memo on how to setup a backup script for Redmine's
database and attachment,
running that script weekly on CentOS 6.3

# cat /usr/local/bin/redmine-backup.sh
#!/bin/bash

/usr/bin/mysqldump -uredmine -pNev123456 redmine | gzip >
/var/backup/redmine/db/redmine_`date +%y_%m_%d`.gz

rsync -a /var/www/redmine/files /var/backup/redmine/attachment

# cat /etc/redhat-release
CentOS release 6.3 (Final)

#yum -y install cronie

#cd /etc/cron.daily; ln -s /usr/local/bin/redmine-backup.sh

--
Best Regards,
Nguyen Hung Vu [aka: NVH] ( in Vietnamese: Nguyễn Vũ Hưng )
vuhung16plus{remove}@gmail.dot.com , YIM: vuhung16 , Skype:
vuhung16plus, twitter: vuhung, MSN: vuhung16.
http://www.facebook.com/nguyenvuhung
Nguyễn Vũ Hưng's blog on Free and Open Source:
http://nguyenvuhungvietnam.wordpress.com/
Học tiếng Nhật: http://hoc-tiengnhat.blogspot.com/
Vietnamese LibreOffice: http://libo-vi.blogspot.com/
Mozilla & Firefox tiếng Việt: http://mozilla-vi.blogspot.com/

Disclaimer: When posted to social networking groups include, but not limited Linux Users' Groups,
Free and Open Sources forums, mailing lists, the above is my personal opinion and is *not*
the opinion of my employer(s), associations and/or groups I join.