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

2.4.0-preview1 compatability #496

Closed
schneems opened this issue Jul 7, 2016 · 3 comments
Closed

2.4.0-preview1 compatability #496

schneems opened this issue Jul 7, 2016 · 3 comments

Comments

@schneems
Copy link

schneems commented Jul 7, 2016

Was trying to use this gem on Heroku with Ruby 2.4.0-preview1 and it's failing on my app.

I tried to run the specs on 2.4.0-preview1 locally but needed to modify the Gemfile to:

gem 'oj', '~> 2.16' unless is_jruby

And patch Rails 4.2 to support 2.4.0 rails/rails#25737

Once I did that I get this error:

     NoMethodError:
       private method `logger' called for #<Rollbar::Notifier:0x007fead78b4f60>
     # /Users/richardschneeman/.rubies/ruby-2.4.0-preview1/lib/ruby/2.4.0/forwardable.rb:216:in `logger'
     # ./spec/rollbar_spec.rb:1084:in `block (3 levels) in <top (required)>'
     # /Users/richardschneeman/.gem/ruby/2.4.0/bin/rspec:22:in `load'
     # /Users/richardschneeman/.gem/ruby/2.4.0/bin/rspec:22:in `<top (required)>'
     # /Users/richardschneeman/.gem/ruby/2.4.0/gems/bundler-1.12.5/lib/bundler/cli/exec.rb:63:in `load'
     # /Users/richardschneeman/.gem/ruby/2.4.0/gems/bundler-1.12.5/lib/bundler/cli/exec.rb:63:in `kernel_load'
     # /Users/richardschneeman/.gem/ruby/2.4.0/gems/bundler-1.12.5/lib/bundler/cli/exec.rb:24:in `run'
     # /Users/richardschneeman/.gem/ruby/2.4.0/gems/bundler-1.12.5/lib/bundler/cli.rb:304:in `exec'
     # /Users/richardschneeman/.gem/ruby/2.4.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
     # /Users/richardschneeman/.gem/ruby/2.4.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
     # /Users/richardschneeman/.gem/ruby/2.4.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
     # /Users/richardschneeman/.gem/ruby/2.4.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
     # /Users/richardschneeman/.gem/ruby/2.4.0/gems/bundler-1.12.5/lib/bundler/cli.rb:11:in `start'
     # /Users/richardschneeman/.gem/ruby/2.4.0/gems/bundler-1.12.5/exe/bundle:27:in `block in <top (required)>'
     # /Users/richardschneeman/.gem/ruby/2.4.0/gems/bundler-1.12.5/lib/bundler/friendly_errors.rb:98:in `with_friendly_errors'
     # /Users/richardschneeman/.gem/ruby/2.4.0/gems/bundler-1.12.5/exe/bundle:19:in `<top (required)>'
     # /Users/richardschneeman/.gem/ruby/2.4.0/bin/bundle:22:in `load'
     # /Users/richardschneeman/.gem/ruby/2.4.0/bin/bundle:22:in `<main>'

In my app I get a similar error https://travis-ci.org/codetriage/codetriage/jobs/142932221

NoMethodError: private method `log_warning' called for #<Rollbar::Notifier:0x00000006a63d48>

It looks like the define_method for log_warn and friends is getting called inside of a private block so it's creating it as a private method where it didn't do that in Ruby 2.3+. I checked the changelog and can't easily find something that mentions a behavior change. (maybe ruby/ruby@6cde2d3 but i'm not sure). I think we can put the define_method-s in a public section for now to fix the issue.

@jondeandres
Copy link
Contributor

Hey @schneems, thanks a lot for opening this issue and the awesome detailed summary. Can you try with this branch? https://github.com/rollbar/rollbar-gem/tree/move-log_methods-to-public.

We'll try to fix this on next week, thanks for this.

@schneems
Copy link
Author

schneems commented Jul 7, 2016

I think that did the trick, the rollbar errors are gone. There is one persistant issue from Rails but it's being worked on rails/rails#25448

@jondeandres
Copy link
Contributor

This is closed by #498

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

2 participants