Question

1 Follower
4
Avatar

Asset Pipeline not compiling on deploy

Trying to deploy a new Rails app for the first time, and it's not compiling on deploy and nothing in https://github.com/engineyard/engineyard-serverside/blob/master/lib/engineyard-serverside/rails\_asset\_support.rb#L20 should be stopping it (pipelining is enabled in the application.rb, the application.rb is readable, there's no public/assets folder) 

Any suggestions?

Oli Young

Please sign in to add your answer.

3 answers

Accepted answer
0
Avatar

Hi Oli,

If you're deploying via the engineyard CLI, please try updating it via "gem update engineyard". It sounds like your local version of the CLI isn't in step with engineyard-serverside, and that could prevent the assets from being compiled properly on deploy.

Other things to check:

  • Is the environment you're deploying to fully upgraded?
  • Does assets.enabled or assets.disabled show up anywhere else in your application? (grep -ir 'assets.enabled' /path/to/app; grep -ir 'assets.disabled' /path/to/app)
  • After the deploy, is /data/appname/current/public/assets a valid symlink to /data/appname/shared/assets? Is anything in there?
  • What's your disk space usage look like (df -h)? Is /data anywhere near full?
  • Try deploying through the dashboard - do you get the same result?
  • If you look at your deploy logs (/home/deploy/appname-deploy.log), do you see output there that mimics what's in engineyard-serverside's "app_needs_assets?" method you linked above? "~> app/assets/ found. Attempting Rails asset pre-compilation.", "~> public/assets already exists, skipping pre-compilation.", or "~> application.rb has disabled asset compilation. Skipping."?

If none of these tips are helpful, please open a ticket with Application Support so we can take a closer look at your application/environment and attempt to reproduce the issue.

J. Austin Hughey
0
Avatar

Hi!

Seems like the symlink isn't getting created, and the shared assets folder is empty - what's my next step to fix that? 

– Oli

Oli Young
0
Avatar

Hi Oli,

I took a look at your account and found two applications. One of them is a Rails 3.1 application that does have assets precompiled, so I knew that wasn't the problem app. The other one, however, was a rails 3.0 application that did not have assets compiled. If you look at the deploy logs, you'll see an entry four lines up from the bottom:

~> No 'assets:precompile' Rake task found. Skipping.

This is because the asset pipeline debuted in Rails 3.1, and the application in question is a Rails 3.0 application, according to its Gemfile. You need to upgrade your app to run on Rails 3.1.

Please file a ticket with us if you need any further assistance. Thank you!

J. Austin Hughey