OK, so I just encountered an error and discovered a solution to the fix. But first, some background. Going thru the book, Agile Web Development with Rails 5, which was published late 2016. So it’s been 8 months and one of the lines published doesn’t work.

We’re making the recently added line item highlighted using jquery-ui-rails, so we add the following to the Gemfile and app/assets/javascripts/application.js.


gem 'jquery-rails'
gem 'jquery-ui-rails'


//= require jquery
//= require jquery-ui/effect-blind
//= require jquery_ujs

Unfortunately, something has changed since the published code worked. Sprockets::FileNotFound in Store#index

jQuery UI Effect Blind

I found the solution in the publisher’s forum, albeit for the book’s pervious version. Slip in /effects/ between the jquery-ui and effect-blind.


//= require jquery
//= require jquery-ui/effects/effect-blind
//= require jquery_ujs

But apparently, //= require jquery.ui.effect-blind used to be how this effect was specified. How long will the current solution hold?


The means by which solutions are implemented are subject to change. This prospect sucks, because it redirects our energy from building to patching. You might think we’re done and should move on back to building. But I want to better understand where this solution came from. So let’s see if we can reproduce what Sam R suggested. The source wasn’t referenced, so we gotta track it down.

I first checked out the jQuery API for the Blind Effect to no avail. Next I thought it’s probably related to the actual jquery-ui-rails Ruby gem. Sure enough, in the README.md file, you can find the most up-to-date code for including jQuery UI Effects.

But even if the README.md was incorrect, you could verify for yourself by digging into the repo, where the source code presumably lives: jquery-ui-rails/app/assets/javascripts/jquery-ui/effects/effect-blind.js. I’m guessing it follows this path. You can also look into the history of this repo to see the changes by doing a Cmd+F for “effects”.