rails ajax_pagination couldn't find file 'history'

杀马特。学长 韩版系。学妹 提交于 2020-01-02 07:47:33

问题


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!


回答1:


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.




回答2:


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


来源:https://stackoverflow.com/questions/14417056/rails-ajax-pagination-couldnt-find-file-history

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!