0

虽然我执行下面的命令,束Solr的相关宝石后导轨 - 太阳黑子的Solr没有启动开发

bundle exec rake sunspot:solr:start

我得到了允许误差:

Creating directory /apps/test_app/current/solr 
rake aborted! 
Errno::EACCES: Permission denied @ dir_s_mkdir - /apps 
/home/rp/.rvm/gems/[email protected]_app/gems/sunspot_solr-2.2.6/lib/sunspot/solr/installer.rb:48:in `block in execute' 
/home/rp/.rvm/gems/[email protected]_app/gems/sunspot_solr-2.2.6/lib/sunspot/solr/installer.rb:37:in `each' 
/home/rp/.rvm/gems/[email protected]_app/gems/sunspot_solr-2.2.6/lib/sunspot/solr/installer.rb:37:in `execute' 
/home/rp/.rvm/gems/[email protected]_app/gems/sunspot_solr-2.2.6/lib/sunspot/solr/installer.rb:17:in `execute' 
/home/rp/.rvm/gems/[email protected]_app/gems/sunspot_solr-2.2.6/lib/sunspot/solr/server.rb:174:in `install_solr_home' 
/home/rp/.rvm/gems/[email protected]_app/gems/sunspot_solr-2.2.6/lib/sunspot/solr/server.rb:40:in `bootstrap' 
/home/rp/.rvm/gems/[email protected]_app/gems/sunspot_solr-2.2.6/lib/sunspot/solr/server.rb:55:in `start' 
/home/rp/.rvm/gems/[email protected]_app/gems/sunspot_solr-2.2.6/lib/sunspot/solr/tasks.rb:10:in `block (3 levels) in <top (required)>' 
/home/rp/.rvm/gems/[email protected]_app/gems/rake-11.3.0/exe/rake:27:in `<top (required)>' 
/home/rp/.rvm/gems/[email protected]_app/bin/ruby_executable_hooks:15:in `eval' 
/home/rp/.rvm/gems/[email protected]_app/bin/ruby_executable_hooks:15:in `<main>' 
Tasks: TOP => sunspot:solr:start 
(See full trace by running task with --trace) 

这将是巨大的帮助,如果任何人对此有想法。提前致谢!

+0

不知道,一定是有权限问题! :p – fidato

+0

请检查此目录的权限'apps/test_app/current/solr' –

+0

我的主目录中没有任何名为'apps'的目录 – fidato

回答

2

太阳黑子配置应该是这个config/sunspot.yml

development: 
    solr: 
    hostname: localhost 
    port: 8982 
    log_level: INFO 

test: 
    solr: 
    hostname: localhost 
    port: 8981 
    log_level: WARNING 

编号:github repo