Comments (16)
On that note, the README does not tell you that you must add any lines to the Rakefile. Without these instructions, the step rake 'sunspot:solr:start
will not run.
from sunspot.
Tasks should be loaded automatically. What happens if you remove those require
lines from your Rakefile
?
from sunspot.
If I remove the require lines, no sunspot tasks are listed when I do a rake -T
.
from sunspot.
What if you keep the require
lines but use rake sunspot:reindex
instead of sunspot:solr:reindex
?
from sunspot.
If I have no require lines:
- No sunspot rake tasks show.
With just require 'sunspot/solr/tasks'
:
- No reindexing tasks are available
With just require 'sunspot/rails/tasks'
:
rake sunspot:solr:start
returns "Note: This task has been moved to the sunspot_solr gem"
With both require 'sunspot/solr/tasks'
and require 'sunspot/rails/tasks'
:
- Same.
rake sunspot:solr:start
returns "Note: This task has been moved to the sunspot_solr gem"
from sunspot.
Of note, I can get it working by modifying sunspot_rails-1.3.0/lib/sunspot/rails/tasks.rb:59
.
The line says unless defined?(Sunspot::Solr)
, then proceeds to define stubs for the Sunspot:Solr rake tasks. When I change it to unless false
, then the code works fine.
It seems than sunspot_rails is not accurately detecting the presence of the sunspot_solr gem.
from sunspot.
Apparently, this problem started with sunspot_rails 1.3.0. It works fine under sunspot_rails 1.2.1.
from sunspot.
+1 I have the samme problem rails 2.3.12, sunspot 1.3.0. Version 1.2.1 works.
from sunspot.
It seems than sunspot_rails is not accurately detecting the presence of the sunspot_solr gem.
Load order issues here perhaps? Hm.
@KurtPreston @ninajansen βΒ can you show us [the relevant parts of] your app's Gemfile?
from sunspot.
I've been meaning to setup a Rails 2.3.14 application and try out the rake tasks. Might be able to get to it soon.
from sunspot.
There's nothing particularly fancy about our Gemfile. For the time, we've downgraded to sunspot_rails 1.2.0. But anyway, when we tried 1.3.0, our Gemfile looked like:
source :rubygems
gem 'rails', '2.3.14'
...
gem 'sunspot_rails', '1.3.0'
group :development do
...
gem "sunspot_solr", "1.3.0"
end
from sunspot.
Any update on this issue?
from sunspot.
I can reproduce it, but do not yet know how to fix it. Patches welcomed.
from sunspot.
Same issue on a Rails 2.3.14 app using Bundler 1.1.rc.7. Tried rearranging the gems (solr first) but makes no difference.
Search
gem 'sunspot', '> 1.3.0'> 1.3.0'
gem 'sunspot_rails', '
gem 'sunspot_solr', '~> 1.3.0'
As above, commenting out require 'sunspot/rails/tasks' got the start & stop commands working, but lost the reindex command.
from sunspot.
I merged in a fix to both 1-3-stable
and master
that claims to have fixed this. Can someone here try it out? Thanks.
from sunspot.
I resolved this by modifying the Rakefile.
My env is : sunspot_rails 1.3.1 sunspot_solr 1.3.1 Rails 2.3.11.
Add
module Sunspot
module Solr
end
end
above require 'sunspot/solr/tasks' require 'sunspot/rails/tasks'
in the Rakefile
from sunspot.
Related Issues (20)
- Documentation website not working HOT 2
- index not working with Ruby 3 HOT 4
- sunspot:solr:reindex not work after updating rails 6 HOT 1
- Fulltext and Scalar field search is not working with any_of
- sunspot_rails gem bump? HOT 6
- Can't make it work with Solr 8 with docker HOT 1
- Index-time Boosts not supported by Lucene 7 and Solr 8 anymore
- Sunspot RSolr Reindex Error ConnectionRefused After reindexing 99.57% of the model how to continue from where it failed
- Score boost does not work with join fields
- Retry5xxSessionProxy#rescued_exception unused
- DEPRECATION: Rsolr.new/connect option 'read_timeout' is deprecated and will be removed in Rsolr 3.
- Not able to reindexing restored couchdb HOT 1
- Search by exact match on text field is not working as expected HOT 1
- Can Opendistro Elasticsearch be used in place of Solr? HOT 1
- Psych::BadAlias in Ruby 3.1 configuration
- NoMethodError on Ruby 3.2 for `File.exists?` HOT 8
- sort param could not be parsed as a query, and is not a field that exists in the index: geodist(location_ll,32.8563846,-117.2029363)
- How to stub results?
- Is this available with Solr 9? HOT 2
- Rails 7.1 deprecation warning HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sunspot.