Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error with Bullet Gem Rails 4 and Uniform Notifier

I'm trying to use bullet gem to avoid N+1 queries in my website. I've used it until some months ago, then it stopped to work. I got this only today.

When I start my localhost I get this error message:

/Users/carcarlo/.rvm/gems/ruby-2.2.4/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require':/Users/carcarlo/.rvm/gems/ruby-2.2.4/gems/uniform_notifier-1.12.0/lib/uniform_notifier/base.rb:37: syntax error, unexpected <<, expecting keyword_end (SyntaxError)
  <<~CODE
    ^/Users/carcarlo/.rvm/gems/ruby-2.2.4/gems/uniform_notifier- 1.12.0/lib/uniform_notifier/base.rb:38: syntax error, unexpected '<', expecting keyword_end <script #{attributes_string}>/*<![CDATA[*/
     ^ target of repeat operator is not specified: /*]]>*/

it is clear that is an error in the file base.rb of the gem uniform_notifier, which is a dependency of bullet, but what can I do to get it working on my system? I tried to force the installation of uniform_notifier to an older version (actual is 1.12.1) but it is locked to 1.12.0

This application is written using ruby 2.2.4 and rails 4.2.5

like image 223
Roberto Boldi Avatar asked Jun 20 '19 11:06

Roberto Boldi


1 Answers

I was able to fix it by using a lower version of bullet

gem 'bullet', '~> 5.7.6'
like image 114
Prem Anand Avatar answered Oct 16 '22 01:10

Prem Anand