crowdAI / crowdai

Fighting for Open Science with Open Data
https://www.crowdai.org
GNU Affero General Public License v3.0
149 stars 32 forks source link

Depreciation warnings #74

Closed scarroll32 closed 7 years ago

scarroll32 commented 7 years ago

Various deprecations to be updated before upgrading to Rails 5.1

DEPRECATION WARNING: `config.serve_static_files` is deprecated and will be removed in Rails 5.1.
2017-03-06T15:08:36.736467+00:00 app[worker.1]: Please use `config.public_file_server.enabled = true` instead.
DEPRECATION WARNING: `:nothing` option is deprecated and will be removed in Rails 5.1. Use `head` method to respond with empty response body. 
Mar 06 06:46:37 crowdai-prd app/web.2:  DEPRECATION WARNING: Passing an argument to force an association to reload is now deprecated and will be removed in Rails 5.1. Please call `reload` on the result collection proxy instead. (called from new at /app/app/controllers/posts_controller.rb:9) 
Mar 06 05:49:05 crowdai-prd app/worker.1:  DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from included at /app/vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-xls-a5a70018c626/lib/active_admin/xls/resource_controller_extension.rb:6) 
Mar 06 05:49:05 crowdai-prd app/worker.1:  DEPRECATION WARNING: In Rails 5.1, The `:subdomains` option of HSTS config will be treated as true if 
Mar 06 05:49:05 crowdai-prd app/worker.2:  DEPRECATION WARNING: `skip_filter` is deprecated and will be removed in Rails 5.1. Use skip_before_action, skip_after_action or skip_around_action instead. (called from <class:BaseController> at /app/app/controllers/api/base_controller.rb:4) 
Mar 06 05:49:05 crowdai-prd app/worker.2:  DEPRECATION WARNING: `skip_action_callback` is deprecated and will be removed in Rails 5.1. Please use skip_before_action, skip_after_action or skip_around_action instead. (called from <class:BaseController> at /app/app/controllers/api/base_controller.rb:4) 
Mar 06 05:49:05 crowdai-prd app/worker.2:  DEPRECATION WARNING: before_filter is deprecated and will be removed in Rails 5.1. Use before_action instead. (called from <class:BaseController> at /app/app/controllers/api/base_controller.rb:5) 
scarroll32 commented 7 years ago

Need to be fixed for Rails 5.1 upgrade https://github.com/crowdAI/crowdai/commit/7a5a02b50abc61b1dd786f0df71317706e7240a0

scarroll32 commented 7 years ago

DEPRECATION WARNING: `config.serve_static_files` is deprecated and will be removed in Rails 5.1. Please use `config.public_file_server.enabled = true` instead.

scarroll32 commented 7 years ago

DEPRECATION WARNING: `config.serve_static_files` is deprecated and will be removed in Rails 5.1. Please use `config.public_file_server.enabled = true` instead.

scarroll32 commented 7 years ago
~/src/salathegroup/crowdai /master *> heroku run rake db:seed --app crowdai-prd
Running rake db:seed on ⬢ crowdai-prd... up, run.7829 (Standard-1X)
DEPRECATION WARNING: `config.serve_static_files` is deprecated and will be removed in Rails 5.1.
Please use `config.public_file_server.enabled = true` instead.
 (called from block in <top (required)> at /app/config/environments/production.rb:7)
DEPRECATION WARNING: ActiveRecord::Base.raise_in_transactional_callbacks= is deprecated, has no effect and will be removed without replacement. (called from <top (required)> at /app/config/environment.rb:5)
DEPRECATION WARNING: after_filter is deprecated and will be removed in Rails 5.1. Use after_action instead. (called from <class:ApplicationController> at /app/app/controllers/application_controller.rb:5)
DEPRECATION WARNING: before_filter is deprecated and will be removed in Rails 5.1. Use before_action instead. (called from <class:ApplicationController> at /app/app/controllers/application_controller.rb:7)
DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from included at /app/vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-xls-a5a70018c626/lib/active_admin/xls/resource_controller_extension.rb:5)
DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from included at /app/vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-xls-a5a70018c626/lib/active_admin/xls/resource_controller_extension.rb:6)
DEPRECATION WARNING: In Rails 5.1, The `:subdomains` option of HSTS config will be treated as true if
unspecified. Set `config.ssl_options = { hsts: { subdomains: false } }` to opt out
of this behavior.
 (called from <top (required)> at /app/config/environment.rb:5)
DEPRECATION WARNING: Time columns will become time zone aware in Rails 5.1. This
still causes `String`s to be parsed as if they were in `Time.zone`,
and `Time`s to be converted to `Time.zone`.

To keep the old behavior, you must add the following to your initializer:

    config.active_record.time_zone_aware_types = [:datetime]

To silence this deprecation warning, add the following:

    config.active_record.time_zone_aware_types = [:datetime, :time]
 (called from <top (required)> at /app/db/seeds.rb:39)
DEPRECATION WARNING: Time columns will become time zone aware in Rails 5.1. This
still causes `String`s to be parsed as if they were in `Time.zone`,
and `Time`s to be converted to `Time.zone`.

To keep the old behavior, you must add the following to your initializer:

    config.active_record.time_zone_aware_types = [:datetime]

To silence this deprecation warning, add the following:

    config.active_record.time_zone_aware_types = [:datetime, :time]
 (called from <top (required)> at /app/db/seeds.rb:39)
scarroll32 commented 7 years ago

Closed https://github.com/crowdAI/crowdai/commit/f1168f2d676008685dddd4f542553889da2384c8