GithubHelp home page GithubHelp logo

yolk / valvat Goto Github PK

View Code? Open in Web Editor NEW
311.0 5.0 80.0 555 KB

Validates european vat numbers. Standalone or as a ActiveModel validator.

License: MIT License

Ruby 100.00%
taxes vat-validation vat validation vies hmrc validator

valvat's Introduction

valvat

rubygems Specs

Validates european vat numbers. Standalone or as a ActiveModel validator.

A note on Brexit

Valvat supports validating VAT-IDs from the UK by syntax, checksum and using the HMRC API (for backwards compatibility only with the :uk option set to true). Validation against the VIES web service stopped working early 2021.

Northern Ireland received its own VAT number prefix - XI which is supported by VIES web service so any XI-prefixed VAT numbers should be validated as any EU VAT number.

Features

  • Simple syntax verification
  • Lookup via the VIES web service
  • (Optional) lookup via the HMRC web service (for UK VAT numbers)
  • ActiveModel/Rails integration
  • Works standalone without ActiveModel
  • Minimal runtime dependencies
  • I18n locales for language specific error messages in English, German, French, Spanish, Italian, Portuguese, Polish, Swedish, Dutch, Danish, Czech, Slovakian, Hungarian, Bulgarian, Romanian, Latvian, Catalan, Norwegian, and Finnish.
  • Experimental checksum verification

valvat is tested and works with ruby MRI 2.6/2.7/3.0/3.1/3.2/3.3, jruby and ActiveModel 5/6/7. If you need support for ruby down to 1.9.3 and ActiveModel 3 and 4 use v1.0.1.

Installation

Add it to your Gemfile:

gem 'valvat'

And run:

$ bundle

Or install it yourself as:

$ gem install valvat

Validate the syntax of a VAT number

To verify the syntax of a vat number:

Valvat.new("DE345789003").valid?
# => true or false

It is also possible to bypass initializing a Valvat instance and check the syntax of a vat number string directly with:

Valvat::Syntax.validate("DE345789003")
# => true or false

Validate against the VIES / HMRC web service

To check if the given vat number exists via the VIES or HMRC web service:

Valvat.new("DE345789003").exists?
# => true or false or nil

Or to lookup a vat number string directly:

Valvat::Lookup.validate("DE345789003")
# => true or false or nil

To keep backwards compatibility lookups of UK VAT numbers against the HMRC API are only performed with the option :uk set to true.

Valvat::Lookup.validate("GB553557881", uk: true)
# => true or false or nil

Without this option the lookup of UK VAT number always returns false.

IMPORTANT Keep in mind that the web service might be offline at some time for all or some member states. If this happens exists? or Valvat::Lookup.validate will return nil. See Handling of maintenance errors for further details.

Details & request identifier

If you need all details and not only if the VAT is valid, pass {detail: true} as second parameter to the lookup call.

Valvat.new("IE6388047V").exists?(detail: true)
=> {
  :country_code=> "IE", :vat_number => "6388047V", :valid => true,
  :request_date => Date.today, :name=> "GOOGLE IRELAND LIMITED",
  :address=> "1ST & 2ND FLOOR ,GORDON HOUSE ,BARROW STREET ,DUBLIN 4"
} or false or nil

According to EU law, or at least as Austria sees it, it's mandatory to verify the VAT number of every new customer, but also to check the VAT number periodicaly. To prove that you have checked the VAT number, the web service can return a request_identifier.

To receive a request_identifier you need to pass your own VAT number in the options hash. In this example, Google (VAT IE6388047V) is checking the validity of eBays VAT number (LU21416127)

Valvat.new("LU21416127").exists?(requester: "IE6388047V")
=> {
  :country_code=>"LU", :vat_number => "21416127", :valid => true,
  :request_date => Date.today, :name=>"EBAY EUROPE S.A R.L.",
  :address => "22, BOULEVARD ROYAL\nL-2449  LUXEMBOURG",
  :company_type => nil, :request_identifier => "some_uniq_string"
} or false or nil

If the given requester is invalid, a Valvat::InvalidRequester error is thrown.

When requesting a request_identifier for a GB VAT number, the requester must be your own GB number; a EU VAT number won't work.

Note that when validating UK VAT numbers using the HMRC service, the detail output is modified to match the one from VIES more closely with slight differences remaining:

  1. The request_date will actually be a (more precise) Time instead of a Date
  2. The address string will join lines using \n instead of , so it's more acurate and can be displayed nicely.

Handling of maintenance errors

From time to time the VIES web service for one or all member states is down for maintenance. To handle this kind of temporary errors, Valvat::Lookup#validate returns nil by default to indicate that there is no way at the moment to say if the given VAT is valid or not. You should revalidate the VAT later. If you prefer an error, use the raise_error option:

Valvat.new("IE6388047V").exists?(raise_error: true)

This raises Valvat::ServiceUnavailable or Valvat::MemberStateUnavailable instead of returning nil.

Visit https://ec.europa.eu/taxation_customs/vies/#/help for more accurate information at what time the service for a specific member state will be down.

Handling of other errors

All other errors accuring while validating against the web service are raised and must be handled by you. These include:

  • Valvat::InvalidRequester
  • Valvat::BlockedError
  • Valvat::RateLimitError
  • Valvat::Timeout
  • all IO errors

If you want to suppress all known error cases. Pass in the raise_error option set to false:

Valvat.new("IE6388047V").exists?(raise_error: false)

This will return nil instead of raising a known error.

Set options for the Net::HTTP client

Use the :http key to set options for the http client. These options are directly passed to Net::HTTP.start.

For example to set timeouts:

Valvat.new("IE6388047V").exists?(http: { open_timeout: 10, read_timeout: 10 })

Skip local validation before lookup

To prevent unnecessary requests, valvat performs a local syntax check before making the request to the web service. If you want to skip this step (for any reason), set the :skip_local_validation option to true.

Experimental checksum verification

valvat allows to check vat numbers from AT, BE, BG, DE, DK, ES, FR, FI, GR, IE, IT, LU, NL, PL, PT, SE and SI against a checksum calculation. All other member states will fall back to a basic syntax check:

Valvat.new("DE345789003").valid_checksum?
# => true or false

These results are more valuable than a simple syntax check, but keep in mind: they can not replace a lookup via VIES or HMRC.

IMPORTANT This feature was tested against all vat numbers I could get my hand on, but it is still marked as experimental because these calculations are not documented and may return wrong results.

To bypass initializing a Valvat instance:

Valvat::Checksum.validate("DE345789003")
# => true or false

Configuration

Instead of passing in the same options again and again, Valvat allows to alter its default configuration. This feature is intended to be used when initializing your application (for example in a Rails initializer file).

Valvat.configure(
  uk: true,
  raise_error: true,
  http: { read_timeout: 5 }
)

To see all options and the defaults, take a look at valvat/configuration.

Usage with ActiveModel / Rails

Loading

When the valvat gem is required and ActiveModel is already loaded, everything will work fine out of the box. If your load order differs just add

require 'active_model/validations/valvat_validator'

after ActiveModel has been loaded.

Simple syntax validation

To validate the attribute vat_number add this to your model:

class MyModel < ActiveRecord::Base
  validates :vat_number, valvat: true
end

Additional lookup validation

To additionally perform an lookup via VIES:

validates :vat_number, valvat: { lookup: true }

To also perform an lookup via HMRC for UK VAT numbers:

validates :vat_number, valvat: { lookup: { uk: true } }

By default this will validate to true if the web service is down. To fail in this case simply add the :fail_if_down option:

validates :vat_number, valvat: { lookup: { fail_if_down: true } }

You can pass in any options accepted by Valvat::Lookup#validate:

validates :vat_number, valvat: { lookup: { raise_error: true, http: { read_timeout: 12 } } }

Additional (and experimental) checksum validation

To additionally perform a checksum validation:

validates :vat_number, valvat: { checksum: true }

Additional ISO country code validation

If you want the vat number’s (ISO) country to match another country attribute, use the match_country option:

validates :vat_number, valvat: { match_country: :country }

where it is supposed that your model has a method named country which returns the country ISO code you want to match.

Allow blank

By default blank vat numbers validate to false. To change this add the :allow_blank option:

validates :vat_number, valvat: { allow_blank: true }

Allow vat numbers outside of europe

To allow vat numbers from outside of europe, add something like this to your model (country_code should return a upcase ISO country code):

