bad URI(is not URI?) on Heroku #77

Closed
realadeel opened this Issue Mar 21, 2013 · 11 comments

Comments

Projects
None yet
6 participants

Can't help getting the following error while deploying to Heroku. Annyone had problems with this?

Running: rake assets:precompile
rake aborted!
bad URI(is not URI?):
/tmp/build_vv803j0m3xxr/vendor/bundle/ruby/1.9.1/gems/sentry-raven-0.4.5/lib/raven/configuration.rb:83:in server=' /tmp/build_vv803j0m3xxr/config/initializers/raven.rb:4:inblock in <top (required)>'
/tmp/build_vv803j0m3xxr/vendor/bundle/ruby/1.9.1/gems/sentry-raven-0.4.5/lib/raven.rb:64:in `configure'

Running Ruby 1.9 and Rails 3.2.13

Owner

dcramer commented Mar 21, 2013

Could you confirm that heroku config | grep SENTRY_DSN shows something that looks sane/correct?

Yes, I get:

SENTRY_DSN: https://:@app.getsentry.com/6180

Adeel

On Wednesday, March 20, 2013 at 11:38 PM, David Cramer wrote:

Could you confirm that heroku config | grep SENTRY_DSN shows something that looks sane/correct?


Reply to this email directly or view it on GitHub (#77 (comment)).

Owner

dcramer commented Mar 21, 2013

@Proletarian It looks like it must somehow be incorrectly passing the value in.

For now I can only recommend doing this until I have time to dig into it a little further:

https://github.com/getsentry/raven-ruby#rails-3

(Insert the DSN manually instead of using the automatic env detection)

That takes care of it for now, but yea the ENV variable should get parsed correctly.

Adeel

On Wednesday, March 20, 2013 at 11:44 PM, David Cramer wrote:

@Proletarian (https://github.com/proletarian) It looks like it must somehow be incorrectly passing the value in.
For now I can only recommend doing this until I have time to dig into it a little further:
https://github.com/getsentry/raven-ruby#rails-3
(Insert the DSN manually instead of using the automatic env detection)


Reply to this email directly or view it on GitHub (#77 (comment)).

Forgot to say thanks! @dcramer

realadeel closed this Mar 21, 2013

Member

nateberkopec commented Mar 21, 2013

Just tried the same thing with Ruby 1.9.3 + Rails 3.2.12, and it worked fine. The code here is pretty simple - not sure what could be going wrong for you @Proletarian.

I just ran into this. Looks like this is an issue if Rails is trying to load the environment when trying to compile the assets. Since the ENV variables aren't present during compilation time, Heroku barfs.

Heroku makes a note that if this is happening, you can try using this in your config/application.rb:

config.assets.initialize_on_precompile = false

+1 this is exactly what I ended up doing.

Member

nateberkopec commented Apr 11, 2013

There is also a Heroku Labs addon that provides the ENV variables during precompilation - I use it for asset syncing.

heroku labs:enable user-env-compile

+1 to @mirthlab's suggestion. This is what I did, 4 months later! 🍺

frbl commented Nov 20, 2013

I had the same problem, for some reason Heroku decided to remove the user-env-compile setting (which they say they may do though). Reenabeling heroku labs:enable user-env-compile did the trick for me, thanks @nateberkopec!

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