0

Ruby サーバーを新しいサーバーに移行しようとしています。そのmongrel.logファイルにエラーが表示されます:

/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require: no such file to load -- yahoo-weather (MissingSourceFile)
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in require
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:184:in require
from /home/dianahot/rails_apps/dianahotels/config/initializers/included_libraries.rb:9
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:173:in load_without_new_constant_marking
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.14/lib/active_support/dependencies.rb:173:in load
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.14/lib/initializer.rb:622:in load_application_initializers
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.14/lib/initializer.rb:621:in each
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.14/lib/initializer.rb:621:in load_application_initializers
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.14/lib/initializer.rb:176:in process
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.14/lib/initializer.rb:113:in send
from /usr/lib/ruby/gems/1.8/gems/rails-2.3.14/lib/initializer.rb:113:in run
from /home/dianahot/rails_apps/dianahotels/config/environment.rb:12
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in gem_original_require
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in require
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:147:in rails
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:113:in cloaker_
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:149:in call
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:149:in listener
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:99:in cloaker_
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:50:in call
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:50:in initialize
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:84:in new
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:84:in run
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in run
from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
from /usr/bin/mongrel_rails:23:in load
from /usr/bin/mongrel_rails:23

それらの行はどういう意味ですか?


編集:

yahoo-weather gem を手動でインストールしようとしたところ、次のエラーが発生しました。

gem install yahoo-weather
Fetching: nokogiri-1.5.2.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing yahoo-weather:
        ERROR: Failed to build gem native extension.

        /usr/bin/ruby extconf.rb
checking for libxml/parser.h... yes
checking for libxslt/xslt.h... no
-----
libxslt is missing.  please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
-----
*** 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/bin/ruby
        --with-zlib-dir
        --without-zlib-dir
        --with-zlib-include
        --without-zlib-include=${zlib-dir}/include
        --with-zlib-lib
        --without-zlib-lib=${zlib-dir}/lib
        --with-iconv-dir
        --without-iconv-dir
        --with-iconv-include
        --without-iconv-include=${iconv-dir}/include
        --with-iconv-lib
        --without-iconv-lib=${iconv-dir}/lib
        --with-xml2-dir
        --without-xml2-dir
        --with-xml2-include
        --without-xml2-include=${xml2-dir}/include
        --with-xml2-lib
        --without-xml2-lib=${xml2-dir}/lib
        --with-xslt-dir
        --without-xslt-dir
        --with-xslt-include
        --without-xslt-include=${xslt-dir}/include
        --with-xslt-lib
        --without-xslt-lib=${xslt-dir}/lib


Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/nokogiri-1.5.2 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/nokogiri-1.5.2/ext/nokogiri/gem_make.out
root@server2 [/usr/lib/ruby/gems/1.8/gems]# % gem install yahoo-weather
-bash: fg: %: no such job
root@server2 [/usr/lib/ruby/gems/1.8/gems]#
4

2 に答える 2

1

おそらく、あなたは yahoo-weather gem を見逃しています。

バンドラーを使用することを強くお勧めします。これにより、すべての依存関係の一貫したバージョンを使用して、アプリを新しいマシンにデプロイすることがはるかに簡単になります。

于 2012-05-19T15:46:16.833 に答える
0

Nokogiri への依存関係が失敗したため、Yahoo-weather gem のインストールに失敗しました。そして、それは次の理由で起こりました:

libxslt is missing.  please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.

エラー出力にリストされているパス名から、Linux システムを使用していると思われます。適切な libxml と libxslt がインストールされていることを確認する必要があります。のこぎりのページはそれを整理するのに役立つはずです。

于 2012-05-19T16:23:52.613 に答える