Not supported on ruby 2.3?
JanStevens opened this issue · comments
Getting these warnings, and no triggers are defined.
Error reading triggers in db/migrate/20151029080635_create_search_index_for_personal_infos.rb: unrecognized RUBY_VERSION 2.3.0
Error reading triggers in db/migrate/20151029080635_create_search_index_for_personal_infos.rb: unrecognized RUBY_VERSION 2.3.0
Included HairTrigger::SchemaDumper in ActiveRecord::SchemaDumper
Error reading triggers in db/migrate/20151029080635_create_search_index_for_personal_infos.rb: unrecognized RUBY_VERSION 2.3.0
This is essentially the same problem as in #40 ... we rely on ruby_parser, so until it supports 2.3, we can't. As a workaround you might try something like this: #40 (comment)
If 2.3 support doesn't come to ruby_parser anytime soon, I'll look at swapping it out for parser, as it seems to stay a bit more on top of things.
Looks like they (ruby_parser) have added support for Ruby 2.3.
Any chance this may get incorporated?
👍 I'll bump the dependency and cut a new release. That said, you should be able to get it to work on the current version of hairtrigger if you explicitly add the latest ruby_parser to your Gemfile
Ah that's true. Thanks for the quick turnaround and your advice about Gemfile!
This still appears to be an issue with JRuby 9.1.2.0 (2.3.0)
Whoopsie, I forgot to bump the dependency and ship a new version 😮 ... in the meantime, @cavneb have you tried the workaround suggested above? Perhaps you just need to be explicit about using the latest ruby_parser?
Having some issues getting this gem up and running in Rails 5.0.0.1 and Ruby 2.3.1 with a Postgres DB. I was able to install the gem, but the rake task to generate the migrations fails with a couple of Deprecation Warnings and an error. Has anyone tried this out on Rails 5?
I see the latest commit hasn't been merged into master and the gem has not been updated on rubygems.org since December. Perhaps you haven't shipped the newest version @jenseng?
I can confirm running into issues trying to use this gem on Rais 5.0.0.1
and Ruby 2.3.3
with Postgres 9.5 database. I ended up with something like this:
DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead.
Called from my Rails app config/application.rb:19
undefined method `create_trigger' for Client (call 'Client.connection' to establish a connection):Class Did you mean? create_with
@jvrsgsty In order to make progress I ended up following this article and seem to have luck. https://robots.thoughtbot.com/optimizing-full-text-search-with-postgres-tsvector-columns-and-triggers
+1 for updating this gem.