Error Installing Sqlite3-ruby Cygwin
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Problem installing sqlite3-ruby on cygwin up vote 2 down vote favorite 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 cygwin sqlite3-ruby share|improve this question asked Aug 1 '10 at 23:47 l245c4l 1,43962238 add a comment| 2 Answers 2 active oldest votes up vote 0 down vote 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. share|improve this answer answered Dec 29
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Failed to build native gem extension sqlite3 up vote 0 down vote favorite I'm trying to install sqlite3-ruby on Cygwin with gem install sqlite3-ruby -v x.x.x and http://stackoverflow.com/questions/3384191/problem-installing-sqlite3-ruby-on-cygwin I get the following error: Building native extensions. This could take a while... ERROR: Error installing sqlite3-ruby: ERROR: Failed to build gem native extension. /usr/bin/ruby.exe extconf.rb checking for fdatasync() in -lrt... *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Does anyone know how to install sqlite3 for Ruby on Rails on Cygwin. As I http://stackoverflow.com/questions/23678521/failed-to-build-native-gem-extension-sqlite3 understand it the SQLite RubyGem isn't actually a *Ruby*Gem, it's a "*C*Gem", IOW it's written in C. This means it has to be compiled and linked to the Ruby interpreter when you install it, so any help? ruby-on-rails ruby sqlite sqlite3 share|improve this question edited May 15 '14 at 12:48 asked May 15 '14 at 12:40 Ian Wambai 7512 here is your answer stackoverflow.com/questions/43778/… –matanco May 15 '14 at 12:53 You say you're using -v x.x.x. You should make sure that version includes an windows build. For example, I have sqlite 3 1.3.9 x86-mingw32 on my machine. I used gem install sqlite3. –Cereal May 15 '14 at 12:56 I get the same ERROR: Failed to build gem native extension. with every sqlite3-ruby gem I try to install –Ian Wambai May 15 '14 at 13:11 add a comment| 2 Answers 2 active oldest votes up vote 0 down vote So this isn't a complete solution as I don't have a windows box and cygwin handy but the error message suggests that the linux utility fdatasync can't be found. The tools linux man page can be found here http://linux.die.net/man/2/fdatasync Maybe find out if you have fdatasync installed correctly and try again. share|improve this answer answered May 15 '14 at 12:59 Han Loong Liauw 25623 Is there a command I can use to c
Sign in Pricing Blog Support Search GitHub This repository Watch 16 Star 323 Fork 114 sparklemotion/sqlite3-ruby Code Issues 15 Pull requests 8 Projects 0 Pulse https://github.com/sparklemotion/sqlite3-ruby/issues/82 Graphs New issue Unable to install sqlite3 for Ruby2.0.0 on Windows 7 #82 Closed yuumi3 opened this Issue Feb 26, 2013 · 26 comments Projects None yet Labels None http://garbagetown.hatenablog.com/entry/2016/01/22/113339 yet Milestone No milestone Assignees No one assigned 11 participants yuumi3 commented Feb 26, 2013 C:\Ruby200\DevKit>gem install sqlite3 Fetching: sqlite3-1.3.7.gem (100%) Temporarily enhancing PATH to include DevKit... Building error installing native extensions. This could take a while... ERROR: Error installing sqlite3: ERROR: Failed to build gem native extension. C:/Ruby200/bin/ruby.exe extconf.rb checking for sqlite3.h... no sqlite3.h is missing. Install SQLite3 from http://www.sqlite.org/ first. *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need error installing sqlite3-ruby configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include …. --without-sqlite3-lib=${sqlite3-dir}/ --enable-local --disable-local Gem files will remain installed in C:/Ruby200/lib/ruby/gems/2.0.0/gems/sqlite3-1 .3.7 for inspection. Results logged to C:/Ruby200/lib/ruby/gems/2.0.0/gems/sqlite3-1.3.7/ext/sqlite3/ gem_make.out and C:\Ruby200\DevKit>gem environment RubyGems Environment: - RUBYGEMS VERSION: 2.0.0 - RUBY VERSION: 2.0.0 (2013-02-24 patchlevel 0) [i386-mingw32] - INSTALLATION DIRECTORY: C:/Ruby200/lib/ruby/gems/2.0.0 - RUBY EXECUTABLE: C:/Ruby200/bin/ruby.exe - EXECUTABLE DIRECTORY: C:/Ruby200/bin - RUBYGEMS PLATFORMS: - ruby - x86-mingw32 - GEM PATHS: - C:/Ruby200/lib/ruby/gems/2.0.0 - C:/Users/yy/.gem/ruby/2.0.0 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :backtrace => false - :bulk_threshold => 1000 - REMOTE SOURCES: - http://rubygems.org/ Sparkle Motion member luislavena commented Feb 26, 2013 @yuumi3 looks like you don't have the sqlite3 headers and libs that are required to install sqlite3 gem from source. The pre-compiled binary for x86-mingw32 do not include binaries for Ruby 2.0, so I guess you installed with --platform=ruby. You should obtain the headers and libraries for sqlite3 and use build arguments: gem install sqlite3 --platform=ruby -- --with-sqlite3-dir=C:/path/to/sqlite3 Where C:/path/to/sqlite3 is where the headers (include) and libs (lib) for sqlite3 are extracted. Hope that helps. luislavena closed this Feb
限定公開記事のため引用できません。 読者です 読者をやめる 読者になる 読者になる garbagetown 個人の日記です 2016-01-22 cygwin で rails する 職場のウインドーズで rails したいんだけどコマンドプロンプトが大嫌いなのでイバラの道とは知りつつ cygwin で rails してみた。 なお、過去の経験上、生の cygwin は rails どころか ruby を入れるだけで二人月くらい掛かるので、昨年からもともと ruby が入っている gnupack に oh-my-zsh を入れて使っている。 gnupack Users Guide 以下、作業ログ。いつか誰か (三ヶ月後の自分を含む) がググるかもしれないので、長いけどエラーログもすべて貼る。 gem ruby は 2.2.2 が入っていた。意識低めなので今のところ rbenv は使わない。 gem が入っていなかったので apt-cyg でさくっとインストールする。 $ ruby -v ruby 2.2.2p95 (2015-04-13 revision 50295) [i386-cygwin] $ gem -v zsh: command not found: gem $ apt-cyg install rubygems (snip) Package ruby-rdoc installed Package ca-certificates is already installed, skipping Package cygwin is already installed, skipping Package rubygems installed $ gem -v 2.4.8 rails どうせどこかで失敗するんだろうなと予感しつつ rails を入れたら、お馴染みの nokogiri でコケた。 $ gem install rails -v 4.2.2 (snip) Fetching: nokogiri-1.6.7.2.gem (100%) Building native extensions. This could take a while... ERROR: Error installing rails: ERROR: Failed to build gem native extension. /usr/bin/ruby.exe -r ./siteconf20160121-1180-1s3cu4.rb extconf.rb checking if the C compiler accepts ... *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and