rowland / fb

Firebird Extension Library for Ruby
64 stars 35 forks source link

Cannot install gem with Ruby 2.0 preview... #19

Closed ramsees closed 10 years ago

ramsees commented 11 years ago

Ruby version: ruby 2.0.0dev (2012-11-01 trunk 37411) [i686-linux]

I get this error:

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

    /usr/local/bin/ruby extconf.rb

checking for isc_attach_database() in -lfbclient... yes creating Makefile

make compiling fb.c fb.c: In function ‘tm_from_timestamp’: fb.c:321:22: warning: unused variable ‘tobj’ [-Wunused-variable] fb.c: In function ‘fb_cursor_set_inputparams’: fb.c:1503:7: warning: variable ‘type’ set but not used [-Wunused-but-set-variable] linking shared-object fb.so

make install /usr/bin/install -c -m 0755 fb.so /usr/local/lib/ruby/gems/2.0.0/gems/fb-0.7.0/. /usr/bin/install: fb.so' and/usr/local/lib/ruby/gems/2.0.0/gems/fb-0.7.0/./fb.so' are the same file make: *\ [install-so] Error 1

Gem files will remain installed in /usr/local/lib/ruby/gems/2.0.0/gems/fb-0.7.0 for inspection. Results logged to /usr/local/lib/ruby/gems/2.0.0/gems/fb-0.7.0/./gem_make.out

mariuz commented 11 years ago

I wanted to mention it too now that ruby 2.0.0 is final

rowland commented 11 years ago

I'm only just getting my production apps to Ruby 1.9.3. Haven't had a chance to check out Ruby 2.0.

I'd be happy to see a pull request...

ramsees commented 11 years ago

The problem is in the gem specification

changing the line in the extconf.rb file

create_makefile("fb")

for

create_makefile("fb", "fb")

will make it build, but the gem won't work.

ramsees commented 11 years ago

I just wan't to add that the gem works even after showing the errors, the only caveat is that you won't get the documentation installed.

ramsees commented 10 years ago

Closed because the bug was in Ruby Gems and is fixed now.