What version of thinking-sphinx gem to use on Lion, Rails 2.3.9, sphinx 0.9.9 and Ruby 1.8.7? - osx-lion

The error I'm getting with the thinking-sphinx 2.1.0 gem is:
Sphinx cannot be found on your system. You may need to configure the following
settings in your config/sphinx.yml file:
* bin_path
* searchd_binary_name
* indexer_binary_name
sh: searchd: command not found
Failed to start searchd daemon. Check /var/log/searchd.log.
Failed to start searchd daemon. Check /var/log/searchd.log
Be sure to run thinking_sphinx:index before thinking_sphinx:start
Search log is empty
and when I try to manually run rake task from bash I get:
rake aborted!
Unable to activate thinking-sphinx-2.0.10, because activerecord-2.3.9 conflicts with activerecord (>= 3.0.3)
activerecord 3.0.3 downloaded with the thinking-sphinx gem 2.0.9 automatically.
I have tried almost every version of thinking sphinx and sphinx and just get various errors with every attempt.
Sphinx runs great from a bash command line, but no go from the rake tasks. I have tried the plugin, but that just throws a different set of errors. I am hoping someone knows of a combination of rails / riddle / thinking-sphinx and or sphinx versions on mac lion, if mac version even matters.
And my current conf is as follows:
development:
bin_path: /usr/local/Cellar/sphinx/0.9.9/bin
searchd_binary_name: searchd
indexer_binary_name: indexer
enable_star: true
enable_star: true
morphology: stem_en
html_strip: true
min_infix_len: 3
port: 9310
sql_range_step: 10000000
min_infix_len: 3
Thanks much in advance for any advice.

Answered this on the mailing list as well, but just for others who come across it - 1.4.10 is the right version of TS to use (the 2.x releases of Thinking Sphinx are for Rails 3.x).

Related

Fastlane "nokogiri requires Ruby version >= 2.3.0." Error

I finished this tutorial on Medium in order to integrate my Xcode project with SonarQube to have some metrics. Setup SonarQube - Swift. I was able to make it through the last step that is: running fastlane metrics on the terminal while being in the root of the project directory. But I get this error on step "slather".
nokogiri requires Ruby version >= 2.3.0., fastlane finished with errors:
I have also found that someone had a similar question here, but no answers:
Similar Question
If I run:
nicolas$ ruby --version
I get ruby version 2.6.3, which is higher than the required 2.3
ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
Does anyone knows how to fix this, or got any hunches? Thanks in advance, I appreciate any help.
After digging around and trying several solutions, I finally solved this. What happened was that I initially installed Fastlane with this command:
brew cask install Fastlane
And it seems that it was using another version of ruby while I had a newer one. So I uninstalled it with:
brew cask uninstall Fastlane
And then I re-installed it with this command:
sudo gem install -n /usr/local/bin fastlane -NV
Because I was having problems with permissions and then all worked good.
References and other solutions:
Github thread
usr/local/bin

Whenever gem in rails error :'to_specs': Could not find bundler (>= 0) amongst

I am using whenever gem in my application. And i have scheduled a rake task every 5 minutes. But that rake task is not running every 5 minutes. When i saw the log it gave me error like
`to_specs': Could not find bundler (>= 0) amongst [bigdecimal-1.1.0,
io-console-0.3, json-1.5.4, minitest-2.5.1, rake-0.9.2.2, rdoc-3.9.4]
(Gem::LoadError)
this is the content in schedule.rb
every 3.minutes do
rake "mytask name"
end
I had same issue solved by putting
env :PATH, '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin'
instead of
env :PATH, ENV['PATH']
on the top of config/schedule.rb
This issue occurs whenever we changes in your gem file, specially rails / ruby version.
I was facing this same issue, here is what I did to get rid of that-
1. $ gem install bundle
2. $ bundle install
Now everything working fine.
If you are getting same issue as-
`to_specs': Could not find 'railties' (>= 0) among 23 total gem(s) (Gem::LoadError)
then here are the steps-
See the link as-
Rails: Could not find railties
1. $ gem list
2. $ gem install rails
It will just download all missing dependencies, including railties.
Hope this will work for you too !!!

cannot build apache thrift due to ruby rake errors

