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

Slug Compilation on Heroku ENV -> STAGING fails #94

Closed
exocode opened this issue Dec 10, 2013 · 1 comment
Closed

Slug Compilation on Heroku ENV -> STAGING fails #94

exocode opened this issue Dec 10, 2013 · 1 comment

Comments

@exocode
Copy link

exocode commented Dec 10, 2013

Hi there,
I got this error when I try to deploy on STAGING environment

rake aborted! Must supply cloud_name in tag or in configuration (in /tmp/build_963b09e2-9363-4e08-b60f-56f44f98464d/app/assets/stylesheets/application.scss)

ENV Variables:

CLOUDINARY_API_KEY:      123456789
CLOUDINARY_API_SECRET:   abcdefghijklmnopqrsuvwxyz
CLOUDINARY_CLOUD_NAME:   abc123456789
CLOUDINARY_URL:          cloudinary://123456789:abcdefghijklmnopqrsuvwxyz@abc123456789
RACK_ENV:                staging
RAILS_ENV:               staging

My cloudinary.yml looks like this:

development:
  cloud_name: <%= ENV['CLOUDINARY_CLOUD_NAME'] %>
  api_key: <%= ENV['CLOUDINARY_API_KEY'] %>
  api_secret: <%= ENV['CLOUDINARY_API_SECRET'] %>
  enhance_image_tag: true
  static_image_support: false    
production:
  cloud_name: <%= ENV['CLOUDINARY_CLOUD_NAME'] %>
  api_key: <%= ENV['CLOUDINARY_API_KEY'] %>
  api_secret: <%= ENV['CLOUDINARY_API_SECRET'] %>
  enhance_image_tag: true
  static_image_support: true
staging:
  <<: *production
test:
  cloud_name: <%= ENV['CLOUDINARY_CLOUD_NAME'] %>
  api_key: <%= ENV['CLOUDINARY_API_KEY'] %>
  api_secret: <%= ENV['CLOUDINARY_API_SECRET'] %>
  enhance_image_tag: true
  static_image_support: false

How can I resolve that?

many, many thanks

@TalLevAmi
Copy link
Contributor

The environment is not available in Heroku during asset pre-compilation see https://devcenter.heroku.com/articles/rails-asset-pipeline#assets-precompile-failures and the discussion here #21
Hard coding your cloud_name in cloudinary.yml should solve the issue. Alternatively, you can try to use https://devcenter.heroku.com/articles/labs-user-env-compile though it is considered experimental.

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

2 participants