Giter Club home page Giter Club logo

zipruby's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

zipruby's Issues

constant VERSION

/usr/local/rvm/gems/ruby-1.9.3-p392/gems/zipruby-0.3.6/lib/zipruby.so: warning: already initialized constant VERSION

CSV.foreach for csv files inside of Archive

My code:

Zip::Archive.open(file.path) do |archive|
      archive.each do |inner_file|
        file_name = inner_file.name.split('.')[0]

        CSV.parse(inner_file.read, headers: :first_line) do |row|
          -----
          some_code
          -----
        end
      end
    end

But I'd like to use CSV.foreach for that file content, but cannot get it working.. any suggestion?

mkstemp.c:69:8: error: implicit declaration of function 'getpid' is invalid in C99 [-Werror,-Wimplicit-function-declaration]

Hi all.
I'm trying to install zipruby via gem (on mac),

$ gem install zipruby -v 0.3.6

but I get the following error

Building native extensions. This could take a while...
ERROR:  Error installing zipruby:
	ERROR: Failed to build gem native extension.

    current directory: /Users/USER/.rvm/gems/ruby-2.5.5@go/gems/zipruby-0.3.6/ext
/Users/USER/.rvm/rubies/ruby-2.5.5/bin/ruby -I /Users/USER/.rvm/rubies/ruby-2.5.5/lib/ruby/site_ruby/2.5.0 -r ./siteconf20200924-5575-jr6479.rb extconf.rb
checking for zlib.h... yes
checking for -lz... yes
checking for fseeko()... yes
checking for ftello()... yes
checking for mkstemp()... yes
creating Makefile

current directory: /Users/USER/.rvm/gems/ruby-2.5.5@go/gems/zipruby-0.3.6/ext
make "DESTDIR=" clean

current directory: /Users/USER/.rvm/gems/ruby-2.5.5@go/gems/zipruby-0.3.6/ext
make "DESTDIR="
compiling mkstemp.c
mkstemp.c:69:8: error: implicit declaration of function 'getpid' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        pid = getpid();
              ^
1 error generated.
make: *** [mkstemp.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/USER/.rvm/gems/ruby-2.5.5@go/gems/zipruby-0.3.6 for inspection.
Results logged to /Users/USER/.rvm/gems/ruby-2.5.5@go/extensions/x86_64-darwin-19/2.5.0/zipruby-0.3.6/gem_make.out

Tried fixing by including unistd.h in mkstemp.c, which lets me compile the code, but I'm not sure it's the right way.

Appreciate your help!

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.