class MyModel < ActiveRecord::Base
  validates :vat_number, valvat: true, if: :eu?

  def eu?
    Valvat::Utils::EU_MEMBER_STATES.include?(country_code)
  end
end

Utilities

To split a vat number into the country code and the remaining chars:

Valvat::Utils.split("ATU345789003")
# => ["AT", "U345789003"]

or

Valvat.new("ATU345789003").to_a
# => ["AT", "U345789003"]

Both methods always return an array. If it can not detect the country or the given country is located outside of europe it returns [nil, nil]. Please note that this does not strictly return the ISO country code: for greek vat numbers this returns the ISO language code 'EL' instead of the ISO country code 'GR'.

To extract the ISO country code of a given vat number:

Valvat.new("EL7345789003").iso_country_code
# => "GR"

To extract the vat country code (first two chars in every european vat number):

Valvat.new("EL7345789003").vat_country_code
# => "EL"

To normalize a vat number:

Valvat::Utils.normalize("atu345789003")
# => "ATU345789003"

This basically just removes trailing spaces and ensures all chars are uppercase.

Usage with IPv6

There seems to be a problem when using the VIES service over IPv6. Sadly this is nothing this gem can address. For details and proposed solutions have a look at this question on StackOverflow. Thanks to George Palmer for bringing up this issue.

Links

Contributions by

https://github.com/yolk/valvat/graphs/contributors

BlaBla

Copyright (c) 2011-2024 mite GmbH

Beyond that, the implementation is licensed under the MIT License.

Code was originally extracted from our time tracking webapp mite.

valvat's People

Contributors

andi-tmh avatar aried3r avatar bobmaerten avatar brianphillips avatar cichaczem avatar davidslv avatar descala avatar henrik avatar jarthod avatar kaapa avatar kirichkov avatar kirtashw17 avatar lluis avatar michaelhoste avatar mowli avatar ndnenkov avatar nevesenin avatar olleolleolle avatar orien avatar pawelnguyen avatar petergoldstein avatar ploomans avatar promisedlandt avatar pyromaniac avatar ssaunier avatar sunny avatar tomas-radic avatar wasi avatar yolk avatar yvonnenieuwerth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

valvat's Issues

Rails5

Hi all,

Do anybody know if this is also working on a Rails5 app?

Valvat doesn't work anylonger? VIES down?

hi,

i try to validate an VAT (ATU28776802), which works in VIES directly, but in the rails console it doesn't?

irb(main):002:0> Valvat::Lookup.validate("ATU28776802")
=> nil
irb(main):003:0>

any advice? is there a change is the VIES api?

thanks

Release a new gem version?

Would it be possible to release a new gem version? I'd like to use the error handling added in e17f945 and would prefer to pin Valvat to a specific gem version in the project I'm working on. Thank you!

Validation of Bulgarian VAT (and non-VAT) ID numbers based on checksum

Hello guys!

First of all congratulations on the great work you've done on valvat!

For one of my projects I have written a code that generates "valid" bulgarian ID numbers based on the government-issued specification. I can easily port that to be used as an extra validation on top of the RegExp. I see that you are currently not using any offline validation but RegExp so I wanted to discuss with you, if you want to include such validation code, how best to include it.

Incompatibility with Ruby 3.0.0

I'm running Rails (6.1.1) and Valvat (1.1.0) on Ruby 2.7.2 and it works fine.
Now I'm trying to upgrade to Ruby 3.0.0 and get this weird issue where the main thread appears to be blocked by something. Nothing happens, no output, no log in the console, nothing. I can't even ctrl-c to stop the process, I have to kill Ruby. I tracked it down to Valvat: removing the allows the app to run fine.

More modular valvat gem (Feature request - clarification)

First of all thanks for your awesome work!

I would like to ask the maintainers what do they think about making the gem more modular, by what I mean splitting it in multiple smaller gems that come together in the "valvat" just like "rspec" does it.

use case:
At the moment I have a project where I need to validate the syntax of VAT numbers without the need to verify them against web services. And one of the constraints of the project is that I cant include the "savon" gem.

As this is used in the lookup and I don't need to do any lookups it would be grate if I could require just the parts I need (syntax, utils and maybe validations).

Would splitting the gem be something that the maintainers would consider?

Regards,
Hugo Duksis

VIES services unavailable ATM?

hi,

since today, my app fails to verify VAT numbers. can you confirm, that this is a VIES server issue? i'm in austria and get nil when querying

Valvat.new("ATU28776802").exists?

thanks!

Equality for Valvat objects

I would like to add a simple check so that it's possible to check Valvat objects for equality. Currently :

Valvat("FR00000000001") == Valvat("FR00000000001")
=> false

Is there any objection for this? Any implementation details to consider? (I would have checked if the normalized @raw are equal)

In any case, thanks for a pretty great lib !

License missing from gemspec

Some companies will only use gems with a certain license.
The canonical and easy way to check is via the gemspec
via e.g.

spec.license = 'MIT'
# or
spec.licenses = ['MIT', 'GPL-2']

There is even a License Finder to help companies ensure all gems they use
meet their licensing needs. This tool depends on license information being available in the gemspec.
Including a license in your gemspec is a good practice, in any case.

If you need help choosing a license, github has created a license picker tool

How did I find you?

I'm using a script to collect stats on gems, originally looking for download data, but decided to collect licenses too,
and make issues for gemspecs not specifying a license as a public service :)
https://gist.github.com/bf4/5952053#file-license_issue-rb-L13 So far it's going pretty well.
I've written a blog post about it

Cannot validate

I'm always getting an error if I try to run validation

Valvat.new("IE6388047V").exists?(raise_error: false)
RuntimeError: eventmachine not initialized: evma_connect_to_server

Can you point what I'm doing wrong?

Normalize nil

Not sure, if this is really an issue (maybe I should check the value before passing it to normalize), but:

$ irb
1.9.3-p286 :001 > require 'valvat'
 => true 
1.9.3-p286 :004 > Valvat::Utils.normalize ''
 => "" 
1.9.3-p286 :005 > Valvat::Utils.normalize nil
NoMethodError: undefined method `upcase' for nil:NilClass
    from /home/dre/.rvm/gems/ruby-1.9.3-p286/gems/valvat-0.4.2/lib/valvat/utils.rb:16:in `normalize'
    from (irb):5
    from /home/dre/.rvm/rubies/ruby-1.9.3-p286/bin/irb:16:in `<main>'

Portuguese translation failing due to missing space on locale yml file

First of all thanks for your awesome work!

I think the missing spaces after the key country_adjectives is the probably cause to the translation of country_adjectives to fail
I identify in the portuguese language.

I could fix overwriting the locale file on my application.

I think in a few days if anyone opens a PR to fix, I can try read the project guidelines and open the PR.

Thanks for the great work, stay safe!

getaddrinfo: Name or service not known

Hello, i have just found out that on my production server Valvat is not working for quite some time.

Valvat.new("SKXXXXXXX").exists?

turns out to be nil

But on my testing server it returns TRUE (which is the right output).

On my production server there is an error message as well

getaddrinfo: Name or service not known

/home/www-data/deploy/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:763:in initialize' /home/www-data/deploy/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:763:inopen' /home/www-data/deploy/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:763:in block in connect' /home/www-data/deploy/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/timeout.rb:55:intimeout' /home/www-data/deploy/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/timeout.rb:100:in timeout' /home/www-data/deploy/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:763:inconnect' /home/www-data/deploy/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:756:in do_start' /home/www-data/deploy/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:745:instart' /home/www-data/deploy/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/open-uri.rb:306:in open_http' /home/www-data/deploy/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/open-uri.rb:775:inbuffer_open' /home/www-data/deploy/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/open-uri.rb:203:in `block in open_loop'

Is it possible that this can be connected to resolve.conf file? (i asked Mr. Google and this is the only explanation i have found)

Valvat::Checksum.validate returns an exception for some invalid VAT numbers

Since version 0.8.0 checksum validation returns an exception for some Irish VAT numbers.
This happens for numbers that end with a character that is not in CHARS constant like X or Y.

Steps to reproduce:
Install valvat >= 0.8.0 and execute

vat = 'IE0000000AZ'
Valvat::Checksum.validate(vat)

Expected result:

false

Actual result:

