Bundler claims to install current version of formtastic, but bundle open shows it contains deprecated method that should have been removed already

StackOverflow https://stackoverflow.com/questions/19147344

Question

First time posting on SO, please forgive me and let me know if there's anything I can do to make this question better.

I'm working on a rails 4 app using the formtastic gem. When I put a boolean input in my form, requesting the page throws an error:

undefined method `check_box_checked?' for ActionView::Helpers::InstanceTag:Class

Googling uncovered this PR which should have removed the deprecated method 'check_box_checked?' months ago: https://github.com/justinfrench/formtastic/pull/915

Here's the output of bundle show

djhrtmn@porygon:~/dev/casey$ bundle show formtastic
/home/djhrtmn/.rvm/gems/ruby-2.0.0-p247/gems/formtastic-2.2.1

So it looks like I'm using the right version... but when I bundle open the gem 'check_box_checked?' is still there.

Let me know if there's anything else I can do to improve the question...

Was it helpful?

Solution

The PR you linked did remove the deprecated method months ago, but version 2.2.1 of Formtastic (which is indeed the current stable version) was actually released over a year ago. You can see this by switching to the 2.2.1 tag in the GitHub repository and noting the last commit was on June 6th, 2012. To fully confirm, you can drill down to the file in question and see that the old code is still there.

If you're having issues with this method call, the CHANGELOG indicates there is a Release Candidate available for a newer version (RCs are generally stable but not quite considered "ready for primetime" yet). You could upgrade by manually specifying version 2.3.0.rc2 in your Gemfile.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top