2

I'm getting error while trying to install sqlite3-ruby gem:

gem install sqlite3-ruby-1.3.1.gem 
Building native extensions.  This could take a while...
ERROR:  Error installing sqlite3-ruby-1.3.1.gem:
        ERROR: Failed to build gem native extension.

/usr/bin/ruby.exe extconf.rb


Gem files will remain installed in /usr/lib/ruby/gems/1.9.1/gems/sqlite3-ruby-1.3.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.9.1/gems/sqlite3-ruby-1.3.1/ext/sqlite3/gem_make.out

Same using:

gem install sqlite3-ruby-1.3.1

And that worked:

gem install sqlite3-ruby-1.3.1-x86-mswin32-60.gem

However I discovered I had had installed sqlite-ruby-1.2.5

Well my question is how 'gem' is installing these things? Why it can't choose sqlite3-ruby-1.3.1-x86-mswin32-60.gem version automatically. Does 'gem' is aware of running on linux or windows? What is native extension for it and why it is failing to install predownloaded sqlite3-ruby-1.3.1.gem

Thanks in advance

l245c4l
  • 4,135
  • 9
  • 35
  • 40

2 Answers2

0

Lots of people seem to be having this issue. I'm surprised this doesn't work out of the box, as I would have guessed cygwin+ruby+sqlite is a supercommon configuration. Anyway. Many people concentrate on sqlite3.h, which is what appears are missing in the error output. However, my problem was that gcc wasn't installed correctly. Apparently gcc can fail to install correctly under cygwin. I fixed that and it was fine. Also, make sure you install libsql3-devel in cygwin.

omerkudat
  • 9,371
  • 4
  • 33
  • 42
-2

I've been down this road before. I failed installing Ruby in Windows to work with Cygwin and I failed on Ubuntu.

What you do to save yourself the time and trouble is get a VM running with a Linux image (Fedora seemed to work well) and work with Ruby in that.

Community
  • 1
  • 1
emptyset
  • 3,164
  • 4
  • 26
  • 33