NoMethodError: undefined method `*' for nil:NilClass

This breaks validation in our form for some values provided by users.

Message part was not recognized

A similiar issue exists for savon: savonrb/savon#625

The Following code should reproduce the error:

Valvat::Lookup.new("DE345789003", {:raise_error => true}).validate

with following message:

Savon::SOAPFault: (soap:Client) Message part {urn:ec.europa.eu:taxud:vies:services:checkVat}checkVatRequest was not recognized. (Does it exist in service WSDL?)

How to test errors?

First of all: Thanks for the great plugin! I've been using it for months now on my invoicing platform. Without any troubles.

Today I ran into an error for the very first time: Valvat::RateLimitError (I don't know what it means or why it occurred.)

Is there a way to fake this type of error (or any other Valvat error) to alleviate testing and handling of these errors?

Thanks for your help.

Debugging option?

We've seeing a lot of nil responses lately from consecutive requests to VIES
Something along the lines

2020-05-06 08:46:10 Existance check returned true on VAT #######
2020-05-06 08:46:13 Existance check returned nil on VAT #######

is there an option to debug what exactly is happening? maybe VIES is throttling us?

no possibility to configure savon

Hello, would be great to have possibility to configure internal soap client with open_timeout, read_timeout and other options. Now when WS is unreachable or sort of it, it takes long time to fail with timeout.

Swiss (CH) VAT validation and lookup

Hello!

First off, thanks for all the work put into this gem. Big fan!

I'm looking to do Swiss (CH) validations and lookups as well. Would you consider extending Valvat with that functionality?

I have already put some work into it and would be happy to make an effort and open a PR if you'd like.

Getting nil in all cases

Is anyone getting a nil for all the vat numbers as long as they have a correct format?

Valvat.new('GB12345678').exists? #=> nil
Valvat.new('DE345789003').exists?  #=> nil
Valvat.new('IE6388047V').exists?  #=> nil

This was working correctly until recently. The VIES check page (https://ec.europa.eu/taxation_customs/vies/?locale=en) seems to be working fine tho. Is anyone aware of this?

Warning on Ruby 3.x: `character class has duplicated range`

I'm getting this warning in my CI environment, I'm not entirely sure what it means or if it's a problem, but thought I would report it anyway!

~/repo/vendor/bundle/ruby/3.0.0/gems/valvat-1.1.0/lib/valvat/utils.rb:11: warning: character class has duplicated range: /[[:space:][:punct:][:cntrl:]]+/

Thanks!

Add caching

Hi!

We currently have some issues with usage of VIES API on one of our project because of their API have some issues.
It's not related to valvat gem which does its work correctly. But I was thinking of having some little cache to avoid calling too many time VIES API when not required.

Since VAT validity does not change this often, I guess 1 or few hour of cache on a VAT number may not be risky.

I will take time to do a pull request, but I prefer to discuss here before doing some code.

One thing to have in mind is that this gem is not fully related to Rails and should work without it. So Valvat::Lookup objects may not be able to use Rails.cache (at least directly).

So I've thing about 2 ways of doing caching:

  1. On lookup
    Having a generic cache object (ex: https://github.com/alexreisner/geocoder#caching) that could be use as proxy for Rails.cache.
  2. On validation only
    Add a cache: true (or cache: 2.hours) option in validator that may use Rails.cache.

What do you think about it?

Belgian VAT numbers can have two formats

It should be noted that according to the standard, Belgian VAT numbers can be of one of the two following formats:

BE999999999 or
BE0999999999

The old format (yet apparently still supported) format was \ABE[0-9]{9}\Z
The new format is an extension of the old one with a 0 padded at the beginning of the number (and is supported by your gem with the following regex: \ABE0[0-9]{9}\Z).

It would be nice to have both formats be supported by your otherwise excellent gem, since both formats are actually valid. Thanks.

No response returned as of 2022

Hi!

I'm using this gem in a small project, but some of my users notified me no responses are returned as of 2022.

I verified this by running some of the examples locally and trying to get my personal details from VIES but nothing works. Any idea as to why this is happening?

I'd be happy to whip up a merge request for a fix.

VIES webservice is online but I keep getting nil responses.

Screenshot 2022-01-25 at 09 14 49

Edit:

I checked the error with the raise_error flag and I'm getting following error.

Savon::SOAPFault: (soap:Server) The given SOAPAction checkVatApprox does not match an operation.

I'm not that familiar with SOAP but the checkVatApprox actions is available inside of the webservice which seems really weird that it doesn't work.

Kind regards
Jens

`Savon::HTTPError` not handled gracefully

On the 28th of April 2021 VIES was unavailable (both website and API) for a while causing Savon::HTTPError to propagate. 403 response code with HTML content was returned:

image

Would you be interested in rescuing Savon::HTTPError next to Savon::SOAPFault when raise_error is set to false?

Getting Nil in all validate cases

Since this change (#76) on April 17 my service has been getting nil responses from validate/exists requests. I'm getting the same nil responses described in this issue #73, but only after the https change. Are you aware of any issues this change could have caused?

I tried debugging by sending options to override the savon wsdl to the old http value, but still get nil results:

irb(main):022:0> Valvat.new("BG123123123").exists?
=> nil
irb(main):023:0> Valvat::Lookup.validate("DE100")
=> nil
irb(main):024:0> option_http = {savon: {wsdl: "http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl"}}
=> {:savon=>{:wsdl=>"http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl"}}
irb(main):025:0> Valvat.new("BG123123123").exists?(option_http)
=> nil
irb(main):026:0> Valvat::Lookup.validate("DE100", option_http)
=> nil

Testing with VCR doesn't work

There seems to be an issue caused by this line:

rescue => error

When we tried writing specs we were expecting our RSpec environment to complain about uncaught VCR request to VIES API but we've got none.

The VCR error is caught in the rescue all exception block. I think that's not the desired behaviour and we should probably be catching just the Savon errors rather than all StandardErrors.

0.8.2 has breaking changes

Hi!

I know a pre-1.0 lib doesn't strictly need to follow any conventions as far as semver is concerned, but I noticed that tests failed after upgrading to 0.8.2, since it made previously invalid numbers valid (because it normalises them).

So if you want to be semver-like with this lib, maybe that should be a major change (1.0.0?) or at least a minor one (0.9.0) if you want to only consider this a new feature.

We upgrade libs daily and rely on version numbers to get a rough idea about risk of breakage – I didn't assume a tiny upgrade would break specs :)

undefined method `exists?' for #<Valvat XXX>

