突然のredmineエラー発生!

ホームサーバーのredmine(1.4.4.stable)にアクセスしたら、
エラー(Ruby on Rails application could not be started)が発生した!
Railsのエラーっぽい。

Ruby on Rails application could not be started

A source file that the application requires, is missing.
It is possible that you didn't upload your application files correctly. Please check whether all your application files are uploaded.
A required library may not installed. Please install all libraries that this application requires.
Further information about the error may have been written to the application's log file. Please check it in order to analyse the problem.

Error message:
cannot load such file -- rexml/xmltokens (MissingSourceFile)

Exception class:
PhusionPassenger::UnknownError

serviceを再起動しても変化ない。
よってなぜか無いと怒られている「rexml/xmltokens」をgemを使ってインストール(修復)(性能かコーディング量か?RubyにおけるXMLライブラリーの選び方)する事にした。

■RubyGmesのアップデート
gem update --system

■LibXml-Rubyのインストール
gem install libxml-ruby

しかし変化なく・・・
仕方なくサーバーを再起動した。

すると今度はfilesystemエラーで起動せず・・・
ファイルシステムを修復(ext4のファイルシステム修復方法)してOSを起動させる。

しかし今度は別のエラー発生・・・

Ruby on Rails application could not be started

These are the possible causes:
There may be a syntax error in the application's code. Please check for such errors and fix them.
A required library may not installed. Please install all libraries that this application requires.
The application may not be properly configured. Please check whether all configuration files are written correctly, fix any incorrect configurations, and restart this application.
A service that the application relies on (such as the database server or the Ferret search engine server) may not have been started. Please start that service.
Further information about the error may have been written to the application's log file. Please check it in order to analyse the problem.

Error message:
uninitialized constant REXML::Namespace::XMLTokens

Exception class:
NameError

今度は「名前空間が定義されてない」と怒られている・・・
調べてもよく分からない・・・

とりあえず、このサーバーは仮想マシンで、バックアップも取ってあるので思い切っていろいろトライしてみる事にした!

■Railsのアップデート (2系から3系へ)
[root@svr] # gem update rails

しかし変化せず。
次にRuby本体をアップデート!

■Rubyのアップデート(ruby-1.9.3-p194からruby-1.9.3-p385へ)
・「ruby-1.9.3-p385」をダウンロード
・解凍ディレクトリで以下コマンドを実行

[root@svr] # ./configure
[root@svr] # make
[root@svr] # make install

これでRedmineが回復した!!

ま、結論から言えば、インストールされていたRubyが壊れたから??
・・・なのかな???

★初回のエラー
Ruby on Rails application could not be started_1

★再起動してfilesystem修復後のエラー
Ruby on Rails application could not be started-2

スポンサードリンク

タイトルとURLをコピーしました