Skip to content

Commit

Permalink
Updated file path error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
ip2location committed Dec 7, 2021
1 parent e6dfdb9 commit ec7a8bd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ gem install ip2location_ruby
You can check the **example.rb** file to learn more about usage.

## BIN Database
An outdated BIN database was provided in the library for your testing. You are recommended to visit the [links](#dependencies) to download the latest BIN database and save it in the ```rb``` folder.

Below is the description of the functions available in the **BIN Database** lookup.

| Function Name | Description |
Expand Down Expand Up @@ -69,8 +71,6 @@ This library requires IP2Location BIN data file to function. You may download th
* IP2Location LITE BIN Data (Free): https://lite.ip2location.com
* IP2Location Commercial BIN Data (Comprehensive): https://www.ip2location.com

An outdated BIN database was provided in the library for your testing. You are recommended to visit the above links to download the latest BIN database.

You can also sign up for [IP2Location Web Service](https://www.ip2location.com/web-service/ip2location) to lookup by IP2Location API.

# IPv4 BIN vs IPv6 BIN
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.3.1
8.3.2
2 changes: 1 addition & 1 deletion ip2location_ruby.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = "ip2location_ruby"
s.version = "8.3.1"
s.version = "8.3.2"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.require_paths = ["lib"]
Expand Down
4 changes: 2 additions & 2 deletions lib/ip2location_ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
class Ip2location
attr_accessor :record_class4, :record_class6, :v4, :file, :db_index, :count, :base_addr, :ipno, :count, :record, :database, :columns, :ip_version, :ipv4databasecount, :ipv4databaseaddr, :ipv4indexbaseaddr, :ipv6databasecount, :ipv6databaseaddr, :ipv6indexbaseaddr, :databaseyear, :databasemonth, :databaseday, :last_err_msg

VERSION = '8.3.1'
VERSION = '8.3.2'
FIELD_NOT_SUPPORTED = 'NOT SUPPORTED'
INVALID_IP_ADDRESS = 'INVALID IP ADDRESS'
INVALID_BIN_DATABASE = 'Incorrect IP2Location BIN file format. Please make sure that you are using the latest IP2Location BIN file.'
Expand All @@ -29,7 +29,7 @@ def open(url)
self.file = File.open(File.expand_path url, 'rb')
rescue
self.last_err_msg = 'Ip2location.new.open() error in opening ' + url +'.'
abort('Ip2location.new.open() error in opening ' + url +'.')
abort('Ip2location.new.open() error in opening ' + url + '. No such file in the /your_ip2location_ruby_library_path/rb/ folder.')
else
end
i2l = Ip2locationConfig.read(file)
Expand Down

0 comments on commit ec7a8bd

Please sign in to comment.