我正在尝试使用rails 3.1运行solr和sunspot,但我一直收到错误
getaddrinfo: Name or service not known
我的控制器非常基本
def index @food_names = FoodName.search do keywords(params[:term]) end end
我仍然不太确定这里发生了什么。我是否必须开始单独的solr服务?
当我运行rake sunspot:solr:run,我得到了一个
WARNING: 'require 'rake/rdoctask'' is deprecated. Please use 'require 'rdoc/task' (in RDoc 2.4.2+)' instead. at /home/pete/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/rdoctask.rb WARNING: Global access to Rake DSL methods is deprecated. Please include ... Rake::DSL into classes and modules which use the Rake DSL methods. WARNING: DSL method Kitchon::Application#task called at /home/pete/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.0.0/lib/rails/application.rb:214:in `initialize_tasks' WARNING: 'task :t, arg, :needs => [deps]' is deprecated. Please use 'task :t, [args] => [deps]' instead. at /home/pete/.rvm/gems/ruby-1.9.2-p290/gems/sunspot_rails-1.2.0/lib/sunspot/rails/tasks.rb:41:in `block in ' rake aborted! Server is already running with PID 4012 Tasks: TOP => sunspot:solr:start (See full trace by running task with --trace)
这有点令人不安,但正如输出所说,服务器已经在运行,所以我认为它正在运行。
关于我可能做错了什么,或者如何解决这个问题的任何建议?