Ruby on Rails Wednesday, September 2, 2015

Why is this an issue? Typically speaking this should be transparent at the application layer all the time. If you need another app or service to be able to access images on your app you should expose that through an API.


On Wed, Sep 2, 2015 at 12:45 AM, Sri <srikanth.samudrala@gmail.com> wrote:

Hello,

I am facing this weird issue. I believe the asset digests are generated based on the content of the file. However, when I deploy my application using Capistrano to staging environments and multiple boxes in production environment, I see different digests everywhere.

E.g.

In staging

walk-7c37170aabab6fdd99a9d17a303abfaf.jpg

Production

walk-0456e469fd62f3542f72164914da851f.jpg  walk-14c6d0204ad05c65f224f93e3d60deb8.jpg(older)  walk-73cce916ff11427c80512c1e69be4d4d.jpg(older)

I am not using any custom Capistrano tasks. Here is my deploy.rb for reference.

set :application, '<SNIP>'  set :deploy_user, 'ubuntu'    set :deploy_to, "/home/#{fetch(:deploy_user)}/apps/#{fetch(:application)}"  set :migrate_target,  :current  set :rails_env, "production"  set :rvm1_ruby_version, "2.1.1"  set :rvm_type, :system  set :default_shell, '/bin/bash -l'  set :pty, true   set :ssh_options, {  forward_agent: true  }    #RVM setup    set :scm, :git  set :repo_url, '<SNIP>'  set :branch, "master"  set :log_level, :debug      set :linked_files, fetch(:linked_files,    []).push('config/database.yml','config/application.yml','config/secrets.yml')      set :linked_dirs, fetch(:linked_dirs,[]).push('log','tmp/pids','tmp/cache', 'tmp/sockets', 'vendor/bundle','public/system','public/images','public/assets')    set :bundle_binstubs, nil        after 'deploy:publishing', 'deploy:restart'  namespace :deploy do    task :restart do    invoke 'unicorn:restart'  end

end

What could explain this difference? Am I doing something wrong? Can I force asset digests to be created consistently?


Also posted on stackoverflow.

http://stackoverflow.com/questions/32336707/rails-4-asset-pipeline-generates-different-digest-in-different-environments

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/0d5a5fc9-8cdc-453e-abc0-957cdf20446b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CA%2BCQ9375AFzs2Nmg0dTRqK-xf0_vQz7p1oJSH%2BU1MQCSPuX4rA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment