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

Rails sentry configuration #115

Closed
madisvain opened this issue Jun 27, 2013 · 7 comments
Closed

Rails sentry configuration #115

madisvain opened this issue Jun 27, 2013 · 7 comments

Comments

@madisvain
Copy link

After doing everything that the getsentry website tells me

  1. gem install sentry-raven
  2. Add a config/initializers/raven.rb

I still get

rake raven:test
Your client is not configured!

If I run with the DSN provided then everything works

rake raven:test[DSN]

I'm using Rails 3.2.13

Is the documentation correct?

@dcramer
Copy link
Member

dcramer commented Jun 27, 2013

@madisvain it's possible we have in issue in the rake command that its not actually configuring against the rails environment.

@madisvain
Copy link
Author

@dcramer it seems to be magically working in production environment which is a good thing. My ruby skills are horrible compared to python so sorry if there is something I'm just missing here.

@dcramer
Copy link
Member

dcramer commented Jun 27, 2013

As are mine :)

Will defer this ticket to someone else who can help us investigate it better

@nateberkopec
Copy link
Contributor

I think this is because rake raven:test does not load the current rails environment, which means your initializers won't be run and your DSN remains unset.

@madisvain, can you confirm that, as a workaround, if you set your SENTRY_DSN environment variable to your DSN, will the rake test work?

@deefour
Copy link

deefour commented Jul 16, 2013

@nateberkopec yes, when set directly on the SENTRY_DSN environment variable, the DSN is picked up.

@teodor-pripoae
Copy link
Contributor

Running :envionment task before :test task solved it for me. I must add a check for Rails in order to work on non-rails environments and I guess it's fixed.

@nateberkopec
Copy link
Contributor

Nice fix. I think #121 closes this.

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

5 participants