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

heroku pre-compiling assets now fails #69

Closed
andrewhavens opened this issue Jul 11, 2012 · 11 comments
Closed

heroku pre-compiling assets now fails #69

andrewhavens opened this issue Jul 11, 2012 · 11 comments

Comments

@andrewhavens
Copy link

So now that I've added the refinerycms-page-images gem and deploy to heroku, when it goes to pre-compile the assets to add to the slug, it fails with the message:

Running: rake assets:precompile
   rake aborted!
   could not connect to server: Connection refused
   Is the server running on host "127.0.0.1" and accepting
   TCP/IP connections on port 5432?

I am running Rails 3.2.6 and refinerycms/refinerycms-page-images '~> 2.0.0'

I found some articles online which say they solved the issue by adding this line to their config/application.rb file:

config.assets.initialize_on_precompile = false

But that resulted in a different error for me:

   Running: rake assets:precompile
   rake aborted!
   undefined method `admin_dialogs_path' for #<Module:0x00000005d92da8>
   (in /tmp/build_2lptj1tk77zwu/vendor/bundle/ruby/1.9.1/gems/refinerycms-core-2.0.5/app/assets/javascripts/refinery/boot_wym.js.erb)
   Tasks: TOP => assets:precompile:primary
   (See full trace by running task with --trace)
   Precompiling assets failed, enabling runtime asset compilation

Now I dont know what to do to fix this. What should I do?

@parndt
Copy link
Member

parndt commented Jul 11, 2012

I think that this gem does something naughty with the database upon initialize (like accessing a model,etc) that prevents the config.assets.initialize_on_precompile = true case working.

@robyurkowski
Copy link

Sorry for terseness, but here's a quick fix: https://devcenter.heroku.com/articles/labs-user-env-compile

@parndt
Copy link
Member

parndt commented Jul 11, 2012

Yeah; I understand why you're doing it. :-)

Please see refinery/refinerycms#1751

@andrewhavens
Copy link
Author

@robyurkowski that was a quick fix: https://devcenter.heroku.com/articles/labs-user-env-compile
@parndt I think you are answering a comment I quickly deleted because I realized that I misread your original comment. =]

@hayksaakian
Copy link
Contributor

was this ever resolved? I'm still seeing this issue on

gem "refinerycms-page-images", :git => "git://github.com/resolve/refinerycms-page-images.git", :branch => "2-0-stable"

@parndt
Copy link
Member

parndt commented May 20, 2013

Did you enable user-env-compile?

@hayksaakian
Copy link
Contributor

I just did, and it worked.

However, it's not clear to me what the actual root of the problem is however.

The only config/vars I added for this gem was my s3 configuration (keys/bucket/etc) -- and I don't know why it'd be needed during asset pre-compilation.

If "that's just the way it is" I think this would be important to put in the readme to save everyone a few minutes of their life.

@parndt
Copy link
Member

parndt commented May 20, 2013

Sure, could you please send a pull request? It's just the way it is with Heroku and this extension, unfortunately.

@parndt
Copy link
Member

parndt commented May 20, 2013

Fixed by #85

@parndt parndt closed this as completed May 20, 2013
@LoganDSPrice
Copy link

@parndt How is this issue fixed now that Heroku has deprecated user-env-compile?

@parndt
Copy link
Member

parndt commented Jul 15, 2017

@LoganDSPrice have you encountered the issue?

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

5 participants