'nmake' is not recognized as an internal or external command
程序员文章站
2022-05-26 20:42:44
...
在window上安装sqlite3
gem install sqlite3-ruby
报如下错误:
于是按如下命令安装
gem install sqlite3-ruby --platform Win32
还是报错。
[b]解决办法:[/b]
列出所有sqlite
执行如下命令即可:
gem install sqlite3-ruby -v 1.2.3
gem install sqlite3-ruby
报如下错误:
Building native extensions. This could take a while...
ERROR: Error installing sqlite3-ruby:
ERROR: Failed to build gem native extension.
c:/ruby/bin/ruby.exe extconf.rb install sqlite3-ruby --platform Win32
checking for fdatasync() in rt.lib... no
checking for sqlite3.h... no
nmake
'nmake' is not recognized as an internal or external command,
operable program or batch file.
Gem files will remain installed in c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.4 for inspection.
Results logged to c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.4/ext/sqlite3_api/gem_make.out
于是按如下命令安装
gem install sqlite3-ruby --platform Win32
还是报错。
[b]解决办法:[/b]
列出所有sqlite
gem list --remote --all sqlite
*** REMOTE GEMS ***
sqlite (2.0.1, 2.0.0, 1.3.1, 1.3.0, 1.2.9.1, 1.2.0, 1.1.3, 1.1.2, 1.1.1, 1.1)
sqlite-ruby (2.2.3, 2.2.2, 2.2.1, 2.2.0, 2.1.0, 2.0.3, 2.0.2)
sqlite3-ruby (1.2.4, 1.2.3, 1.2.2, 1.2.1, 1.2.0, 1.1.0, 1.0.1, 1.0.0, 0.9.0, 0.6.0, 0.5.0)
执行如下命令即可:
gem install sqlite3-ruby -v 1.2.3