Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 502 Vote(s) - 3.52 Average
  • 1
  • 2
  • 3
  • 4
  • 5
While executing gem ... ["extconf.rb", ...] are not files

#1
I'm trying to build a ruby gem around a C extension. The C extension compiles fine using the `ruby extconf.rb; make; sudo make install` routine, but when I try to build a gem using rake, the process terminates with the error at the bottom of this trace.

I'm using the post [here][1], with the same directory structure, to create the gem.

What's wrong with my configuration? My gemspec and Rakefile are below the trace (the gem is called netconf).

// Trace

** 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

[1]:

[To see links please register here]

Reply

#2
FWIW, I had a similar issue where

s.files = `git ls-files`.split("\n")

was

s.files = `git ls-files`.split('\n')

, where the single quotes were preventing the file list from splitting properly. Changing to double quotes fixed the issue for me.
Reply

#3
I got this error because I hadn't commited my updates with git yet.

s.files = `git ls-files`.split("\n")

That line is directly using git, and probably causing this error. Just do

git add .
git commit -a -m "init"
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through