Iban gem integration

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Iban gem integration

Sapna Mishra
I have installed IBAN gem to my application.

gem 'IBAN'

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 [hidden email].
To post to this group, send email to [hidden email].
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.
Reply | Threaded
Open this post in threaded view
|

Re: Iban gem integration

Colin Law
On Mon, 25 Mar 2019 at 07:12, Sapna Mishra <[hidden email]> 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 [hidden email].
> To post to this group, send email to [hidden email].
> 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 [hidden email].
To post to this group, send email to [hidden email].
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.
Reply | Threaded
Open this post in threaded view
|

Re: Iban gem integration

Sapna Mishra
Yes I did. I have find the repo for this in github. https://github.com/max-power/iban/
in that they have mentioned that this repo is moved to https://github.com/max-power/bank so I have used that now and it is working. Thanks

On Monday, March 25, 2019 at 2:13:21 PM UTC+5:30, Colin Law wrote:
On Mon, 25 Mar 2019 at 07:12, Sapna Mishra <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="g9rVKU18AwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">sapna....@...> 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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="g9rVKU18AwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="g9rVKU18AwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">rubyonra...@googlegroups.com.
> To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/rubyonrails-talk/ec34d48a-ecd4-4be5-b8f9-481394dbc093%40googlegroups.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/ec34d48a-ecd4-4be5-b8f9-481394dbc093%40googlegroups.com&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/ec34d48a-ecd4-4be5-b8f9-481394dbc093%40googlegroups.com&#39;;return true;">https://groups.google.com/d/msgid/rubyonrails-talk/ec34d48a-ecd4-4be5-b8f9-481394dbc093%40googlegroups.com.
> For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/6bef3c4c-efb9-48bf-8978-a0bbf002f584%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Iban gem integration

botp

On Mon, Mar 25, 2019 at 4:46 PM Sapna Mishra <[hidden email]> wrote:
Yes I did. I have find the repo for this in github. https://github.com/max-power/iban/
in that they have mentioned that this repo is moved to https://github.com/max-power/bank so I have used that now and it is working. Thanks


imho, the origl repo should be emptied and, if the link/repo should stay for whatever reason, should provide a redirect instead.

--
many thanks and many regards,
--botp

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAAwHHQjqb0yJZxcmw9BLe0gJ%2BEhm8caT8Wb9NQMpwHUdrdU_gw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.