Ruby on rails 当我在Rails中创建一个新项目时,我遇到了这个错误

Ruby on rails 当我在Rails中创建一个新项目时,我遇到了这个错误,ruby-on-rails,ruby,Ruby On Rails,Ruby,如何删除此错误?如何安装捆绑包 root@jaskaran:/var/www/app# rails new blogs Could not find gem 'sqlite3 (>= 0) ruby' in the gems available on this machine. Run `bundle install` to install missing gems. root@jaskaran:/var/www/app# rails new here Could not find gem

如何删除此错误?如何安装捆绑包

root@jaskaran:/var/www/app# rails new blogs
Could not find gem 'sqlite3 (>= 0) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.
root@jaskaran:/var/www/app# rails new here
Could not find gem 'sqlite3 (>= 0) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.
root@jaskaran:/var/www/app# ^C
root@jaskaran:/var/www/app# http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/
bash: http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/: No such file or directory
root@jaskaran:/var/www/app# bundle install
Fetching gem metadata from https://rubygems.org/..........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Using rake 10.2.2
Using i18n 0.6.9
Using minitest 4.7.5
Using multi_json 1.9.2
Using atomic 1.1.16
Using thread_safe 0.3.1
Using tzinfo 0.3.39
Using activesupport 4.0.2
Using builder 3.1.4
Using erubis 2.7.0
Using rack 1.5.2
Using rack-test 0.6.2
Using actionpack 4.0.2
Using mime-types 1.25.1
Using polyglot 0.3.4
Using treetop 1.4.15
Using mail 2.5.4
Using actionmailer 4.0.2
Using activemodel 4.0.2
Using activerecord-deprecated_finders 1.0.3
Using arel 4.0.2
Using activerecord 4.0.2
Using bundler 1.6.0
Using coffee-script-source 1.7.0
Using execjs 2.0.2
Using coffee-script 2.2.0
Using thor 0.19.1
Using railties 4.0.2
Using coffee-rails 4.0.1
Using hike 1.2.3
Using jbuilder 1.5.3
Using jquery-rails 3.1.0
Using json 1.8.1
Using tilt 1.4.1
Using sprockets 2.11.0
Using sprockets-rails 2.0.1
Using rails 4.0.2
Using rdoc 4.1.1
Using sass 3.2.18
Using sass-rails 4.0.2
Using sdoc 0.4.0

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /usr/bin/ruby1.9.1 extconf.rb 
checking for sqlite3.h... no
sqlite3.h 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=/usr/bin/ruby1.9.1
    --with-sqlite3-dir
    --without-sqlite3-dir
    --with-sqlite3-include
    --without-sqlite3-include=${sqlite3-dir}/include
    --with-sqlite3-lib
    --without-sqlite3-lib=${sqlite3-dir}/lib
    --enable-local
    --disable-local


Gem files will remain installed in /var/lib/gems/1.9.1/gems/sqlite3-1.3.9 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/sqlite3-1.3.9/ext/sqlite3/gem_make.out
An error occurred while installing sqlite3 (1.3.9), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.9'` succeeds before bundling.

缺少sqlite3.h。尝试“端口安装sqlite3+通用”, “yum install sqlite devel”或“apt get install libsqlite 3 dev”


你试过这个吗?您可能需要在终端上运行
sudo
下的命令

sudo apt get install libsqlite3 dev

这应该可以:

sudo apt-get install sqlite3 libsqlite3-dev

bundle install

捆绑包已安装。问题在于SQLite。错误消息给出了一些建议。您尝试过这些吗?它就在错误消息中:尝试“port install sqlite3+universal”、“yum install sqlite devel”或“apt get install libsqlite3-dev”,结果如何?尝试时出现了什么问题?然后出现了什么错误?是否执行了
yum安装sqlite-devel