Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fog deprecation warnings when starting Rails server

I migrated my Rails app to Rails 6.0.1 and every time I startup the server I get these Fog deprecation warnings. How can I get rid of them? Funny enough I have a cloned version of this app, which doesn't give these warnings...

[fog][DEPRECATION] Unable to load Fog::Atmos::Storage
[fog][DEPRECATION] The format Fog::Storage::Atmos is deprecated
[fog][DEPRECATION] Unable to load Fog::Clodo::Compute
[fog][DEPRECATION] The format Fog::Compute::Clodo is deprecated
[fog][DEPRECATION] Unable to load Fog::DigitalOcean::Compute
[fog][DEPRECATION] The format Fog::Compute::DigitalOcean is deprecated
[fog][DEPRECATION] Unable to load Fog::Dnsimple::DNS
[fog][DEPRECATION] The format Fog::DNS::Dnsimple is deprecated
[fog][DEPRECATION] Unable to load Fog::DNSMadeEasy::DNS
[fog][DEPRECATION] The format Fog::DNS::DNSMadeEasy is deprecated
[fog][DEPRECATION] Unable to load Fog::Fogdocker::Compute
[fog][DEPRECATION] The format Fog::Compute::Fogdocker is deprecated
[fog][DEPRECATION] Unable to load Fog::Dreamhost::DNS
[fog][DEPRECATION] The format Fog::DNS::Dreamhost is deprecated
[fog][DEPRECATION] Unable to load Fog::Dynect::DNS
[fog][DEPRECATION] The format Fog::DNS::Dynect is deprecated
[fog][DEPRECATION] Unable to load Fog::Ecloud::Compute
[fog][DEPRECATION] The format Fog::Compute::Ecloud is deprecated
[fog][DEPRECATION] Unable to load Fog::Glesys::Compute
[fog][DEPRECATION] The format Fog::Compute::Glesys is deprecated
[fog][DEPRECATION] Unable to load Fog::GoGrid::Compute
[fog][DEPRECATION] The format Fog::Compute::GoGrid is deprecated
[fog][DEPRECATION] Unable to load Fog::Google::Compute
[fog][DEPRECATION] The format Fog::Compute::Google is deprecated
[fog][DEPRECATION] Unable to load Fog::Google::DNS
[fog][DEPRECATION] The format Fog::DNS::Google is deprecated
[fog][DEPRECATION] Unable to load Fog::Google::Storage
[fog][DEPRECATION] The format Fog::Storage::Google is deprecated
[fog][DEPRECATION] Unable to load Fog::IBM::Compute
[fog][DEPRECATION] The format Fog::Compute::IBM is deprecated
[fog][DEPRECATION] Unable to load Fog::IBM::Storage
[fog][DEPRECATION] The format Fog::Storage::IBM is deprecated
[fog][DEPRECATION] Unable to load Fog::InternetArchive::Storage
[fog][DEPRECATION] The format Fog::Storage::InternetArchive is deprecated
[fog][DEPRECATION] Unable to load Fog::Linode::Compute
[fog][DEPRECATION] The format Fog::Compute::Linode is deprecated
[fog][DEPRECATION] Unable to load Fog::Linode::DNS
[fog][DEPRECATION] The format Fog::DNS::Linode is deprecated
[fog][DEPRECATION] Unable to load Fog::BareMetalCloud::Compute
[fog][DEPRECATION] The format Fog::Compute::BareMetalCloud is deprecated
[fog][DEPRECATION] Unable to load Fog::Rackspace::CDN
[fog][DEPRECATION] The format Fog::CDN::Rackspace is deprecated
[fog][DEPRECATION] Unable to load Fog::Rackspace::CDN v2
[fog][DEPRECATION] The format Fog::CDN v2::Rackspace is deprecated
[fog][DEPRECATION] Unable to load Fog::Rackspace::Compute
[fog][DEPRECATION] The format Fog::Compute::Rackspace is deprecated
[fog][DEPRECATION] Unable to load Fog::Rackspace::Compute v2
[fog][DEPRECATION] The format Fog::Compute v2::Rackspace is deprecated
[fog][DEPRECATION] Unable to load Fog::Rackspace::DNS
[fog][DEPRECATION] The format Fog::DNS::Rackspace is deprecated
[fog][DEPRECATION] Unable to load Fog::Rackspace::Storage
[fog][DEPRECATION] The format Fog::Storage::Rackspace is deprecated
[fog][DEPRECATION] Unable to load Fog::Rackspace::Databases
[fog][DEPRECATION] The format Fog::Databases::Rackspace is deprecated
[fog][DEPRECATION] Unable to load Fog::Rage4::DNS
[fog][DEPRECATION] The format Fog::DNS::Rage4 is deprecated
[fog][DEPRECATION] Unable to load Fog::PowerDNS::DNS
[fog][DEPRECATION] The format Fog::DNS::PowerDNS is deprecated
[fog][DEPRECATION] Unable to load Fog::ProfitBricks::Compute
[fog][DEPRECATION] The format Fog::Compute::ProfitBricks is deprecated
[fog][DEPRECATION] Unable to load Fog::SakuraCloud::Compute
[fog][DEPRECATION] The format Fog::Compute::SakuraCloud is deprecated
[fog][DEPRECATION] Unable to load Fog::SakuraCloud::Volume
[fog][DEPRECATION] The format Fog::Volume::SakuraCloud is deprecated
[fog][DEPRECATION] Unable to load Fog::SakuraCloud::Network
[fog][DEPRECATION] The format Fog::Network::SakuraCloud is deprecated
[fog][DEPRECATION] Unable to load Fog::SakuraCloud::DNS
[fog][DEPRECATION] The format Fog::DNS::SakuraCloud is deprecated
[fog][DEPRECATION] Unable to load Fog::Serverlove::Compute
[fog][DEPRECATION] The format Fog::Compute::Serverlove is deprecated
[fog][DEPRECATION] Unable to load Fog::Softlayer::Account
[fog][DEPRECATION] The format Fog::Account::Softlayer is deprecated
[fog][DEPRECATION] Unable to load Fog::Softlayer::Compute
[fog][DEPRECATION] The format Fog::Compute::Softlayer is deprecated
[fog][DEPRECATION] Unable to load Fog::Softlayer::DNS
[fog][DEPRECATION] The format Fog::DNS::Softlayer is deprecated
[fog][DEPRECATION] Unable to load Fog::Softlayer::Network
[fog][DEPRECATION] The format Fog::Network::Softlayer is deprecated
[fog][DEPRECATION] Unable to load Fog::Softlayer::Storage
[fog][DEPRECATION] The format Fog::Storage::Softlayer is deprecated
[fog][DEPRECATION] Unable to load Fog::StormOnDemand::Compute
[fog][DEPRECATION] The format Fog::Compute::StormOnDemand is deprecated
[fog][DEPRECATION] Unable to load Fog::StormOnDemand::Network
[fog][DEPRECATION] The format Fog::Network::StormOnDemand is deprecated
[fog][DEPRECATION] Unable to load Fog::StormOnDemand::Storage
[fog][DEPRECATION] The format Fog::Storage::StormOnDemand is deprecated
[fog][DEPRECATION] Unable to load Fog::StormOnDemand::DNS
[fog][DEPRECATION] The format Fog::DNS::StormOnDemand is deprecated
[fog][DEPRECATION] Unable to load Fog::StormOnDemand::Billing
[fog][DEPRECATION] The format Fog::Billing::StormOnDemand is deprecated
[fog][DEPRECATION] Unable to load Fog::StormOnDemand::Monitoring
[fog][DEPRECATION] The format Fog::Monitoring::StormOnDemand is deprecated
[fog][DEPRECATION] Unable to load Fog::StormOnDemand::Support
[fog][DEPRECATION] The format Fog::Support::StormOnDemand is deprecated
[fog][DEPRECATION] Unable to load Fog::StormOnDemand::Account
[fog][DEPRECATION] The format Fog::Account::StormOnDemand is deprecated
[fog][DEPRECATION] Unable to load Fog::StormOnDemand::VPN
[fog][DEPRECATION] The format Fog::VPN::StormOnDemand is deprecated
[fog][DEPRECATION] Unable to load Fog::Vcloud::Compute
[fog][DEPRECATION] The format Fog::Compute::Vcloud is deprecated
[fog][DEPRECATION] Unable to load Fog::VcloudDirector::Compute
[fog][DEPRECATION] The format Fog::Compute::VcloudDirector is deprecated
[fog][DEPRECATION] Unable to load Fog::Vmfusion::Compute
[fog][DEPRECATION] The format Fog::Compute::Vmfusion is deprecated
[fog][DEPRECATION] Unable to load Fog::Voxel::Compute
[fog][DEPRECATION] The format Fog::Compute::Voxel is deprecated
[fog][DEPRECATION] Unable to load Fog::CloudSigma::Compute
[fog][DEPRECATION] The format Fog::Compute::CloudSigma is deprecated
[fog][DEPRECATION] Unable to load Fog::Openvz::Compute
[fog][DEPRECATION] The format Fog::Compute::Openvz is deprecated
[fog][DEPRECATION] Unable to load Fog::OpenNebula::Compute
[fog][DEPRECATION] The format Fog::Compute::OpenNebula is deprecated
[fog][DEPRECATION] Unable to load Fog::Aliyun::Compute
[fog][DEPRECATION] The format Fog::Compute::Aliyun is deprecated
[fog][DEPRECATION] Unable to load Fog::Aliyun::Storage
[fog][DEPRECATION] The format Fog::Storage::Aliyun is deprecated
like image 885
John Avatar asked Nov 19 '19 07:11

John


2 Answers

Workaround solution: Stick these 2 lines above Bundler.require in your config/application.rb

...

require 'fog/core'
Fog::Logger[:deprecation] = nil

# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)

...
like image 125
knd Avatar answered Sep 29 '22 02:09

knd


From my understanding, you're using the whole fog library. Is there a specific reason why you're the full library, say, fog-aws? IMO there's very little benefit to using the full fog library unless you have some kind of higher level app/library that interacts with all the providers that fog offers. So I'd suggest to just require the library/libraries you need and leave the rest. This could potentially get rid of the deprecation warnings.

like image 44
Clemens Kofler Avatar answered Sep 29 '22 04:09

Clemens Kofler