Sun spot with jruby

Hi, sunspot can be used with jruby, also here is my application data

jruby-1.6.1
rails 3.0.7 

when i install all the gems and run rake sunspot:solr:start it gives me the following error 

Gem::LoadError: Could not find RubyGem sunspot (>= 0)

  report_activate_error at /Users/dpatel/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems.rb:861
               activate at /Users/dpatel/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems.rb:255
                    gem at /Users/dpatel/.rvm/rubies/jruby-1.6.1/lib/ruby/site_ruby/1.8/rubygems.rb:1215
                 (root) at /Users/dpatel/.rvm/gems/jruby-1.6.1@solr/bin/sunspot-solr:18

However, when I run rake sunspot: solr: run, it works fine.

Also, when I do a search using Model.search, it works fine, but when I run solr webapp in the browser and search for something, it doesn't work.

Can someone tell me what is happening is new to the sunspot.

-Thanks

+3
source share
3 answers

Hi, I somehow understood, I'm on jruby, and the plug is not allowed on jruby, and rake sunspot: solr: start tries to develop and throw an error, but rake sunspot: solr: run launches solr in the foreground and works fine, a little painful, but everything is in order :-)

-D

+2

forking, , , , , , :

:

alias sunspot_run_test="RAILS_ENV=test sunspot-solr run &"
alias sunspot_kill_test="fuser -n tcp 8982 -k"
alias sunspot_run_dev="RAILS_ENV=test sunspot-solr run &"
alias sunspot_kill_dev="fuser -n tcp 8982 -k

, sunspot.yml sunspot.rb config > , -p {$ port_num} {$ port_num} kill.

, , . , , , , , dev ( sunspot_run_dev), CRUD - .

bash , bash: sunspot_rails, jruby, rspec, , .

+1

:

gem install sunspot -v 1.2.rc4

" ": , ?

  • :

, Solr, , script/ , . 'logs/sunspot-solr-development.log'

  • error (which?)
0
source

All Articles