NameError in Searchjoy::Searches#stream after rails4 upgrade
jiteshshetty opened this issue · comments
We just upgraded to rails4 and I get the following error now while loading the searchjoy view:
ActionView::Template::Error (undefined local variable or method `searchjoy' for #<#<Class:0x007fa62c068fe0>:0x007fa62c260578>):
4:
5: <script>
6: function fetchRecentSearches() {
7: $("#stream").load("<%= searchjoy.searches_recent_path %>");
8: setTimeout(fetchRecentSearches, 5 * 1000);
9: }
10: $( function() {
searchjoy (0.0.8) app/views/searchjoy/searches/stream.html.erb:7:in `___sers_ddddd__rvm_gems_ruby_______rails__x_gems_searchjoy_______app_views_searchjoy_searches_stream_html_erb__88024631391264746_70175841129020'
Any help is much appreciated.
-Jitesh
What the exact version of Rails?
@ankane it is 4.2.5.1
Unfortunately, I'm not able to reproduce. Working fine on that version of Rails in my demo app.
@ankane thanks for the quick response, this is how I am mounting it in my Gemfile:
namespace :admin do
mount Searchjoy::Engine, at: "/searchjoy"
end
Do you see something wrong with that? This used to work fine before rails4
Give master a shot.
@ankane awesome, that worked! Thanks for the super quick response.