I am trying to build thrift from source tarball (https://dist.apache.org/repos/dist/release/thrift/0.9.0/thrift-0.9.0.tar.gz), but it fails with this error:
Making all in rb
make[3]: Entering directory `/home/akonsu/a/thrift-0.9.0/lib/rb'
/usr/local/bin/rake
rake aborted!
cannot load such file -- rspec/core/rake_task
I would appreciate any help.
this helped:
gem install rspec
What also helps, if you are not interested in Ruby in the first place, is configure Thrift to do without.
$ ./configure --without-ruby
So that is --without-ruby, and NOT --without-rb as some other sources suggest.
and then run make and sudo make install.
It is a known bug apparently.
I found this here: https://issues.apache.org/jira/browse/THRIFT-1367
(I am on on Mac OS X 10.7.5, BTW. I don't know about any other versions/platforms...)

Installing mod_perl-2.0.7 on Apache httpd-2.4.2

I am having an infuriating time trying to get an install of apache with perl. I am following the instructions on the mod_perl site located here: http://perl.apache.org/docs/2.0/user/install/install.html
I get as far as the part where it asks me to run this command, but I get an error:
$ perl Makefile.PL MP_APXS=/usr/local/httpd/prefork/bin/apxs
Reading Makefile.PL args from #ARGV
MP_APXS = /usr/local/httpd/prefork/bin/apxs
no conflicting prior mod_perl version found - good.
Configuring Apache/2.4.2 mod_perl/2.0.7 Perl/v5.12.3
[ error] Can't find apr include/ directory,
[ error] use MP_APR_CONFIG=/path/to/apr-config
I ran the commands they suggested for installing apache to install my apache:
$ ./configure --prefix=$HOME/httpd/prefork --with-mpm=prefork
$ make && make install
But I am not sure where this apr-config thing is supposed to be as it doesn't appear to be anywhere in my apache2 folder.
If it might be an issue, I am using Mac OS X 10.7.3. I know an apache server comes with Mac OS X, but I need to do this install on a different computer from the ground up, so I have to start this whole install from the ground up on my computer.
Thanks ahead of time for any help you can provide.
When mod_perl 2.0.8 comes out, I hope that it gets finally httpd 2.4 support, because the current versions surely don't have.
When you fix your initial problems, you will eventually get stuck at ‘conn_rec’ has no member named ‘remote_ip’. Delete httpd 2.4 and use 2.2 meanwhile.
You need to include the path to binary executable file apr-1-config. Run the below command
perl Makefile.PL MP_APXS=/usr/local/apache2/bin/apxs MP_APR_CONFIG=/usr/local/apr/bin/apr-1-config
It worked for me..Hope the same for you too.
On Lion here, my APR include directory seems to be /usr/include/apr-1, but it already came with mod_perl.
$ find / -name apr*
/usr/include/apr-1
...
$ find / -name mod_perl.so
/usr/libexec/apache2/mod_perl.so
If you have the .so already you should be able to just add in your config file:
LoadModule perl_module libexec/apache2/mod_perl.so

Getting Sinatra to work with JRuby and Warbler

I'm using the following config/warble.rb in my hello-world-style application:
Warbler::Config.new do |config|
config.dirs = %w(app config tmp gems views)
config.includes = FileList["hello.rb"]
config.gems = ["sinatra"]
config.gem_dependencies = true
end
Now when I run jruby -S warble this is the error message:
warble aborted!
uninitialized constant Warbler::Jar::Pathname
org/jruby/RubyModule.java:2526:in `const_missing'
Can anyone help me out with it? The application runs without problems when executed directly so it looks like I have all the required gems installed.
Environment:
JRuby 1.6.1 (same with 1.5.6)
Sinatra 1.2.6
Warbler 1.3.0
Windows XP
Ubuntu 10.04.1
I've found a workaround for this that works with both ruby and jruby.
Instead of specifying the gems inside config/warble.rb I've installed the Bundler gem and created Gemfile in the root folder of my application with the following content:
source :rubygems
gem "sinatra"
With that removed from the config/warble.rb file the actual content of this file looks like this:
Warbler::Config.new do |config|
config.includes = FileList["hello.rb"]
end
To summarize:
gems go into the Gemfile
application files go into the config/warble.rb file
As it turns out there's an obvious bug in warbler preventing this functionality to work under jruby 1.6.1 and ruby 1.8.7 (don't know about other versions because I didn't test it).
Take a look here for a quick fix:
https://github.com/padcom/warbler/commit/b4b24e17dee5bb98525203c82519a8901874ef81