valvat (0.9.1) lib/active_model/validations/valvat_validator.rb:46:in `vat_exists?'

What I'm trying to accomplish is this:

  • blank is allowed
  • if the country property (which contains the ISO code) is in the EU
    • it should check if the countries match
    • and do a lookup

So EU countries are matched and lookupped and other countries are allowed as well without lookup

validates :taxid, valvat: {match_country: :country, lookup: true, allow_blank: true, if: :eu?}

Periodic Savon::UnknownOperationError when validating VAT

Hi, we use Valvat::Lookup.validate(vat) (1.1.0) to validate VAT numbers. Approximately once per month for a short time period (<15 mins) we see a Savon::UnknownOperationError being raised with the following details:

Unable to find SOAP operation: :check_vat
Operations provided by your service: []

Could this be maintenance or something? I read in the docs then nil is returned, perhaps something changed on the VIES side?

Support for Apple Distribution International in Italy

Hello,

At Quipu, one of the features we offer is helping our users fill tax forms for Spain. One of them ("Modelo 349") includes operations with parties from other European countries, and we validate the checksum for these parties via valvat.

Today we came across Apple Distribution International in Italy, with VAT IT00146089990 (can be found here, under Informazioni aziendali). Following the Italian validations implemented here, we see that the province (digits 7-9, 999 for this specific case) is validated to be either within 1 to 100, 120 or 121.

Nevertheless, Apple Distribution International's is a valid VAT in the VIES website:
image

We can only guess that Italy has the 999 reserved for special occasions like this one, apart from the real provinces already supported by the gem.

Do you know something else about this case? What would be the best way for the gem to support it? We would be more than happy to submit a PR, either supporting the 999 province as well, supporting this specific VAT (does not seem the best way) or another solution you might deem appropriate.

Thanks for your work! ❤️

Add proxy option

After bumping valvat from 1.1.5 to 1.4.0, we cannot set a proxy for the Net::HTTP request. My suggestion is to add proxy option to http option to set proxy for the http client.

Fixed with patch and options

{ open_timeout: 10, read_timeout: 10, proxy: { p_addr: 'proxy_address', p_port: 'proxy_port'} }
class Valvat
  class Lookup
    class Base
      private

      def send_request(uri)
        proxy_options = @options[:http].delete(:proxy)

        if proxy_options
          proxy_args = proxy_options.values_at(:p_addr, :p_port, :p_user, :p_pass).compact
          request = build_request(uri)
          Net::HTTP.start(uri.host, uri.port, *proxy_args, options_for(uri)) do |http|
            http.request(request)
          end
        else
          super
        end
      end
    end
  end
end

Add configuration for Savon timeout

VIES has it's ups and downs. There are periods where it simply takes too long to respond for certain uses. Right now the only way to make a request with custom timeout is something like:

client   = Savon.client open_timeout: 10,
                        read_timeout: 10,
                        wsdl: Valvat::Lookup::VIES_WSDL_URL,
                        log: false
response = Valvat::Lookup::Request.new(Valvat.new vat).perform client

VAT number for testing purposes

Just out of curiosity:

Is there a VAT number that always evaluates to true?

I need it for testing purposes in RSpec.

Currently, I am using my personal VAT number and it serves the purpose well, however it feels messy and not right.

Lookup Returns false positive for cross border transactions

I used the lookup for the VAT number AT 28631905. It returned true and the detailed info did not contain any warnings. When checking manually under http://ec.europa.eu/taxation_customs/vies/vatResponse.html , I get the error:

No, invalid VAT number for cross border transactions within the EU (please refer to FAQ, questions 7, 11, 12, 13 and 20 for more information).

So the VAT ID is valid, but cross border transactions are not allowed. Is there a way of adding this to the detailed response or include in the VAT check?

lookup_spec tests are failing

These seem to get skipped by the Travis build, but I'm getting 6 failures running the tests:

> bundle exec rake spec

Failures:

  1) Valvat::Lookup#validate existing vat number returns true
     Failure/Error: Valvat::Lookup.validate("BE0817331995").should eql(true)

       expected: true
            got: nil

       (compared using eql?)
     # ./spec/valvat/lookup_spec.rb:9:in `block (4 levels) in <top (required)>'

  2) Valvat::Lookup#validate existing vat number allows Valvat instance as input
     Failure/Error: Valvat::Lookup.validate(Valvat.new("BE0817331995")).should eql(true)

       expected: true
            got: nil

       (compared using eql?)
     # ./spec/valvat/lookup_spec.rb:13:in `block (4 levels) in <top (required)>'

  3) Valvat::Lookup#validate not existing vat number returns false
     Failure/Error: Valvat::Lookup.validate("BE08173319921").should eql(false)

       expected: false
            got: nil

       (compared using eql?)
     # ./spec/valvat/lookup_spec.rb:19:in `block (4 levels) in <top (required)>'

  4) Valvat::Lookup#validate with details returns hash of details instead of true
     Failure/Error: Valvat::Lookup.validate("IE6388047V", :detail => true).should eql({

       expected: {:country_code=>"IE", :vat_number=>"6388047V", :request_date=>#<Date: 2013-07-30 ((2456504j,0s,0n),+0s,2299161j)>, :name=>"GOOGLE IRELAND LIMITED", :address=>"1ST & 2ND FLOOR ,GORDON HOUSE ,BARROW STREET ,DUBLIN 4"}
            got: nil

       (compared using eql?)
     # ./spec/valvat/lookup_spec.rb:34:in `block (4 levels) in <top (required)>'

  5) Valvat::Lookup#validate with details still returns false on not existing vat number
     Failure/Error: Valvat::Lookup.validate("BE08173319921", :detail => true).should eql(false)

       expected: false
            got: nil

       (compared using eql?)
     # ./spec/valvat/lookup_spec.rb:52:in `block (4 levels) in <top (required)>'

  6) Valvat::Lookup#validate with request identifier returns hash of details instead of true
     Failure/Error: response[:request_identifier].size.should eql(16)
     NoMethodError:
       undefined method `[]' for nil:NilClass
     # ./spec/valvat/lookup_spec.rb:59:in `block (4 levels) in <top (required)>'

Finished in 0.80245 seconds
317 examples, 6 failures

Failed examples:

rspec ./spec/valvat/lookup_spec.rb:8 # Valvat::Lookup#validate existing vat number returns true
rspec ./spec/valvat/lookup_spec.rb:12 # Valvat::Lookup#validate existing vat number allows Valvat instance as input
rspec ./spec/valvat/lookup_spec.rb:18 # Valvat::Lookup#validate not existing vat number returns false
rspec ./spec/valvat/lookup_spec.rb:33 # Valvat::Lookup#validate with details returns hash of details instead of true
rspec ./spec/valvat/lookup_spec.rb:51 # Valvat::Lookup#validate with details still returns false on not existing vat number
rspec ./spec/valvat/lookup_spec.rb:57 # Valvat::Lookup#validate with request identifier returns hash of details instead of true

Missing dependency rexml?

Hello! Thanks for the great work. It seems that in the latest release the dependency rexml is missing:

remote:  !     Could not detect rake tasks        
remote:  !     ensure you can run `$ bundle exec rake -P` against your app        
remote:  !     and using the production group of your Gemfile.        
remote:  !     rake aborted!        
remote:  !     LoadError: cannot load such file -- rexml        
remote:  !     /tmp/build_7fa4b239/vendor/bundle/ruby/3.1.0/gems/bootsnap-1.13.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'        
remote:  !     /tmp/build_7fa4b239/vendor/bundle/ruby/3.1.0/gems/valvat-1.2.0/lib/valvat/lookup/vies.rb:6:in `<main>'

Somehow it dows not get data from VIES

Somehow the library does not get data from VIES website:

$ irb
1.9.3p286 :001 > require 'valvat'
 => true 
1.9.3p286 :002 > Valvat.new("LU21416127").exists?(:my_vat => "IE6388047V")
 => nil 
1.9.3p286 :003 > Valvat.new("IE6388047V").exists?(:detail => true)
 => nil 
1.9.3p286 :004 > Valvat.new("IE6388047V").exists?
 => nil 
1.9.3p286 :005 > 
$ ruby -v
ruby 1.9.3p286 (2012-10-12 revision 37165) [i686-linux]
$ gem list valvat

*** LOCAL GEMS ***

valvat (0.4.1)

Incorrect spelling

Hi! Could you please change the text for the error messages?

Since VAT is an abbreviation, it would be more appropriate to change incorrect spelling in en.errors.messages.invalid_vat: vat to VAT

https://github.com/yolk/valvat/blob/master/lib/valvat/locales/en.yml#L4

Incompatible with Ruby 2.1.0

Hi!

I tried valvat in a ruby-2.1.0 [ x86_64 ] App, starting the app creates a dump:
Switching back to ruby-2.0.0-p353 [ x86_64 ] resolves the issue as well as removing the gem from the gemfile. That's why I post it here.
Could of course be an Ruby issue as well ...

/home/stefan/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229: [BUG] Segmentation fault at 0x00000000000018
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0026 p:0010 s:0094 e:000091 BLOCK  /home/stefan/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229
c:0025 p:0054 s:0090 e:000089 METHOD /home/stefan/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214
c:0024 p:0015 s:0085 e:000084 METHOD /home/stefan/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229 [FINISH]
c:0023 p:---- s:0080 e:000079 IFUNC 
c:0022 p:---- s:0078 e:000077 CFUNC  :glob
c:0021 p:0049 s:0074 e:000073 TOP    /home/stefan/.rvm/gems/ruby-2.1.0/gems/valvat-0.6.2/lib/valvat/checksum.rb:81 [FINISH]
c:0020 p:---- s:0072 e:000071 CFUNC  :require
c:0019 p:0010 s:0068 e:000067 BLOCK  /home/stefan/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229
c:0018 p:0054 s:0066 e:000065 METHOD /home/stefan/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214
c:0017 p:0015 s:0061 e:000060 METHOD /home/stefan/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229
c:0016 p:0046 s:0056 e:000055 TOP    /home/stefan/.rvm/gems/ruby-2.1.0/gems/valvat-0.6.2/lib/valvat.rb:53 [FINISH]
c:0015 p:---- s:0054 e:000053 CFUNC  :require
c:0014 p:0037 s:0050 e:000049 BLOCK  /home/stefan/.rvm/gems/ruby-2.1.0/gems/bundler-1.5.3/lib/bundler/runtime.rb:76 [FINISH]
c:0013 p:---- s:0047 e:000046 CFUNC  :each
c:0012 p:0055 s:0044 e:000043 BLOCK  /home/stefan/.rvm/gems/ruby-2.1.0/gems/bundler-1.5.3/lib/bundler/runtime.rb:72 [FINISH]
c:0011 p:---- s:0037 e:000036 CFUNC  :each
c:0010 p:0030 s:0034 e:000033 METHOD /home/stefan/.rvm/gems/ruby-2.1.0/gems/bundler-1.5.3/lib/bundler/runtime.rb:61
c:0009 p:0013 s:0030 e:000029 METHOD /home/stefan/.rvm/gems/ruby-2.1.0/gems/bundler-1.5.3/lib/bundler.rb:131
c:0008 p:0130 s:0026 e:000025 TOP    /home/stefan/daten/rails/mercator/config/application.rb:11 [FINISH]
c:0007 p:---- s:0024 e:000023 CFUNC  :require
c:0006 p:0014 s:0020 e:000019 BLOCK  /home/stefan/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/commands.rb:74 [FINISH]
c:0005 p:---- s:0017 e:000016 CFUNC  :tap
c:0004 p:0562 s:0014 e:000013 TOP    /home/stefan/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/commands.rb:71 [FINISH]
c:0003 p:---- s:0008 e:000007 CFUNC  :require
c:0002 p:0045 s:0004 E:000c18 EVAL   script/rails:6 [FINISH]
c:0001 p:0000 s:0002 E:000318 TOP    [FINISH]

-- Ruby level backtrace information ----------------------------------------
script/rails:6:in `<main>'
script/rails:6:in `require'
/home/stefan/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/commands.rb:71:in `<top (required)>'
/home/stefan/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/commands.rb:71:in `tap'
/home/stefan/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/commands.rb:74:in `block in <top (required)>'
/home/stefan/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/commands.rb:74:in `require'
/home/stefan/daten/rails/mercator/config/application.rb:11:in `<top (required)>'
/home/stefan/.rvm/gems/ruby-2.1.0/gems/bundler-1.5.3/lib/bundler.rb:131:in `require'
/home/stefan/.rvm/gems/ruby-2.1.0/gems/bundler-1.5.3/lib/bundler/runtime.rb:61:in `require'
/home/stefan/.rvm/gems/ruby-2.1.0/gems/bundler-1.5.3/lib/bundler/runtime.rb:61:in `each'
/home/stefan/.rvm/gems/ruby-2.1.0/gems/bundler-1.5.3/lib/bundler/runtime.rb:72:in `block in require'
/home/stefan/.rvm/gems/ruby-2.1.0/gems/bundler-1.5.3/lib/bundler/runtime.rb:72:in `each'
/home/stefan/.rvm/gems/ruby-2.1.0/gems/bundler-1.5.3/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
/home/stefan/.rvm/gems/ruby-2.1.0/gems/bundler-1.5.3/lib/bundler/runtime.rb:76:in `require'
/home/stefan/.rvm/gems/ruby-2.1.0/gems/valvat-0.6.2/lib/valvat.rb:53:in `<top (required)>'
/home/stefan/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/home/stefan/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
/home/stefan/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
/home/stefan/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/home/stefan/.rvm/gems/ruby-2.1.0/gems/valvat-0.6.2/lib/valvat/checksum.rb:81:in `<top (required)>'
/home/stefan/.rvm/gems/ruby-2.1.0/gems/valvat-0.6.2/lib/valvat/checksum.rb:81:in `glob'
/home/stefan/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
/home/stefan/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
/home/stefan/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'

-- C level backtrace information -------------------------------------------
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1c4c4c) [0x7f182cef0c4c] vm_dump.c:685
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x72f60) [0x7f182cd9ef60] error.c:307
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(rb_bug+0xb3) [0x7f182cd9fc13] error.c:334
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x146bee) [0x7f182ce72bee] signal.c:704
/lib/x86_64-linux-gnu/libc.so.6(+0x370b0) [0x7f182c99a0b0]
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1afb57) [0x7f182cedbb57] vm_method.c:573
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1b6981) [0x7f182cee2981] vm_method.c:625
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1b8799) [0x7f182cee4799] vm.c:1304
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1b8f23) [0x7f182cee4f23] vm_eval.c:171
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1b9247) [0x7f182cee5247] vm_eval.c:50
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(rb_method_call_with_block+0x111) [0x7f182cdaf8b1] proc.c:1833
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x83a18) [0x7f182cdafa18] proc.c:2297
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1b1c02) [0x7f182ceddc02] vm_insnhelper.c:2091
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(rb_yield+0x25) [0x7f182cee96c5] vm_eval.c:938
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(rb_ary_each+0x52) [0x7f182cd59da2] array.c:1792
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x61c1c) [0x7f182cd8dc1c] dir.c:1900
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1af5b0) [0x7f182cedb5b0] vm_insnhelper.c:1468
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1bbe8d) [0x7f182cee7e8d] vm_insnhelper.c:1558
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1b4a83) [0x7f182cee0a83] insns.def:999
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1b8799) [0x7f182cee4799] vm.c:1304
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(rb_iseq_eval+0x17e) [0x7f182ceeaf4e] vm.c:1549
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x7dd94) [0x7f182cda9d94] load.c:615
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(rb_require_safe+0x54e) [0x7f182cdababe] load.c:644
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1af5b0) [0x7f182cedb5b0] vm_insnhelper.c:1468
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1bbe8d) [0x7f182cee7e8d] vm_insnhelper.c:1558
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1b69e0) [0x7f182cee29e0] insns.def:1050
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1b8799) [0x7f182cee4799] vm.c:1304
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(rb_iseq_eval+0x17e) [0x7f182ceeaf4e] vm.c:1549
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x7dd94) [0x7f182cda9d94] load.c:615
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(rb_require_safe+0x54e) [0x7f182cdababe] load.c:644
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1af5b0) [0x7f182cedb5b0] vm_insnhelper.c:1468
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1b40fa) [0x7f182cee00fa] insns.def:1028
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1b8799) [0x7f182cee4799] vm.c:1304
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(rb_yield+0x25) [0x7f182cee96c5] vm_eval.c:938
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(rb_ary_each+0x52) [0x7f182cd59da2] array.c:1792
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1af5b0) [0x7f182cedb5b0] vm_insnhelper.c:1468
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1b4a83) [0x7f182cee0a83] insns.def:999
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1b8799) [0x7f182cee4799] vm.c:1304
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(rb_yield+0x25) [0x7f182cee96c5] vm_eval.c:938
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(rb_ary_each+0x52) [0x7f182cd59da2] array.c:1792
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1af5b0) [0x7f182cedb5b0] vm_insnhelper.c:1468
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1bbe8d) [0x7f182cee7e8d] vm_insnhelper.c:1558
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1b4a83) [0x7f182cee0a83] insns.def:999
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1b8799) [0x7f182cee4799] vm.c:1304
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(rb_iseq_eval+0x17e) [0x7f182ceeaf4e] vm.c:1549
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x7dd94) [0x7f182cda9d94] load.c:615
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(rb_require_safe+0x54e) [0x7f182cdababe] load.c:644
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1af5b0) [0x7f182cedb5b0] vm_insnhelper.c:1468
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1bbe8d) [0x7f182cee7e8d] vm_insnhelper.c:1558
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1b40fa) [0x7f182cee00fa] insns.def:1028
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1b8799) [0x7f182cee4799] vm.c:1304
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(rb_yield+0x25) [0x7f182cee96c5] vm_eval.c:938
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0xd6e19) [0x7f182ce02e19] object.c:675
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1af5b0) [0x7f182cedb5b0] vm_insnhelper.c:1468
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1bbe8d) [0x7f182cee7e8d] vm_insnhelper.c:1558
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1b4a83) [0x7f182cee0a83] insns.def:999
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1b8799) [0x7f182cee4799] vm.c:1304
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(rb_iseq_eval+0x17e) [0x7f182ceeaf4e] vm.c:1549
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x7dd94) [0x7f182cda9d94] load.c:615
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(rb_require_safe+0x54e) [0x7f182cdababe] load.c:644
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1af5b0) [0x7f182cedb5b0] vm_insnhelper.c:1468
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1bbe8d) [0x7f182cee7e8d] vm_insnhelper.c:1558
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1b40fa) [0x7f182cee00fa] insns.def:1028
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x1b8799) [0x7f182cee4799] vm.c:1304
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(rb_iseq_eval_main+0x1d5) [0x7f182ceeb175] vm.c:1562
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(+0x796fa) [0x7f182cda56fa] eval.c:253
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(ruby_exec_node+0x1d) [0x7f182cda711d] eval.c:318
/home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1(ruby_run_node+0x1c) [0x7f182cda919c] eval.c:310
/home/stefan/.rvm/rubies/ruby-2.1.0/bin/ruby() [0x40088b] main.c:36
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f182c984ea5]
/home/stefan/.rvm/rubies/ruby-2.1.0/bin/ruby() [0x4008b9] main.c:38

* Process memory map:

00400000-00401000 r-xp 00000000 fc:08 799302                             /home/stefan/.rvm/rubies/ruby-2.1.0/bin/ruby
00600000-00601000 r--p 00000000 fc:08 799302                             /home/stefan/.rvm/rubies/ruby-2.1.0/bin/ruby
00601000-00602000 rw-p 00001000 fc:08 799302                             /home/stefan/.rvm/rubies/ruby-2.1.0/bin/ruby
00bfe000-05b3a000 rw-p 00000000 00:00 0                                  [heap]
51197300000-51197335000 rw-p 00000000 00:00 0 
60a5ab00000-60a5ab85000 rw-p 00000000 00:00 0 
cf90c8ff000-cf90c900000 ---p 00000000 00:00 0 
cf90c900000-cf90c905000 rw-p 00000000 00:00 0 
cf90c905000-cf90c906000 ---p 00000000 00:00 0 
cf90c906000-cf90c907000 rwxp 00000000 00:00 0 
cf90c907000-cf90ca00000 ---p 00000000 00:00 0 
cf90ca00000-cf90ca05000 rw-p 00000000 00:00 0 
cf90ca05000-cf90ca06000 ---p 00000000 00:00 0 
cf90ca06000-cf90ca07000 rwxp 00000000 00:00 0 
cf90ca07000-cf90cb00000 ---p 00000000 00:00 0 
cf90cb00000-cf90cb05000 rw-p 00000000 00:00 0 
cf90cb05000-cf90cb06000 ---p 00000000 00:00 0 
cf90cb06000-cf90cbff000 rwxp 00000000 00:00 0 
cf90cbff000-cf92c8ff000 ---p 00000000 00:00 0 
e5b9f49d000-e5b9f49e000 r-xp 00000000 00:00 0 
fae1737e000-fae1737f000 r-xp 00000000 00:00 0 
2168348c7000-2168348c8000 rw-p 00000000 00:00 0 
2168348c8000-216834ac7000 ---p 00000000 00:00 0 
21ab65308000-21ab65309000 r-xp 00000000 00:00 0 
27bb17d23000-27bb17d24000 r-xp 00000000 00:00 0 
286dc030a000-286dc0340000 ---p 00000000 00:00 0 
286dc0340000-286dc0360000 rw-p 00000000 00:00 0 
286dc0360000-286dc036a000 ---p 00000000 00:00 0 
2c04f6000000-2c04f6f00000 ---p 00000000 00:00 0 
2c04f6f00000-2c04f7000000 rw-p 00000000 00:00 0 
2c04f7000000-2c04f8000000 ---p 00000000 00:00 0 
38b70b400000-38b70b425000 rw-p 00000000 00:00 0 
38d044700000-38d044725000 rw-p 00000000 00:00 0 
3f2d64afe000-3f2d64aff000 r-xp 00000000 00:00 0 
7f1820000000-7f1820021000 rw-p 00000000 00:00 0 
7f1820021000-7f1824000000 ---p 00000000 00:00 0 
7f1826532000-7f1826546000 r-xp 00000000 fc:08 397357                     /lib/x86_64-linux-gnu/libgcc_s.so.1
7f1826546000-7f1826746000 ---p 00014000 fc:08 397357                     /lib/x86_64-linux-gnu/libgcc_s.so.1
7f1826746000-7f1826747000 r--p 00014000 fc:08 397357                     /lib/x86_64-linux-gnu/libgcc_s.so.1
7f1826747000-7f1826748000 rw-p 00015000 fc:08 397357                     /lib/x86_64-linux-gnu/libgcc_s.so.1
7f1826748000-7f182682d000 r-xp 00000000 fc:08 534422                     /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17
7f182682d000-7f1826a2c000 ---p 000e5000 fc:08 534422                     /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17
7f1826a2c000-7f1826a34000 r--p 000e4000 fc:08 534422                     /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17
7f1826a34000-7f1826a36000 rw-p 000ec000 fc:08 534422                     /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17
7f1826a36000-7f1826a4b000 rw-p 00000000 00:00 0 
7f1826a4b000-7f1827083000 r-xp 00000000 fc:08 281784                     /home/stefan/.rvm/gems/ruby-2.1.0/extensions/x86_64-linux/2.1.0/therubyracer-0.12.0/v8/init.so
7f1827083000-7f1827282000 ---p 00638000 fc:08 281784                     /home/stefan/.rvm/gems/ruby-2.1.0/extensions/x86_64-linux/2.1.0/therubyracer-0.12.0/v8/init.so
7f1827282000-7f18272ae000 r--p 00637000 fc:08 281784                     /home/stefan/.rvm/gems/ruby-2.1.0/extensions/x86_64-linux/2.1.0/therubyracer-0.12.0/v8/init.so
7f18272ae000-7f18272bf000 rw-p 00663000 fc:08 281784                     /home/stefan/.rvm/gems/ruby-2.1.0/extensions/x86_64-linux/2.1.0/therubyracer-0.12.0/v8/init.so
7f18272bf000-7f18272c3000 rw-p 00000000 00:00 0 
7f18272c3000-7f18272c7000 r-xp 00000000 fc:08 956081                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/racc/cparse.so
7f18272c7000-7f18274c6000 ---p 00004000 fc:08 956081                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/racc/cparse.so
7f18274c6000-7f18274c7000 r--p 00003000 fc:08 956081                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/racc/cparse.so
7f18274c7000-7f18274c8000 rw-p 00004000 fc:08 956081                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/racc/cparse.so
7f18274c8000-7f18274c9000 r-xp 00000000 fc:08 956076                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/digest/md5.so
7f18274c9000-7f18276c8000 ---p 00001000 fc:08 956076                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/digest/md5.so
7f18276c8000-7f18276c9000 r--p 00000000 fc:08 956076                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/digest/md5.so
7f18276c9000-7f18276ca000 rw-p 00001000 fc:08 956076                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/digest/md5.so
7f18276ca000-7f182797a000 r-xp 00000000 fc:08 550209                     /usr/lib/x86_64-linux-gnu/libmysqlclient.so.18.0.0
7f182797a000-7f1827b79000 ---p 002b0000 fc:08 550209                     /usr/lib/x86_64-linux-gnu/libmysqlclient.so.18.0.0
7f1827b79000-7f1827b7f000 r--p 002af000 fc:08 550209                     /usr/lib/x86_64-linux-gnu/libmysqlclient.so.18.0.0
7f1827b7f000-7f1827bfd000 rw-p 002b5000 fc:08 550209                     /usr/lib/x86_64-linux-gnu/libmysqlclient.so.18.0.0
7f1827bfd000-7f1827c02000 rw-p 00000000 00:00 0 
7f1827c02000-7f1827c0d000 r-xp 00000000 fc:08 158596                     /home/stefan/.rvm/gems/ruby-2.1.0/extensions/x86_64-linux/2.1.0/mysql2-0.3.14/mysql2/mysql2.so
7f1827c0d000-7f1827e0c000 ---p 0000b000 fc:08 158596                     /home/stefan/.rvm/gems/ruby-2.1.0/extensions/x86_64-linux/2.1.0/mysql2-0.3.14/mysql2/mysql2.so
7f1827e0c000-7f1827e0d000 r--p 0000a000 fc:08 158596                     /home/stefan/.rvm/gems/ruby-2.1.0/extensions/x86_64-linux/2.1.0/mysql2-0.3.14/mysql2/mysql2.so
7f1827e0d000-7f1827e0e000 rw-p 0000b000 fc:08 158596                     /home/stefan/.rvm/gems/ruby-2.1.0/extensions/x86_64-linux/2.1.0/mysql2-0.3.14/mysql2/mysql2.so
7f1827e0e000-7f1827e0f000 rw-p 00000000 00:00 0 
7f1827e0f000-7f1827e2e000 r-xp 00000000 fc:08 550259                     /usr/lib/x86_64-linux-gnu/libyaml-0.so.2.0.2
7f1827e2e000-7f182802d000 ---p 0001f000 fc:08 550259                     /usr/lib/x86_64-linux-gnu/libyaml-0.so.2.0.2
7f182802d000-7f182802e000 r--p 0001e000 fc:08 550259                     /usr/lib/x86_64-linux-gnu/libyaml-0.so.2.0.2
7f182802e000-7f182802f000 rw-p 0001f000 fc:08 550259                     /usr/lib/x86_64-linux-gnu/libyaml-0.so.2.0.2
7f182802f000-7f1828035000 r-xp 00000000 fc:08 802420                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/psych.so
7f1828035000-7f1828234000 ---p 00006000 fc:08 802420                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/psych.so
7f1828234000-7f1828235000 r--p 00005000 fc:08 802420                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/psych.so
7f1828235000-7f1828236000 rw-p 00006000 fc:08 802420                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/psych.so
7f1828236000-7f1828240000 r-xp 00000000 fc:08 956073                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/json/ext/generator.so
7f1828240000-7f182843f000 ---p 0000a000 fc:08 956073                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/json/ext/generator.so
7f182843f000-7f1828440000 r--p 00009000 fc:08 956073                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/json/ext/generator.so
7f1828440000-7f1828441000 rw-p 0000a000 fc:08 956073                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/json/ext/generator.so
7f1828441000-7f1828442000 r-xp 00000000 fc:08 956133                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/enc/utf_32le.so
7f1828442000-7f1828641000 ---p 00001000 fc:08 956133                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/enc/utf_32le.so
7f1828641000-7f1828642000 r--p 00000000 fc:08 956133                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/enc/utf_32le.so
7f1828642000-7f1828643000 rw-p 00001000 fc:08 956133                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/enc/utf_32le.so
7f1828643000-7f1828644000 r-xp 00000000 fc:08 956088                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/enc/utf_32be.so
7f1828644000-7f1828843000 ---p 00001000 fc:08 956088                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/enc/utf_32be.so
7f1828843000-7f1828844000 r--p 00000000 fc:08 956088                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/enc/utf_32be.so
7f1828844000-7f1828845000 rw-p 00001000 fc:08 956088                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/enc/utf_32be.so
7f1828845000-7f1828846000 r-xp 00000000 fc:08 956127                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/enc/utf_16le.so
7f1828846000-7f1828a46000 ---p 00001000 fc:08 956127                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/enc/utf_16le.so
7f1828a46000-7f1828a47000 r--p 00001000 fc:08 956127                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/enc/utf_16le.so
7f1828a47000-7f1828a48000 rw-p 00002000 fc:08 956127                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/enc/utf_16le.so
7f1828a48000-7f1828a49000 r-xp 00000000 fc:08 956085                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/enc/utf_16be.so
7f1828a49000-7f1828c49000 ---p 00001000 fc:08 956085                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/enc/utf_16be.so
7f1828c49000-7f1828c4a000 r--p 00001000 fc:08 956085                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/enc/utf_16be.so
7f1828c4a000-7f1828c4b000 rw-p 00002000 fc:08 956085                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/enc/utf_16be.so
7f1828c4b000-7f1828c51000 r-xp 00000000 fc:08 956072                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/json/ext/parser.so
7f1828c51000-7f1828e50000 ---p 00006000 fc:08 956072                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/json/ext/parser.so
7f1828e50000-7f1828e51000 r--p 00005000 fc:08 956072                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/json/ext/parser.so
7f1828e51000-7f1828e52000 rw-p 00006000 fc:08 956072                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/json/ext/parser.so
7f1828e52000-7f1828e66000 r-xp 00000000 fc:08 802412                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/bigdecimal.so
7f1828e66000-7f1829066000 ---p 00014000 fc:08 802412                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/bigdecimal.so
7f1829066000-7f1829067000 r--p 00014000 fc:08 802412                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/bigdecimal.so
7f1829067000-7f1829068000 rw-p 00015000 fc:08 802412                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/bigdecimal.so
7f1829068000-7f182906d000 r-xp 00000000 fc:08 802415                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/strscan.so
7f182906d000-7f182926d000 ---p 00005000 fc:08 802415                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/strscan.so
7f182926d000-7f182926e000 r--p 00005000 fc:08 802415                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/strscan.so
7f182926e000-7f182926f000 rw-p 00006000 fc:08 802415                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/strscan.so
7f182926f000-7f18292c2000 r-xp 00000000 fc:08 394358                     /lib/x86_64-linux-gnu/libssl.so.1.0.0
7f18292c2000-7f18294c2000 ---p 00053000 fc:08 394358                     /lib/x86_64-linux-gnu/libssl.so.1.0.0
7f18294c2000-7f18294c5000 r--p 00053000 fc:08 394358                     /lib/x86_64-linux-gnu/libssl.so.1.0.0
7f18294c5000-7f18294cb000 rw-p 00056000 fc:08 394358                     /lib/x86_64-linux-gnu/libssl.so.1.0.0
7f18294cb000-7f18294cc000 rw-p 00000000 00:00 0 
7f18294cc000-7f182951c000 r-xp 00000000 fc:08 802410                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/openssl.so
7f182951c000-7f182971c000 ---p 00050000 fc:08 802410                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/openssl.so
7f182971c000-7f182971d000 r--p 00050000 fc:08 802410                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/openssl.so
7f182971d000-7f182971f000 rw-p 00051000 fc:08 802410                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/openssl.so
7f182971f000-7f1829720000 rw-p 00000000 00:00 0 
7f1829720000-7f1829721000 r-xp 00000000 fc:08 802419                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/fcntl.so
7f1829721000-7f1829920000 ---p 00001000 fc:08 802419                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/fcntl.so
7f1829920000-7f1829921000 r--p 00000000 fc:08 802419                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/fcntl.so
7f1829921000-7f1829922000 rw-p 00001000 fc:08 802419                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/fcntl.so
7f1829922000-7f1829955000 r-xp 00000000 fc:08 802390                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/date_core.so
7f1829955000-7f1829b55000 ---p 00033000 fc:08 802390                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/date_core.so
7f1829b55000-7f1829b56000 r--p 00033000 fc:08 802390                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/date_core.so
7f1829b56000-7f1829b57000 rw-p 00034000 fc:08 802390                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/date_core.so
7f1829b57000-7f1829b59000 rw-p 00000000 00:00 0 
7f1829b59000-7f1829b60000 r-xp 00000000 fc:08 802382                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/stringio.so
7f1829b60000-7f1829d5f000 ---p 00007000 fc:08 802382                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/stringio.so
7f1829d5f000-7f1829d60000 r--p 00006000 fc:08 802382                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/stringio.so
7f1829d60000-7f1829d61000 rw-p 00007000 fc:08 802382                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/stringio.so
7f1829d61000-7f1829d70000 r-xp 00000000 fc:08 802408                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/zlib.so
7f1829d70000-7f1829f6f000 ---p 0000f000 fc:08 802408                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/zlib.so
7f1829f6f000-7f1829f70000 r--p 0000e000 fc:08 802408                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/zlib.so
7f1829f70000-7f1829f71000 rw-p 0000f000 fc:08 802408                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/zlib.so
7f1829f71000-7f1829f98000 r-xp 00000000 fc:08 802391                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/socket.so
7f1829f98000-7f182a198000 ---p 00027000 fc:08 802391                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/socket.so
7f182a198000-7f182a199000 r--p 00027000 fc:08 802391                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/socket.so
7f182a199000-7f182a19a000 rw-p 00028000 fc:08 802391                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/socket.so
7f182a19a000-7f182a19d000 r-xp 00000000 fc:08 802416                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/digest.so
7f182a19d000-7f182a39d000 ---p 00003000 fc:08 802416                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/digest.so
7f182a39d000-7f182a39e000 r--p 00003000 fc:08 802416                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/digest.so
7f182a39e000-7f182a39f000 rw-p 00004000 fc:08 802416                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/digest.so
7f182a39f000-7f182a3b5000 r-xp 00000000 fc:08 397485                     /lib/x86_64-linux-gnu/libz.so.1.2.7
7f182a3b5000-7f182a5b4000 ---p 00016000 fc:08 397485                     /lib/x86_64-linux-gnu/libz.so.1.2.7
7f182a5b4000-7f182a5b5000 r--p 00015000 fc:08 397485                     /lib/x86_64-linux-gnu/libz.so.1.2.7
7f182a5b5000-7f182a5b6000 rw-p 00016000 fc:08 397485                     /lib/x86_64-linux-gnu/libz.so.1.2.7
7f182a5b6000-7f182a767000 r-xp 00000000 fc:08 394357                     /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
7f182a767000-7f182a967000 ---p 001b1000 fc:08 394357                     /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
7f182a967000-7f182a982000 r--p 001b1000 fc:08 394357                     /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
7f182a982000-7f182a98d000 rw-p 001cc000 fc:08 394357                     /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
7f182a98d000-7f182a991000 rw-p 00000000 00:00 0 
7f182a991000-7f182a992000 r-xp 00000000 fc:08 956077                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/digest/sha1.so
7f182a992000-7f182ab91000 ---p 00001000 fc:08 956077                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/digest/sha1.so
7f182ab91000-7f182ab92000 r--p 00000000 fc:08 956077                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/digest/sha1.so
7f182ab92000-7f182ab93000 rw-p 00001000 fc:08 956077                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/digest/sha1.so
7f182ab93000-7f182ab96000 r-xp 00000000 fc:08 802392                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/etc.so
7f182ab96000-7f182ad95000 ---p 00003000 fc:08 802392                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/etc.so
7f182ad95000-7f182ad96000 r--p 00002000 fc:08 802392                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/etc.so
7f182ad96000-7f182ad97000 rw-p 00003000 fc:08 802392                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/etc.so
7f182ad97000-7f182ad9a000 r-xp 00000000 fc:08 802387                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/io/console.so
7f182ad9a000-7f182af99000 ---p 00003000 fc:08 802387                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/io/console.so
7f182af99000-7f182af9a000 r--p 00002000 fc:08 802387                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/io/console.so
7f182af9a000-7f182af9b000 rw-p 00003000 fc:08 802387                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/io/console.so
7f182af9b000-7f182afa2000 r-xp 00000000 fc:08 802393                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/pathname.so
7f182afa2000-7f182b1a1000 ---p 00007000 fc:08 802393                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/pathname.so
7f182b1a1000-7f182b1a2000 r--p 00006000 fc:08 802393                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/pathname.so
7f182b1a2000-7f182b1a3000 rw-p 00007000 fc:08 802393                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/pathname.so
7f182b1a3000-7f182b1a6000 r-xp 00000000 fc:08 802394                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/thread.so
7f182b1a6000-7f182b3a5000 ---p 00003000 fc:08 802394                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/thread.so
7f182b3a5000-7f182b3a6000 r--p 00002000 fc:08 802394                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/thread.so
7f182b3a6000-7f182b3a7000 rw-p 00003000 fc:08 802394                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/thread.so
7f182b3a7000-7f182b3a9000 r-xp 00000000 fc:08 956107                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/enc/trans/transdb.so
7f182b3a9000-7f182b5a9000 ---p 00002000 fc:08 956107                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/enc/trans/transdb.so
7f182b5a9000-7f182b5aa000 r--p 00002000 fc:08 956107                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/enc/trans/transdb.so
7f182b5aa000-7f182b5ab000 rw-p 00003000 fc:08 956107                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/enc/trans/transdb.so
7f182b5ab000-7f182b5ad000 r-xp 00000000 fc:08 956119                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/enc/encdb.so
7f182b5ad000-7f182b7ac000 ---p 00002000 fc:08 956119                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/enc/encdb.so
7f182b7ac000-7f182b7ad000 r--p 00001000 fc:08 956119                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/enc/encdb.so
7f182b7ad000-7f182b7ae000 rw-p 00002000 fc:08 956119                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/ruby/2.1.0/x86_64-linux/enc/encdb.so
7f182b7ae000-7f182c004000 r--p 00000000 fc:08 531536                     /usr/lib/locale/locale-archive
7f182c004000-7f182c107000 r-xp 00000000 fc:08 397599                     /lib/x86_64-linux-gnu/libm-2.17.so
7f182c107000-7f182c307000 ---p 00103000 fc:08 397599                     /lib/x86_64-linux-gnu/libm-2.17.so
7f182c307000-7f182c308000 r--p 00103000 fc:08 397599                     /lib/x86_64-linux-gnu/libm-2.17.so
7f182c308000-7f182c309000 rw-p 00104000 fc:08 397599                     /lib/x86_64-linux-gnu/libm-2.17.so
7f182c309000-7f182c313000 r-xp 00000000 fc:08 397595                     /lib/x86_64-linux-gnu/libcrypt-2.17.so
7f182c313000-7f182c512000 ---p 0000a000 fc:08 397595                     /lib/x86_64-linux-gnu/libcrypt-2.17.so
7f182c512000-7f182c513000 r--p 00009000 fc:08 397595                     /lib/x86_64-linux-gnu/libcrypt-2.17.so
7f182c513000-7f182c514000 rw-p 0000a000 fc:08 397595                     /lib/x86_64-linux-gnu/libcrypt-2.17.so
7f182c514000-7f182c542000 rw-p 00000000 00:00 0 
7f182c542000-7f182c545000 r-xp 00000000 fc:08 397590                     /lib/x86_64-linux-gnu/libdl-2.17.so
7f182c545000-7f182c744000 ---p 00003000 fc:08 397590                     /lib/x86_64-linux-gnu/libdl-2.17.so
7f182c744000-7f182c745000 r--p 00002000 fc:08 397590                     /lib/x86_64-linux-gnu/libdl-2.17.so
7f182c745000-7f182c746000 rw-p 00003000 fc:08 397590                     /lib/x86_64-linux-gnu/libdl-2.17.so
7f182c746000-7f182c75e000 r-xp 00000000 fc:08 397588                     /lib/x86_64-linux-gnu/libpthread-2.17.so
7f182c75e000-7f182c95d000 ---p 00018000 fc:08 397588                     /lib/x86_64-linux-gnu/libpthread-2.17.so
7f182c95d000-7f182c95e000 r--p 00017000 fc:08 397588                     /lib/x86_64-linux-gnu/libpthread-2.17.so
7f182c95e000-7f182c95f000 rw-p 00018000 fc:08 397588                     /lib/x86_64-linux-gnu/libpthread-2.17.so
7f182c95f000-7f182c963000 rw-p 00000000 00:00 0 
7f182c963000-7f182cb22000 r-xp 00000000 fc:08 397602                     /lib/x86_64-linux-gnu/libc-2.17.so
7f182cb22000-7f182cd21000 ---p 001bf000 fc:08 397602                     /lib/x86_64-linux-gnu/libc-2.17.so
7f182cd21000-7f182cd25000 r--p 001be000 fc:08 397602                     /lib/x86_64-linux-gnu/libc-2.17.so
7f182cd25000-7f182cd27000 rw-p 001c2000 fc:08 397602                     /lib/x86_64-linux-gnu/libc-2.17.so
7f182cd27000-7f182cd2c000 rw-p 00000000 00:00 0 
7f182cd2c000-7f182cfaf000 r-xp 00000000 fc:08 799304                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1.0
7f182cfaf000-7f182d1af000 ---p 00283000 fc:08 799304                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1.0
7f182d1af000-7f182d1b4000 r--p 00283000 fc:08 799304                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1.0
7f182d1b4000-7f182d1b8000 rw-p 00288000 fc:08 799304                     /home/stefan/.rvm/rubies/ruby-2.1.0/lib/libruby.so.2.1.0
7f182d1b8000-7f182d1dd000 rw-p 00000000 00:00 0 
7f182d1dd000-7f182d200000 r-xp 00000000 fc:08 393241                     /lib/x86_64-linux-gnu/ld-2.17.so
7f182d2d7000-7f182d3dd000 rw-p 00000000 00:00 0 
7f182d3e7000-7f182d3e8000 rw-p 00000000 00:00 0 
7f182d3e8000-7f182d3e9000 ---p 00000000 00:00 0 
7f182d3e9000-7f182d3f9000 rw-p 00000000 00:00 0                          [stack:20005]
7f182d3f9000-7f182d3fa000 ---p 00000000 00:00 0 
7f182d3fa000-7f182d3ff000 rw-p 00000000 00:00 0                          [stack:20004]
7f182d3ff000-7f182d400000 r--p 00022000 fc:08 393241                     /lib/x86_64-linux-gnu/ld-2.17.so
7f182d400000-7f182d402000 rw-p 00023000 fc:08 393241                     /lib/x86_64-linux-gnu/ld-2.17.so
7fff069bd000-7fff069de000 rw-p 00000000 00:00 0 
7fff069fe000-7fff06a00000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]

Greetings, keep up the good work and thanks for the gem!
Stefan

Bundler::GemNotFound error

After installing valvat and using its validation I get an error "Bundler::GemNotFound: Could not find gyoku-0.4.6 in any of the sources"

Weird thing this is not happening when running tests, but only when running in development under pow.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.