I started to learn ruby recently. I trying to use a library pHash on ruby for my own project. I trying during for 2 days, but I don't understand what I'm doing wrong.I included old and new versions library, I installed in local directory and home directory. I got constantly error on compile ruby and in command line ubuntu. At last I tried to use a bundler/inline and got next error.
Code here:
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'pHash', require: 'ffi'
gem 'rspec', require: false
end
Phash::Text.new('first.txt') % Phash::Text.new('second.txt')
The last line I take from documentation.
require: 'ffi'
seems unlikely to do what you need... and indeed the examples in the documentation all include a specific require
call first. The one you referenced looks like this in full:
require 'phash/text'
Phash::Text.new('first.txt') % Phash::Text.new('second.txt')
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.