使用Mac OS
当我尝试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.
我尝试过系统安装,供应商安装。甚至尝试使用自制软件安装sqlite3。 。 。 。 。什么都不行
我如何解决这个问题并继续前进?
答案 0 :(得分:-1)
我也有这个问题。我终于更改了Gemfile中的源代码来修复它:
# source 'https://rubygems.org'
source 'https://ruby.taobao.org/'
您的错误信息:
安装sqlite3(1.3.10)和Bundler时发生错误 无法继续。确保
gem install sqlite3 -v '1.3.10'
在捆绑之前成功。
Bunder无法继续,像这样的maby。