我正在尝试让 gem sunspot_rails 和 sunspot_solr 启动并运行。我从https://github.com/sunspot/sunspot/issues/160下载了所有最新的 gem 并实施了补丁建议,但我仍然收到如下所示的错误。
似乎有些文件被复制了,但它被挂在了某个地方。我在 Windows 7 系统上,64 位使用 rails 版本 3.2.6 和 gem 'sunspot_rails' 版本 1.3.3 和 gem 'sunspot_solr' 版本 1.3.3。我花了几个小时试图弄清楚这一点,任何帮助将不胜感激!
$ 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"