Starting and stopping Solr
Solr listens to different ports for different environments.
Start Solr (and hide useless output)
rake solr:start PORT=8981 &>/dev/null
rake solr:start PORT=8982 &>/dev/null
Stop Solr
rake solr:stop PORT=8981
rake solr:stop PORT=8982
Related cards:
Sunspot and Solr on Tomcat: Trouble with Umlauts
We experienced problems with Sunspot and Solr on Tomcat: Umlauts (ä, ö, ü) were not correctly handled on Tomcat while everything was okay on the local development machines (your local Sunspot service you start with the sunspot:solr:run
task is b...
Using Solr with Sunspot
This describes all the steps you'll need to get Solr up and running for your project using the Sunspot gem.
Prepare Sunspot on your development machine
...
How to start Terminator with split screens and custom commands running
Starting Terminator with split screens is quite simple: Just store a layout and start Terminator with the --layout <your layout>
option.
However, if you want to run custom commands in your terminals, you need to do some work to keep these termi...
Fix slow specs using SOLR
I've recently encountered a weird problem with specs making lots of SOLR queries using the acts_as_solr
plugin: After a certain number of specs, exactly one spec suddenly took over 30 seconds to finish.
It turns out that for some reason, the SO...
Sunspot for Solr fails with '400 Bad Request' in 'adapt_response'
If Sunspot does not work and fails with a backtrace similar to this:
/project/shared/bundle/ruby/1.8/gems/rsolr-1.0.6/lib/rsolr/client.rb:227:in `adapt_response'
/project/shared/bundle/ruby/1.8/gems/rsolr-1.0.6/lib/rsolr/client.rb:164:in ...
RubyMine: Find and Replace with Regex (Capture Groups and Backreferences)
tl;dr
In RubyMine you can use find and replace with capture groups
(.*?)
and backreferences$1
(if you have several groups:$[Capture-Group ID]
).
Named captures(?<text>.*)
are also supported.
Examples
Replace d...
Inspect and Debug CSS Flexbox and Grid Layouts by using the Layouts Tab in Dev Tools
tl;dr
In Chrome DevTools in the Layouts tab you have handy options to debug CSS Flexbox and Grid. Including:
- Display size and lines along with labels
- Changing their attributes
- Change how overlay is colored and fastl...
The TCF 2.0 (Tranparency and Consent Framework) standard, and what you should know about it
The Interactive Advertising Bureau (IAB) is a European marketing association which has introduced a standard how advertising can be served to users in line with the General Data Protection Regulation (GDPR). This standard ...
Changes to positional and keyword args in Ruby 3.0
Ruby 3.0 introduced a breaking change in how it treats keyword arguments.
There is an excellent blog post on the official Ruby blog going ...
Ruby and Rails deprecation warnings and how to fix them
Add deprecation warnings and their solution or link to available solutions.
Global access to Rake DSL methods is deprecated. Please include Rake::DSL into classes and modules which use the Rake DSL methods.
---------------------------------------...