简体   繁体   English

Rails 3.2 sunspot_rails和sunspot_solr无法在Windows上启动

[英]Rails 3.2 sunspot_rails and sunspot_solr wont get started on Windows

Edit: Downloaded the zip and installed it manually, now everything works fine. 编辑:下载了zip并手动安装了它,现在一切正常。


Unfortunately it seems to be impossible to set up Sunspot and Solr on Windows. 不幸的是,在Windows上设置Sunspot和Solr似乎是不可能的。 Running rake sunspot:solr:run works fine, however, when trying to reindex or if on server development mode and perform the search method, you get the exception "No connection could be made because the target machine actively refused it. - connect(2)". 运行rake sunspot:solr:run可以正常工作,但是,当尝试重新索引或在服务器开发模式下并执行搜索方法时,会收到异常消息“无法建立连接,因为目标计算机主动拒绝了它。-connect(2 )”。 I installed sunspot_rails and sunspot_solr today, so it should be the latest versions. 我今天安装了sunspot_rails和sunspot_solr,因此它应该是最新版本。 Updated java as well today to 1.7.0_05. 今天也将Java更新为1.7.0_05。 Now, here some people get it working by changing line 104 in server.rb from exec(Shellwords.shelljoin(command)) to system(Shellwords.shelljoin(command)), but this doesn't work for me either. 现在, 这里有人通过将server.rb中的第104行从exec(Shellwords.shelljoin(command))更改为system(Shellwords.shelljoin(command))使其工作,但这对我也不起作用。 I don't really see any possible solution left to try. 我真的看不到有任何可能的解决方案可以尝试。 Does anybody have an idea how to get it work on windows 7? 有人知道如何在Windows 7上运行它吗? Thank you in advance! 先感谢您!

This is possibly from the port. 这可能来自港口。 Can you check sunspot.yml configuration and the real port Sunspot is running on? 您可以检查sunspot.yml配置以及Sunspot的实际端口正在运行吗? You should see it when you run Sunspot. 运行Sunspot时应该会看到它。

I had similar issue and used to start/stop it, change the port from 8981 to 8982 and it worked. 我遇到了类似的问题,并用来启动/停止它,将端口从8981更改为8982,它可以正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM