开发者

Problem installing sqlite3-ruby on cygwin

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 sqli开发者_StackOverflow中文版te3-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


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