मैं एक सी एक्सटेंशन के चारों ओर एक रूबी मणि बनाने की कोशिश कर रहा हूं। सी एक्सटेंशन ruby extconf.rb; make; sudo make install
दिनचर्या का उपयोग करके ठीक से संकलित करता है, लेकिन जब मैं रेक का उपयोग करके एक मणि बनाने की कोशिश करता हूं, तो प्रक्रिया इस ट्रेस के नीचे त्रुटि के साथ समाप्त होती है।मणि निष्पादित करते समय ... ["extconf.rb", ...] फ़ाइलें नहीं हैं
मैं मणि बनाने के लिए, उसी निर्देशिका संरचना के साथ here पोस्ट का उपयोग कर रहा हूं।
मेरी कॉन्फ़िगरेशन में क्या गलत है? मेरा रत्नपेक और रेकैकाइल ट्रेस के नीचे हैं (मणि को नेट कॉन्फ कहा जाता है)।
// ट्रेस
** Execute copy:netconf:i686-linux:1.9.2
install -c tmp/i686-linux/netconf/1.9.2/netconf.so lib/netconf/netconf.so
** Execute compile:netconf:i686-linux
** Execute compile:i686-linux
** Execute compile
** Invoke chmod (first_time)
** Execute chmod
** Execute build
rake aborted!
ERROR: While executing gem ... (Gem::InvalidSpecificationException)
["extconf.rb", "netconf.o", "netconf.so"] are not files
// netconf.gemspec
# -*- encoding: utf-8 -*-
$:.push File.expand_path("../lib", __FILE__)
require "netconf/version"
Gem::Specification.new do |s|
s.name = "netconf"
s.version = Netconf::VERSION
s.authors = ["..."]
s.email = ["..."]
s.homepage = "..."
s.summary = %q{A tool to access and write Ubuntu network configuration}
s.description = %q{Uses ifconfig and other C system calls to access network configurations on a Ubuntu install.}
s.rubyforge_project = "netconf"
s.files = `git ls-files`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]
s.extensions = ["ext/netconf/extconf.rb"]
end
// Rakefile
require 'rake'
require 'rake/extensiontask'
require 'bundler'
Rake::ExtensionTask.new("netconf") do |extension|
extension.lib_dir = "lib/netconf"
end
task :chmod do
File.chmod(0775, 'lib/netconf/netconf.so')
end
task :build => [:clean, :compile, :chmod]
Bundler::GemHelper.install_tasks
[यह] (http://stackoverflow.com/questions/1314827/how-do-i-wrap-up-a-ruby-c-extension-in-a-ruby-gem) प्रासंगिक –
हो सकता है I उस सवाल को देखा; फिर भी आगाह करने के लिए धन्यवाद। मैं रेक-कंपाइलर का उपयोग कर रहा हूं, लेकिन मुझे इस विशेष त्रुटि पर कोई जानकारी नहीं मिली है (और मुझे पूरा यकीन है कि मुझे एक देशी सी एक्सटेंशन चाहिए/क्योंकि मैं एक एम्बेडेड प्लेटफार्म को लक्षित कर रहा हूं)। –