a14m / EGP-Rates

EGP exchange rate scraper from EG Banks
MIT License
11 stars 5 forks source link

require 'EGP_Rates' isn't working #23

Closed muhammednagy closed 7 years ago

muhammednagy commented 7 years ago

hello I tried to use the gem in my rails project. I added it to Gemfile and I hit bundle i . every time I use require 'EGP_Rates' it shows me this error: LoadError: cannot load such file -- EGP_Rates

The solution is to use require 'egp_rates' or change the name of egp_rates.rb in lib to be EGP_Rates.rb

a14m commented 7 years ago

thanks 👍 if you are using it with rails, you don't have to use require 'egp_rates', rails autoload will require it... if you are using the gem as a standalone, then you need to add the require 'egp_rates'

muhammednagy commented 7 years ago

i know i was trying to use it in a script first

a14m commented 7 years ago

yeah, thanks for noticing this in the documentation I forgot to update it when I built the CLI https://github.com/mad-raz/EGP-Rates-CLI/blob/master/lib/EGP_Rates_CLI.rb#L2

and please keep reporting bugs 😉

muhammednagy commented 7 years ago

:) thanks for your code and your tiime