Aug 13, 2012

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.

No comments: