A few months ago I was playing with Golang, and I checked possible solutions for reading the barcode images. From my experience, Ruby is lacking with its solution, but PHP and GO have elegant solutions. In GO language, it is necessary to import:

fmt
gopkg.in/bieber/barcode.v0
image/jpeg
os

and below you can see one example:

package main
import (
"fmt"
"gopkg.in/bieber/barcode.v0"
"image/jpeg"
"os"
)

func main() {
fin, _ := os.Open("barcode2.jpg")
defer fin.Close()
src, _ := jpeg.Decode(fin)

        img := barcode.NewImage(src)
        scanner := barcode.NewScanner().
                SetEnabledAll(true)

        symbols, _ := scanner.ScanImage(img)
        for _, s := range symbols {
                fmt.Println(s.Type.Name(), s.Data, s.Quality, s.Boundary)
        }
}

I tested with the image which is taken from a mobile phone: Mobile phone image

Result was:

Barcode result