1

私は宝石sunspot_railsとsunspot_solrを稼働させようとしています。最新の gem をすべてダウンロードし、https://github.com/sunspot/sunspot/issues/160からパッチの提案を実装しましたが、以下に示すエラーが引き続き表示されます。

一部のファイルはコピーされているようですが、どこかでハングアップしています。Railsバージョン3.2.6およびgem 'sunspot_rails'バージョン1.3.3およびgem 'sunspot_solr'バージョン1.3.3を使用する64ビットのWindows 7システムを使用しています。私はこれを理解しようと何時間も費やしました。

$ rake sunspot:solr:run

java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)

Java HotSpot(TM) Client VM (build 19.1-b02, mixed mode)

Copying c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sunspot_solr-1.3.3/solr/solr/conf/admin-extra.html => C:/Users/Molly Struve/My Documents/Aptana Studio 3 Workspace/WaterCooler/solr/conf/admin-extra.html

Copying c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sunspot_solr-1.3.3/solr/solr/conf/elevate.xml => C:/Users/Molly Struve/My Documents/Aptana Studio 3 Workspace/WaterCooler/solr/conf/elevate.xml

Copying c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sunspot_solr-1.3.3/solr/solr/conf/mapping-ISOLatin1Accent.txt => C:/Users/Molly Struve/My Documents/AptanaStudio 3 Workspace/WaterCooler/solr/conf/mapping-ISOLatin1Accent.txt

Copying c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sunspot_solr-1.3.3/solr/solr/conf/protwords.txt => C:/Users/Molly Struve/My Documents/Aptana Studio 3 Workspace/WaterCooler/solr/conf/protwords.txt

Copying c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sunspot_solr-1.3.3/solr/solr/conf/schema.xml => C:/Users/Molly Struve/My Documents/Aptana Studio 3 Workspace/WaterCooler/solr/conf/schema.xml

Copying c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sunspot_solr-1.3.3/solr/solr/conf/scripts.conf => C:/Users/Molly Struve/My Documents/Aptana Studio 3 Workspace/WaterCooler/solr/conf/scripts.conf

Copying c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sunspot_solr-1.3.3/solr/solr/conf/solrconfig.xml => C:/Users/Molly Struve/My Documents/Aptana Studio 3 Workspace/WaterCooler/solr/conf/solrconfig.xml

Copying c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sunspot_solr-1.3.3/solr/solr/conf/spellings.txt => C:/Users/Molly Struve/My Documents/Aptana Studio 3 Workspace/WaterCooler/solr/conf/spellings.txt

Copying c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sunspot_solr-1.3.3/solr/solr/conf/stopwords.txt => C:/Users/Molly Struve/My Documents/Aptana Studio 3 Workspace/WaterCooler/solr/conf/stopwords.txt

Copying c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sunspot_solr-1.3.3/solr/solr/conf/synonyms.txt => C:/Users/Molly Struve/My Documents/Aptana Studio 3 Workspace/WaterCooler/solr/conf/synonyms.txt

Exception in thread "main" java.lang.NoClassDefFoundError: Struve/My\
Caused by: java.lang.ClassNotFoundException: Struve.My\
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: Struve/My\.  Program will exit.`java version "1.6.0_24"
4

1 に答える 1

0

この問題は、ソース パスにスペースがある場合に発生します。コードを「C:/WaterCooler」などのパスに移動して試してください。

于 2012-08-10T06:48:31.800 に答える