in one of my applications I get the annoying deprecation warning of squeel all the time.
DEPRECATION WARNING: Core extensions are deprecated and will be removed in Squeel 2.0. (called from app/config/initializers/configurations/squeel_init.rb:13:in `block in <top (required)>')
It is produced by this line:
config.load_core_extensions :hash, :symbol
We are running * squeel (1.2.3).
Any ideas how to avoid this message?
Thanks!
I want to say that the reason why you are getting the WORKING is to let you know that if you upgrade your gem to squeel (2.0) the Core Extensions will not work.
I think if you upgrade your gem to squeel (2.0) you will have to remove that line.
I hope that you have test in place to see where you need to upgrade your app.
Deprecation is an attribute applied to a computer software feature,
characteristic, or practice to indicate that it should be avoided
(often because it is being superseded).
Related
I'm having an issue with upgrading an old rails app to the latest one. My knowledge of rails is limited. As far as i'm aware, i'm running ruby 3.1 with rails 7.
ArgumentError: unknown keyword: :klass
/home/dan/.rvm/gems/ruby-3.1.2/gems/arel-9.0.0/lib/arel/table.rb:15:in `initialize'
I've looked around and found this problem mentioned here however i'm already running the latest version of it i thought? I'm not 100% sure on where i'm supposed to look at this point.
Arel is now a part of ActiveRecord so you no longer need the arel gem in your Gemfile. Removing that should get past this problem
Rails test is throwing a deprecation warning over a gem (attr_encrypted) which is already updated to the latest version. It reads:
DEPRECATION WARNING: <custom_attribute_name> is not an attribute known to Active Record. This behavior is deprecated and will be removed in
the next version of Rails. If you'd like <custom_attribute_name> to be managed by Active Record, add attribute :<custom_attribute_name> to your class.
Not sure what it is asking me to do... it must be declared using attr_encrypted.
The deprecation warning is something the attr_encrypted gem needs to fix, but it seems there is a workaround by adding the attribute call as mentioned in the warning.
See https://github.com/attr-encrypted/attr_encrypted/issues/260
I am using the Compass gem for Rails. After installing it, I've used some mixins that come with Compass. I am getting a deprecation warning in the console:
DEPRECATION WARNING on line 87 of /usr/local/rvm/gems/ruby-2.3.0/gems/compass-core-1.0.3/stylesheets/compass/css3/_deprecated-support.scss: #{} interpolation near operators will be simplified
in a future version of Sass. To preserve the current behavior, use quotes:
unquote('"$moz-"#{$experimental-support-for-mozilla} "$webkit-"#{$experimental-support-for-webkit} "$opera-"#{$experimental-support-for-opera} "$microsoft-"#{$experimental-support-for-microsoft} "$khtml-"#{$experimental-support-for-khtml}')
You can use the sass-convert command to automatically fix most cases.
I am having trouble finding a fix for this online. What does this warning mean and what can I do to fix it?
Apparently this is a bug in the gem. Workaround until fix is pushed to gem here: https://github.com/Compass/compass/pull/2088
I'm pretty new to Rails. I keep seeing these deprecation warnings when I start my app:
DEPRECATION WARNING: ref is deprecated and will be removed from Rails 3.2.
(called from <top (required)> at D:/dev/AquaticKodiak/config/application.rb:12)
DEPRECATION WARNING: new is deprecated and will be removed from Rails 3.2.
(called from <top (required)> at D:/dev/AquaticKodiak/config/application.rb:12)
OK, what's on line 12? This:
Bundler.require(:default, :assets, Rails.env)
Hmm, that's not really narrowing it down. This says to me that one of the gems that's related to my app is using a keyword that will disappear soon. I'd really like to figure out which one. All the gems in my gemfile are using the >= [version] syntax, except the ones that are coming from github. I suspect that the github stuff is causing this, but how do I find out which project it is? Pulling code and searching for the keyword looks like work -- is there an easier way?
The Rails deprecation warning is pretty unhelpful here. It has a complete callstack that could help you find the out of date gem, but is filtering the result to return the first non-framework point in the callstack, in this case application.rb.
To find the offending gem I would grab the full callstack at ActiveSupport::Deprecation.warn, which is defined at line 10 of activesupport/lib/active_support/deprecation/reporting.rb.
If you have Pry installed (recommended) then add a conditional binding at line 11 of reporting.rb:
binding.pry if message =~ /ref is deprecated/
Then inspect caller.
If you post a Gemfile I can take a look for you.
My cucumber test passes, but leaves this ridiculous stack trace. Just your basic The {{key}} interpolation syntax in I18n messages is deprecated. Please use %{key} instead. error message, but how am I to find the culprit in that list?
I never used the {{key}} syntax myself, so some gem I'm using is outdated. Please tell me which one. It's really frustrating to have so much kruft every time I run a test.
I was getting that error with Authlogic and it turned out that the more recent versions of the I18n gem (0.4.x, I think) deprecated the call.
I avoided the problem by "rolling back" my I18n gem to version 0.3.7.
As to which plugin, at a guess this is the key line (line 15 on your gist):
/Library/Ruby/Gems/1.8/gems/responders-0.6.0/lib/responders/flash_responder.rb:115:in `set_flash_message!
Since it is the first one that is after the I18n lines, I suspect it is the one that is calling translate with the deprecated interpolation.
(Update a few minutes later):
Looking at: http://github.com/plataformatec/responders/commits/master, ...it looks like you could just upgrade to responders 0.6.2. Their commit on June 24th seems to address the issue.