我最近在我的亞馬遜EC2的機器上安裝SOLR,當我嘗試使用RAILS_ENV=production bundle exec rake sunspot:solr:start --trace
啓動SOLR,我得到以下信息:不能EC2計算機上啓動SOLR - 沒有檢測寶石
** Invoke sunspot:solr:run (first_time)
** Invoke sunspot:solr:moved_to_sunspot_solr (first_time)
** Execute sunspot:solr:moved_to_sunspot_solr
Note: This task has been moved to the sunspot_solr gem.
To install, start and stop a local Solr instance, please add sunspot_solr to your Gemfile:
group :development do
gem 'sunspot_solr'
end
不過,我已經已經包含在我的Gemfile sunspot_solr
和我RAILS_ENV是生產(我也嘗試export RAILS_ENV=production
任何提示,爲什麼SOLR將不會啓動,並一直嘗試發展運行我跟着這個鏈接進行安裝 - ?http://tanin.nanakorn.com/b/96/tomcat_and_solr_on_ec2
這是我的Gemf的一部分ILE:
group :development, :test do
gem 'factory_girl_rails'
gem "rspec-rails"
gem 'faker'
gem 'fuubar'
gem 'pry'
gem 'foreman'
gem 'guard-spork'
gem 'sunspot_solr'
end
我跑bundle install
已經看到正在使用的寶石:
Using rsolr (1.0.8)
Using sunspot (1.3.0)
Using sunspot_rails (1.3.0)
您是否生成了太陽黑子配置文件?使用命令'rails generate sunspot_rails:install'運行安裝程序。如果問題仍然存在,請嘗試卸載並重新安裝太陽黑子。也只是爲了確認你的GemFile中的其他地方包含gem'sunspot_rails',對嗎? – Noz
@CyleHunter我自己生成了xml配置文件。我試着運行'bundle exec rails generate sunspot_rails:install',但它引發了一些其他的mysql錯誤。 – Huy