Actions
Defect #26526
closedRails 5: production env: Search engine returns 500 error
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Search engine
Target version:
-
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Affected version:
Description
Started GET "/search?utf8=%E2%9C%93&q=aaa&scope=all&all_words=&all_words=1&titles_only=&issues=1&news=1&documents=1&changesets=1&wiki_pages=1&messages=1&projects=1&attachments=0&options=0&commit=Submit" for 127.0.0.1 at 2017-07-25 19:58:29 +0900 Processing by SearchController#index as HTML . (snip) . Completed 500 Internal Server Error in 54ms (ActiveRecord: 28.5ms) NameError (uninitialized constant Redmine::Database): lib/plugins/acts_as_searchable/lib/acts_as_searchable.rb:162:in `search_token_match_statement' lib/plugins/acts_as_searchable/lib/acts_as_searchable.rb:155:in `block in search_tokens_condition' lib/plugins/acts_as_searchable/lib/acts_as_searchable.rb:155:in `map' lib/plugins/acts_as_searchable/lib/acts_as_searchable.rb:155:in `search_tokens_condition' lib/plugins/acts_as_searchable/lib/acts_as_searchable.rb:93:in `search_result_ranks_and_ids' lib/redmine/search.rb:127:in `block in load_result_ids' . (snip)
Updated by Go MAEDA almost 7 years ago
Workaround:
Index: lib/plugins/acts_as_searchable/lib/acts_as_searchable.rb
===================================================================
--- lib/plugins/acts_as_searchable/lib/acts_as_searchable.rb (revision 16877)
+++ lib/plugins/acts_as_searchable/lib/acts_as_searchable.rb (working copy)
@@ -15,6 +15,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+require 'redmine/database'
+
module Redmine
module Acts
module Searchable
Updated by Toshi MARUYAMA almost 7 years ago
- Status changed from New to Closed
- Target version deleted (
4.0.0) - Resolution set to Fixed
Committed in trunk r16879, thanks.
Actions