Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined local variable or method `filepicker_js_include_tag' #82

Closed
dgalarza opened this issue Dec 18, 2013 · 19 comments
Closed

undefined local variable or method `filepicker_js_include_tag' #82

dgalarza opened this issue Dec 18, 2013 · 19 comments
Labels

Comments

@dgalarza
Copy link

Hello, I recently added the filepicker-rails gem to a Rails 4.0.2 project. It appears that the view helpers are not being included properly as I end up getting an 'undefined local variable or method' error for any of the helpers in FilepickerRails::ApplicationHelper.

The form helpers appear to be working fine however.

@dylanjha
Copy link

Confirmed, same thing with me

@dylanjha
Copy link

put this in ApplicationController:

helper FilepickerRails::Engine.helpers
http://edgeapi.rubyonrails.org/classes/Rails/Engine.html#label-Isolated+engine%27s+helpers

@maurogeorge
Copy link
Contributor

Guys, sorry for that, I create some features specs to this bug dont come back anymore.

I made a new release today, here is the news.

@dgalarza congratz for the StrongParametersMatcher, we are realy close to add suport to the rails 4.1.0 😉

@pmuens
Copy link

pmuens commented Apr 22, 2014

So I'm using the filepicker-rails Gem in version 1.1.0 with Rails 4.0.2 and I still get the same issue. @dylanjha fix helps here, but it would be great if it works by just including the filepicker_js_include_tag in the layout.

@maurogeorge
Copy link
Contributor

@pmuens I added a appraisal for rails 4.0.2 on my local machine and all specs still passes. I will create a simple app to test this, when I have some time.

@pmuens
Copy link

pmuens commented Apr 24, 2014

@maurogeorge thank you very much!

@maurogeorge
Copy link
Contributor

@pmuens https://gist.github.com/maurogeorge/11269467 I created a sample app and all run as expected. Take a look at the gist and the README, probably you missed something. Let me know when you test

@pmuens
Copy link

pmuens commented May 14, 2014

@maurogeorge thank you very much for your effort! Your test application seems to work fine.

In the meantime, I needed to switch to carrierwave-filepickerio. The problem back then (with filepicker-rails) was still not resolved. Maybe I've missed something.

But thank you very much for your effort and your test application which shows that filepicker-rails works with Rails 4.0.2.

@maurogeorge
Copy link
Contributor

@pmuens thanks for the feedback 👍

@Oshuma
Copy link

Oshuma commented Oct 23, 2014

Confirming this bug still exists in Rails 4.1.2 and filepicker-rails 1.2.0

@maurogeorge
Copy link
Contributor

@Oshuma can you double check? This bug was covered with the feature spec. Take a look at this gist and README

@Oshuma
Copy link

Oshuma commented Oct 23, 2014

Yep, definitely an issue with those versions I mentioned. @dylanjha's fix (manually including the helpers in ApplicationController) is what I had to do.

@maurogeorge
Copy link
Contributor

@Oshuma I created a new rails app with Rails 4.1.2 and filepicker-rails 1.2.0 and works. Take a look at this gist.

I guess you can try follow this steps:

One question, do you try restart the server?

@Oshuma
Copy link

Oshuma commented Oct 24, 2014

@maurogeorge I did restart my server after running bundle install. Also, I ran ./bin/spring stop to make sure it was fully shutdown.

@maurogeorge
Copy link
Contributor

@Oshuma try run with bundle exec rails

@Oshuma
Copy link

Oshuma commented Oct 24, 2014

@maurogeorge I always run rails related commands through bundler.

@maurogeorge
Copy link
Contributor

@Oshuma you are on a fresh app? I am out of ideas =)
I tested and works well.

@Oshuma
Copy link

Oshuma commented Oct 24, 2014

@maurogeorge Yea, I dunno, man. At any rate, including the helpers manually works just fine.

@maurogeorge
Copy link
Contributor

@Oshuma ok, I will keep this bug closed, since no more people have the problem on the 1.2.
I guess it is better you add the helpers for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants