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

Active Storage Preview Warnings #739

Merged
merged 5 commits into from Apr 23, 2018
Merged

Active Storage Preview Warnings #739

merged 5 commits into from Apr 23, 2018

Conversation

schneems
Copy link
Contributor

@schneems schneems commented Apr 16, 2018

  • When using active storage set to :local emit a warning letting people know that the storage might not work as they expect.

  • When no ffmpeg is available warn that previews will not work.

warn(<<-WARNING)
You set your `config.active_storage.service` to :local in production.
If you are uploading files to this app, they will not persist after the app
is restarted. Heroku applications have an ephemeral files system. To
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after the app is restarted, on other web dynos, or in one off dynos.

People don't get this, and I guarantee we'll see tickets about it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. Also I added more words in the linked article.

@schneems schneems force-pushed the schneems/active-storage branch 2 times, most recently from ea90ea4 to 0b87879 Compare April 17, 2018 12:37
- When using active storage set to `:local` emit a warning letting people know that the storage might not work as they expect.

- When no `ffmpeg` is available warn that they need to add a special buildpack.
@calebhearth
Copy link
Contributor

Thanks!

@schneems schneems merged commit 7697f59 into master Apr 23, 2018
@frenkel
Copy link

frenkel commented Apr 23, 2018

I think this PR breaks my deploys, which used to work fine. The error:

remote: -----> Preparing app for Rails asset pipeline                                                                                                                                                                remote:        Running: rake assets:precompile                                                                                                                                                                      
remote:        Asset precompilation completed (1.39s)                                                                                                                                                                remote:        Cleaning assets                                                                                                                                                                                       
remote:        Running: rake assets:clean                                                                                                                                                                            remote: sh: 1: Syntax error: Unterminated quoted string                                                                                                                                                              
remote:  !                                                                                                                                                                                                           remote:  !     Command: 'bin/rails runner "puts %Q{heroku_detecting_active_storage_config=#{Rails.application.config.active_storage.service}}"' failed unexpectedly:                                                 
remote:  !     /tmp/build_cd86d979af577a6a370f9258b58a251c/vendor/bundle/ruby/2.4.0/gems/aws-sigv4-1.0.2/lib/aws-sigv4/signer.rb:517:in `extract_credentials_provider': Cannot load `Rails.config.active_storage.serv
ice`: (Aws::Sigv4::Errors::MissingCredentialsError)                                                                                                                                                                  remote:  !     missing credentials, provide credentials with one of the following options:                                                                                  
remote:  !     - :access_key_id and :secret_access_key                                                                                                                                                               
remote:  !     - :credentials                                                                                                                                                                                        remote:  !     - :credentials_provider                                                                                                                                                                               
remote:  !     from /tmp/build_cd86d979af577a6a370f9258b58a251c/vendor/bundle/ruby/2.4.0/gems/aws-sigv4-1.0.2/lib/aws-sigv4/signer.rb:121:in `initialize'                                                            remote:  !     from /tmp/build_cd86d979af577a6a370f9258b58a251c/vendor/bundle/ruby/2.4.0/gems/aws-sdk-s3-1.9.0/lib/aws-sdk-s3/plugins/s3_signer.rb:185:in `new'                                                      
remote:  !     from /tmp/build_cd86d979af577a6a370f9258b58a251c/vendor/bundle/ruby/2.4.0/gems/aws-sdk-s3-1.9.0/lib/aws-sdk-s3/plugins/s3_signer.rb:185:in `build_v4_signer'                                          remote:  !     from /tmp/build_cd86d979af577a6a370f9258b58a251c/vendor/bundle/ruby/2.4.0/gems/aws-sdk-s3-1.9.0/lib/aws-sdk-s3/plugins/s3_signer.rb:13:in `block in <class:S3Signer>'                               
remote:  !     from /tmp/build_cd86d979af577a6a370f9258b58a251c/vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-3.19.0/lib/seahorse/client/configuration.rb:70:in `call'                                                  remote:  !     from /tmp/build_cd86d979af577a6a370f9258b58a251c/vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-3.19.0/lib/seahorse/client/configuration.rb:205:in `block in resolve_defaults'
remote:  !     from /tmp/build_cd86d979af577a6a370f9258b58a251c/vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-3.19.0/lib/seahorse/client/configuration.rb:57:in `each'                                                  remote:  !     from /tmp/build_cd86d979af577a6a370f9258b58a251c/vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-3.19.0/lib/seahorse/client/configuration.rb:57:in `each'     
remote:  !     from /tmp/build_cd86d979af577a6a370f9258b58a251c/vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-3.19.0/lib/seahorse/client/configuration.rb:204:in `resolve_defaults'                                     remote:  !     from /tmp/build_cd86d979af577a6a370f9258b58a251c/vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-3.19.0/lib/seahorse/client/configuration.rb:200:in `value_at'
remote:  !     from /tmp/build_cd86d979af577a6a370f9258b58a251c/vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-3.19.0/lib/seahorse/client/configuration.rb:189:in `block in resolve'                                     remote:  !     from /tmp/build_cd86d979af577a6a370f9258b58a251c/vendor/ruby-2.4.3/lib/ruby/2.4.0/set.rb:324:in `each_key'                                        
remote:  !     from /tmp/build_cd86d979af577a6a370f9258b58a251c/vendor/ruby-2.4.3/lib/ruby/2.4.0/set.rb:324:in `each'      

@dinatih
Copy link

dinatih commented Apr 23, 2018

Same here :

       Running: rake assets:clean
       [2018-04-23T18:31:21 (process) #416][INFO] appsignal: Loading Rails (5.2.0.rc2) integration
       [2018-04-23T18:31:24 (process) #416][INFO] appsignal: Starting AppSignal 2.5.1 (vendor/bundle/bin/rake, Ruby 2.4.2, x86_64-linux)
       [2018-04-23T18:31:24 (process) #416][INFO] appsignal: Installing action_cable hook
       [2018-04-23T18:31:24 (process) #416][INFO] appsignal: Installing active_support_notifications hook
       [2018-04-23T18:31:24 (process) #416][INFO] appsignal: Installing net_http hook
       [2018-04-23T18:31:24 (process) #416][INFO] appsignal: Installing rake hook
sh: 2: Syntax error: Unterminated quoted string
 !
 !     Command: 'bin/rails runner "puts %Q{heroku_detecting_active_storage_config=#{Rails.application.config.active_storage.service}}"' failed unexpectedly:
 !     /tmp/build_378cbdf2243ef4ca11c806d5f6b4b029/config/environments/production.rb:52:in `+': no implicit conversion of nil into String (TypeError)
 !     from /tmp/build_378cbdf2243ef4ca11c806d5f6b4b029/config/environments/production.rb:52:in `block in <top (required)>'
 !     from /tmp/build_378cbdf2243ef4ca11c806d5f6b4b029/vendor/bundle/ruby/2.4.0/gems/railties-5.2.0.rc2/lib/rails/railtie.rb:216:in `instance_eval'
 !     from /tmp/build_378cbdf2243ef4ca11c806d5f6b4b029/vendor/bundle/ruby/2.4.0/gems/railties-5.2.0.rc2/lib/rails/railtie.rb:216:in `configure'
 !     from /tmp/build_378cbdf2243ef4ca11c806d5f6b4b029/config/environments/production.rb:1:in `<top (required)>'

@JPrevost
Copy link

I just opened #744

schneems added a commit that referenced this pull request Apr 23, 2018
@edmorley edmorley deleted the schneems/active-storage branch August 27, 2020 06:54
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

Successfully merging this pull request may close these issues.

None yet

6 participants