Ruby on Rails Monday, March 25, 2019

On Mon, 25 Mar 2019 at 07:12, Sapna Mishra <sapna.spaceo@gmail.com> wrote:
>
> I have installed IBAN gem to my application.
>
> gem 'IBAN'
>

Did you run bundle install after that?

Colin

>
> I have created one validator class for this.
>
> require 'IBAN'
> class IbanValidator < ActiveModel::Validator
> def self.validate(iban_no)
> return IBAN.valid?(iban_no)
> end
> end
>
> but it gives me this error
>
> cannot load such file -- IBAN
>
>
> when I call the method without require I get below error
>
> uninitialized constant IbanValidator::IBAN
>
>
> I am not sure why I am not able to access IBAN to my application.
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ec34d48a-ecd4-4be5-b8f9-481394dbc093%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLs1%2Bfg%3DZBE%3DzKjKK9pJ9%3DLn76XopU61agNWYeX2tvbPUA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment