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

rollbar-rails-runner doesn't work on Rails 5.1.1 #606

Closed
dclausen opened this issue Jun 26, 2017 · 6 comments
Closed

rollbar-rails-runner doesn't work on Rails 5.1.1 #606

dclausen opened this issue Jun 26, 2017 · 6 comments
Assignees

Comments

@dclausen
Copy link

Steps to reproduce

bundle exec rollbar-rails-runner "puts 'hello'"

Expected behavior

System should output 'hello'

Actual behavior

bundler: failed to load command: rollbar-rails-runner (/home/deployer/app/shared/bundle/ruby/2.4.0/bin/rollbar-rails-runner)
Errno::ENOENT: No such file or directory @ rb_sysopen - /home/deployer/app/shared/bundle/ruby/2.4.0/gems/railties-5.1.1/lib/rails/commands/runner.rb
/home/deployer/app/shared/bundle/ruby/2.4.0/gems/rollbar-2.14.1/lib/rails/rollbar_runner.rb:39:in read' /home/deployer/app/shared/bundle/ruby/2.4.0/gems/rollbar-2.14.1/lib/rails/rollbar_runner.rb:39:in eval_runner'
/home/deployer/app/shared/bundle/ruby/2.4.0/gems/rollbar-2.14.1/lib/rails/rollbar_runner.rb:30:in block in run' /home/deployer/app/shared/bundle/ruby/2.4.0/gems/rollbar-2.14.1/lib/rails/rollbar_runner.rb:47:in rollbar_managed'
/home/deployer/app/shared/bundle/ruby/2.4.0/gems/rollbar-2.14.1/lib/rails/rollbar_runner.rb:30:in run' /home/deployer/app/shared/bundle/ruby/2.4.0/gems/rollbar-2.14.1/bin/rollbar-rails-runner:5:in <top (required)>'
/home/deployer/app/shared/bundle/ruby/2.4.0/bin/rollbar-rails-runner:22:in load' /home/deployer/app/shared/bundle/ruby/2.4.0/bin/rollbar-rails-runner:22:in <top (required)>'

System configuration

Rails version: 5.1.1

Ruby version: 2.4.0

@rivkahstandig3636
Copy link
Contributor

Hi there, I’m closing out all issues opened before 2018 that haven’t had any activity on them since the start of this year. If this is still an issue for you, please comment here and we can reopen this. Thanks!

@m4scosta
Copy link

m4scosta commented Jun 18, 2018

@rivkahstandig3636 I'm having the same issue here using rails 5.1.1. With a brief investigation I've figured out that the implementation of commands changed in the new Rails version. Take a look at https://github.com/rails/rails/blob/master/railties/lib/rails/commands.rb and https://github.com/rails/rails/blob/master/railties/lib/rails/commands/runner/runner_command.rb, they are very different from https://github.com/rails/rails/blob/4-2-stable/railties/lib/rails/commands/runner.rb.

I've solved the problem just changing the method eval_runner to invoke the command using the new api:

def invoke_runner
  Rails::Command.invoke 'runner', ARGV
end

However, the above code is compatible with Rails 5 only, do you have any thoughts on how to keep backward compatibility?

@rivkahstandig3636
Copy link
Contributor

@ArturMoczulski Any thoughts?

@jessewgibbs jessewgibbs added question and removed bug labels Aug 9, 2018
@ArturMoczulski ArturMoczulski modified the milestones: v2.17.0, v2.19.0 Aug 27, 2018
@jessewgibbs jessewgibbs added bug and removed question labels Oct 4, 2018
@jessewgibbs jessewgibbs removed this from the v2.20.0 milestone Oct 10, 2018
@WenInCode
Copy link

I'm seeing this on an app running Rails 5.1.6. @Marcospy seems to have found the underlying issue.

@jessewgibbs
Copy link
Contributor

@ArturMoczulski could you investigate this issue?

waltjones added a commit that referenced this issue Jan 19, 2019
Issue #606: Enable rollbar-rails-runner for Rails 5
@waltjones
Copy link
Contributor

This is fixed by #803.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants