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 working on heroku #10

Open
aesnyder opened this issue Aug 12, 2014 · 18 comments
Open

Not working on heroku #10

aesnyder opened this issue Aug 12, 2014 · 18 comments

Comments

@aesnyder
Copy link

I'm noticing that this works fine locally but on heroku I'm getting a failed to instantiate module due to unknown provider: e -- any ideas?

@kikonen-fiksu
Copy link

Q: was there any other info?

Dont know what's ailing, so likely need to debug with heroku.

Perhaps some needed gem is not installed in production? Check Gemfile. Also try running assets compile task locally using "RAILS_ENV=production bundle exec rake ..."

@olov
Copy link

olov commented Aug 13, 2014

@aesnyder did you verify that you use the exact version of ngannotate-rails (and ng-annotate) on your local machine as well as heroku?

@aesnyder
Copy link
Author

I'm closing this because I'm an idiot, everything is working now. Sorry!

@ream88
Copy link

ream88 commented Nov 21, 2014

Encountered the same problem, @aesnyder how did you resolve it?

@natecox
Copy link

natecox commented Dec 29, 2014

@aesnyder @Haihappen I'm getting this issue on heroku myself. If this is resolved, can you please explain what the issue was and how to fix it?

@kikonen
Copy link
Owner

kikonen commented Jan 1, 2015

@aesnyder if you've some info regarding issue, I would love to have it mentioned in project README, since clearly there is something which is tripping over several people.

Alternatively: Anyone, do you've some failing sample test app what I could look into to investigate issue?

@natecox
Copy link

natecox commented Jan 1, 2015

@kikonen My team actually gave up attempting to get this module to work and instead switched to turning the :mangle option off in rails instead as a temporary solution.

When following the steps to test locally I was able to confirm that the rendered javascript was not being annotated at all by ngannotate-rails, but wasn't able to locate the source of the issue. Unfortunately the project in question is client related so I can't hand over the source, but I can fire up a new rails project later today for testing and make that available.

@kikonen
Copy link
Owner

kikonen commented Jan 2, 2015

If there is some case which is not handled you should be in contact with
maintainer of ngannotate itself. He might be interested to hear about the
trouble.

KI
1.1.2015 19.20 kirjoitti "Nathan Cox" [email protected]:

@kikonen https://github.com/kikonen My team actually gave up attempting
to get this module to work and instead switched to turning the :mangle
option off in rails instead as a temporary solution.

When following the steps to test locally I was able to confirm that the
rendered javascript was not being annotated at all by ngannotate-rails,
but wasn't able to locate the source of the issue. Unfortunately the
project in question is client related so I can't hand over the source, but
I can fire up a new rails project later today for testing and make that
available.


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

@kikonen-fiksu
Copy link

This may be related
ttps://github.com/jasonm/ngmin-rails/issues/6

@aesnyder
Copy link
Author

So I'm completely kicking myself for not having answered this, as I just spent another few hours on it today....

-Rails.application.config.assets.version = '1.0'
+Rails.application.config.assets.version = '1.1

When pushing to heroku its important to invalidate all of your assets.

@kikonen
Copy link
Owner

kikonen commented May 12, 2015

TODO:

  • need to add remark about this into README

(just re-opening so that I will remember to add note into README)

@kikonen kikonen reopened this May 12, 2015
@kikonen
Copy link
Owner

kikonen commented Jun 3, 2015

Addressed README via #23

@kikonen kikonen closed this as completed Jun 3, 2015
@fabn
Copy link

fabn commented Jun 21, 2015

Did someone find out what's happening with heroku?

Invalidate all assets is not always an option, since then all assets needs to be recompiled from scratch and it takes lot of time.

Also one have to remember to invalidate them by changing value of config.assets.version and that's boring.

@kikonen
Copy link
Owner

kikonen commented Jun 21, 2015

I haven't myself spend time to investigate Heroku, since I don't right now have suitable env in Heroku for trying it out. But I hear you, clearly some digging is needed.

@kikonen kikonen reopened this Jun 21, 2015
@farneman
Copy link

To make asset versioning easier in the meantime you could set an ENV variable like (taken from thoughtbot's suspenders):
Rails.application.config.assets.version = (ENV["ASSETS_VERSION"] || "1.0")

@lunks
Copy link

lunks commented Sep 19, 2015

We might be able to optionally use a random cache_key in the Sprockets processor which will always invalidate the cache, I believe. It's sort of a hack, but it might work.

@ulitiy
Copy link

ulitiy commented Feb 10, 2016

Not working on dokku either. Even after cleaning the cache and bumping the assets version.

Moved to #26

@blackjid
Copy link
Contributor

Maybe you can try using the dyno-metadata labs to use the SLUG_ID or the SLUG_COMMIT as the assets version. That way it will get invalidated only on real new releases. I haven't tried it yet though.

heroku labs:enable runtime-dyno-metadata -a <app name>

and set

Rails.application.config.assets.version = ENV['HEROKU_SLUG_ID']

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