2012-01-27 75 views
4

在Windows上運行我跟着指令並安裝sunspot_rails寶石太陽黑子與軌道

當我做

bundle exec rake sunspot:solr:start 

它告訴我

This command is not supported on i386-mingw32. Use rake sunspot:solr:run to run Solr in the foreground. 

當我使用這個命令我得到

** Invoke sunspot:solr:run (first_time) 
** Invoke environment (first_time) 
** Execute environment 
** Execute sunspot:solr:run 
The syntax of the command is incorrect. 
rake aborted! 
You need a Java Runtime Environment to run the Solr server 
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sunspot_solr-1.3.0/lib/sunspot/solr/server.rb:202:in `ensure_java_installed' 
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sunspot_solr-1.3.0/lib/sunspot/solr/server.rb:27:in `initialize' 
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sunspot_solr-1.3.0/lib/sunspot/solr/tasks.rb:23:in `new' 
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sunspot_solr-1.3.0/lib/sunspot/solr/tasks.rb:23:in `block (3 levels) in <top (required)>' 
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call' 
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute' 
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each' 
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute' 
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain' 
C:/Ruby192/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize' 
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain' 
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke' 
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task' 
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level' 
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each' 
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level' 
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling' 
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level' 
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run' 
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling' 
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run' 
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>' 
C:/Ruby192/lib/ruby/gems/1.9.1/bin/rake:19:in `load' 
C:/Ruby192/lib/ruby/gems/1.9.1/bin/rake:19:in `<main>' 
Tasks: TOP => sunspot:solr:run 

我正在運行Windows 7 x64。 太陽黑子不會在Windows上運行?

回答

1

解決..

以爲是一個java的問題,但即使我安裝的Java將無法正常工作了。

我找到了答案(這顯然不應該與太陽黑子的最新推的一個問題。)

最新推固定問題 https://github.com/sunspot/sunspot/commit/721d3419492852533764d58f2c7f398687891a94

因爲捆綁顯然沒有接我的最新,我手動改變它,現在工作..

+0

不錯,感謝您的修復!一直在撓我的頭布特打一個,你救了我一段時間:) – Francois 2012-05-15 11:05:20

+0

你怎麼阻止呢?因爲當你啓動它,你點擊crtl c或crtl滾動鎖定,你可以在cmd中停止它,但服務不會停止 – 2012-07-05 08:08:51