Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not supported on ruby 2.3? #50

Closed
JanStevens opened this issue Jan 6, 2016 · 8 comments
Closed

Not supported on ruby 2.3? #50

JanStevens opened this issue Jan 6, 2016 · 8 comments

Comments

@JanStevens
Copy link

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
@jenseng
Copy link
Owner

jenseng commented Jan 6, 2016

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.

@diskshima
Copy link

Looks like they (ruby_parser) have added support for Ruby 2.3.

seattlerb/ruby_parser@da22d1e

Any chance this may get incorporated?

@jenseng
Copy link
Owner

jenseng commented Jan 27, 2016

👍 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

@diskshima
Copy link

Ah that's true. Thanks for the quick turnaround and your advice about Gemfile!

@coderberry
Copy link

This still appears to be an issue with JRuby 9.1.2.0 (2.3.0)

@jenseng
Copy link
Owner

jenseng commented Jul 14, 2016

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?

jenseng added a commit that referenced this issue Jul 18, 2016
@jvrsgsty
Copy link

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?

@memoht
Copy link

memoht commented Dec 1, 2016

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.

@jenseng jenseng closed this as completed in f22fc20 Feb 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants