【发布时间】:2015-07-01 01:12:31
【问题描述】:
我正在学习Rails Tutorial的rails教程
使用 Mac 操作系统
当我尝试bin/rails server 命令时,我得到以下错误。
bin/rails server
Could not find gem 'uglifier (>= 1.3.0) ruby' in any of the gem sources listed in your Gemfile or installed on this machine.
Run `bundle install` to install missing gems.
当我成功尝试bundle install 命令时,我得到了以下问题。
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for sqlite3.h... yes
checking for sqlite3_libversion_number() in -lsqlite3... no
sqlite3 is missing. Try 'port install sqlite3 +universal',
'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'
and check your shared library search path (the
location where your sqlite3 shared library is located).
*** 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.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
--with-sqlite3-dir
--without-sqlite3-dir
--with-sqlite3-include
--without-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib
--without-sqlite3-lib=${sqlite3-dir}/
--with-sqlite3lib
--without-sqlite3lib
Gem files will remain installed in /Users/lloyd/dev/projects/blog/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.10 for inspection.
Results logged to /Users/lloyd/dev/projects/blog/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.10/ext/sqlite3/gem_make.out
An error occurred while installing sqlite3 (1.3.10), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.10'` succeeds before bundling.
我尝试过系统安装、供应商安装。甚至尝试使用 homebrew 安装 sqlite3 。 . . . .没有任何效果
我该如何解决这个问题并继续前进?
【问题讨论】:
-
试试
'port install sqlite3 +universal'、'yum install sqlite-devel'或'apt-get install libsqlite3-dev' -
试过了。不工作。如何在 Mac os 中使用 port / yum / apt-get ?
-
是的,这也是我所怀疑的。我尝试了
brew install sqlite3和brew install sqlite。仍然没有进展。 Brew 用以下Mac OS X already provides this software and installing another version in parallel can cause all kinds of trouble.和Generally there are no consequences of this for you. If you build your own software and it requires this formula, you'll need to add to your build variables: LDFLAGS: -L/usr/local/opt/sqlite/lib CPPFLAGS: -I/usr/local/opt/sqlite/include警告我
标签: ruby-on-rails sqlite