I tried to use this gem, but I got this error:
undefined local variable or method `tweet_button'
Any idea ?
If you look at https://github.com/iffyuva/social-buttons/blob/master/lib/social_buttons/view_helpers/tweet.rb
You will se that tweet_button is indeed defined. So I guess for some reason, this module is not included correctly into the ActionView::Base class in order to be available to any view that inherits from this base class.
Perhaps your view doesn't inherit from this base class for some reason? If so, you can include it manually...
Try running the specs and see what you get. Could also be an autoload issue. Are you using JRuby by any chance?
I am using it in a haml file, how would a haml file inherits from ActionView::Base class ?
I tried to include it like this
But I got uninitialized constant ActionView::Base::SocialButtons
I really I appreciate your help, as I am from a C#, .NET background, and I am still need a hand, I am using Ruby in RubyMine, I am not using JRuby ..
hi @hopewise, i shall look into this issue this weekend. thanks for reporting.
Try fx ActionView::Base.methods.sort or ActionView::Base.methods.grep(/twitter/).sort
Does it work without HAML?
Looks like HAML extends ActionView::Base with haml compile/template/ render methods. I don't think using HAML is the problem...?
Having the same problem but with like_button
Someone please debug and fix this! Should not be that hard. Simply clone it to your own repo, then reference your local clone in your Gemfile and debug from there ;) Have fun!!
Looks like there is a branch minor-fixes that needs to be merged. I'm on it ;)
@kristianmandrup, there are some changes on master branch of your social-button version. can you open a PR? Thanks.
Released a new version where all specs pass on my side. Does it work for you now? I'm sorry, I have to go in 5 mins. Just had a few mins to spare...
Still does not work // undefined method, at least not on Rails 4.
It seems that it installs in the bundle, but it doesnt. config/initializers, etc. are missing.