我最近在我的 Amazon EC2 机器上安装了 SOLR,当我尝试使用 启动 SOLR 时RAILS_ENV=production bundle exec rake sunspot:solr:start --trace
,我收到以下消息:
** 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
但是,我已经包含sunspot_solr
在我的 Gemfile 中并且我的 RAILS_ENV 是生产的(我也尝试过export RAILS_ENV=production
。关于为什么 SOLR 无法启动并继续尝试在开发中运行的任何提示?我按照此链接安装它 - http: //tanin.nanakorn.com/b/96/tomcat_and_solr_on_ec2
这是我的 Gemfile 的一部分:
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
,看到 gem 正在被使用:
Using rsolr (1.0.8)
Using sunspot (1.3.0)
Using sunspot_rails (1.3.0)