rails ajax_pagination couldn't find file 'history'
Asked Answered
Y

2

3

I have installed ajax_pagination gem from https://github.com/ronalchn/ajax_pagination

When I restart my server i get this message

couldn't find file 'history' (in /Users/user/.rvm/gems/ruby-1.9.3-p362/gems/ajax_pagination-0.6.3/lib/assets/javascripts/ajax_pagination.js.erb:3)

and inserted calls in assets manifests, rails version is 3.2.8

I had tried installing a history gem ( https://github.com/philostler/historyjs-rails ) or adding history.js to assets but nothing helps

Thanks for any help!

Yacketyyak answered 19/1, 2013 at 17:48 Comment(0)
C
0

This appears to be a bug in the jquery-historyjs gem, which ajax_pagination depends on. You may want to report an issue on their github repo.

As a work-around, you could create a blank history.js file in app/assets/javascripts and try bringing in historyjs-rails.

Camelopardus answered 19/1, 2013 at 22:24 Comment(1)
Ok after I added history.js and ajax_pagination.js file in app/assets/javascripts and ajax_pagination.css to app/assets/stylesheets it workedYacketyyak
T
4

I had the same issue, all you need to do is:

  • Add gem 'jquery-historyjs' to your Gemfile,
  • Run bundle install
  • Then rails generate historyjs:install
Trichloride answered 9/8, 2013 at 17:4 Comment(1)
Good answer. No need to run rails generate historyjs:install in my case.Chyack
C
0

This appears to be a bug in the jquery-historyjs gem, which ajax_pagination depends on. You may want to report an issue on their github repo.

As a work-around, you could create a blank history.js file in app/assets/javascripts and try bringing in historyjs-rails.

Camelopardus answered 19/1, 2013 at 22:24 Comment(1)
Ok after I added history.js and ajax_pagination.js file in app/assets/javascripts and ajax_pagination.css to app/assets/stylesheets it workedYacketyyak

© 2022 - 2024 — McMap. All rights reserved.