Searching for resources with the Stripe GEM - ruby-on-rails

Does anyone know the syntax for searching for resources with the Stripe GEM? Looking at the code here, it looks like this should work:
Stripe::Charge.search(...)
But I'm getting the exception:
undefined method `search' for Stripe::Charge:Class (NoMethodError)

That appears to be the right syntax for that function.
Search functionality was added to the gem earlier this year in version 5.47.0. Make sure that you've upgraded to a new enough version to give you access to that functionality.

Related

How to use Nikkou (newbie Ruby question!)

I'm trying to use Nikkou in a Ruby/Rails class but I don't fully understand the very basics. The Nikkou documentation suggests that you just need to add the gem to the Gemfile and you're away... but I can't make any of the Nikkou additions to Nokogiri work for me.
NoMethodError (undefined method `text_includes' for #<Nokogiri::XML::Document:0x00007fe718540a90>):`
There must be some step I'm missing that's so obvious it isn't even mentioned in the documentation. Can anybody enlighten me?
You need to do
require 'nikkou'

aws-s3 gem unless defined? ##{:instance_writer=>true}

I am trying to integrate the aws-s3 gem with the latest version of Rails (4.1.0), and when starting the server I receive this error:
aws-s3-0.6.3/lib/aws/s3/extensions.rb:223:in `class_eval': ///.rvm/gems/ruby-1.9.3-p385/gems/aws-s3-0.6.3/lib/aws/s3/extensions.rb:223: syntax error, unexpected $undefined (SyntaxError) unless defined? ##{:instance_writer=>true}
Has anyone got any ideas?
The bulk of the gem has not been updated for over two years so I am thinking that it may finally be out of date.
In Rails 4.1 the bug is happening because cattr_attribute was removed from Module.
A short look at the issues in github: they say that the project has been abandoned.
This pull request was to fix the issue:
https://github.com/marcel/aws-s3/pull/95
You may want to use one of forks like https://github.com/bartoszkopinski/aws-s3, that fixes the issue, or change the gem to the https://github.com/aws/aws-sdk-ruby.

undefined method `error_messages_for' for #<#<Class:0x3981390>:0x

problem like this:
undefined method `error_messages_for' for #<#:0x3a4f700>
My English is very rubbish, who can help me solve the problem? thanks
Error messages for was removed in rails 3. It was extracted to a plugin,
don't remember exactly what the plugin was called but it's in the rails
GitHub repo. Rails has changed massively since 1.0.
Check this Error messages for replacement.

I'm Getting An Uninitialized Constant Error From A Recently Installed Gem. How do you fix this?

I recently installed the Citier Gem. Its Gem a solution for simple Multiple Class Inheritance in Rails. After setting up models per the instructions and running Rake, I am getting the following error:
uninitialized constant Books::Writable
*/citier/core.ext.rb:33:in 'create_citier_view'
Its been my experience that this error message usually means the Gem is not installed properly, but I've checked my Gemfile and did a Bundler Show command and everything seems to be in order. Apparently, the core.ext file referenced in the error is supposed to be extending ActiveRecord to create views that are utilized for Multiple Class Inheritance.
I checked all the usual places for the problem but can't seem to figure this out. In suggestions or ideas would be greatly appreciated. I've been stuck on this one for a couple of days now.
Thanks for you input.
Simply type require 'rails_sql_views' in config/application.rb
U may need install gem rails_sql_views

Ruby on Rails Plugin: acts_as_taggable_on_steroids. Keep getting "method_missing" undefined local variable or method 'acts_as_taggble_on'

I am trying to implement a tagging system for my rails app. I employed the popular plugin acts_as_taggable_on_steroids, and followed the instruction on how to install it. I then included acts_as_taggable in the model that I would like to have tags on, but then when I try to start the server I keep getting the error method_missing': undefined local variable or methodacts_as_taggable' for # (NameError)
I look on google and the author suggested to try acts_as_taggable_on, but still this did not fix the problem. I am struggling on this problem for hours already, but still don't know where is the problem. Could anyone please shed some light?
Thank you very much for all the help!!
Did you try to require the lib ruby of act as taggable on steroids at the beginning of your file?
Something like:
require 'acts_as_taggable'
maybe?

Resources