RVM, ошибки Rails - PullRequest
       6

RVM, ошибки Rails

2 голосов
/ 18 октября 2010

Я установил RVM, затем использовал его для установки ruby-1.9.2, а затем использовал rubygems для установки rails 3.0.Это позволяет мне создавать новое приложение, но затем, когда я перехожу в корень приложения и пытаюсь сгенерировать скаффолд, я получаю эту ошибку:

Could not find gem 'sqlite3-ruby (>= 0, runtime)' in any of the gem sources.
Try running `bundle install`.

Итак, я запустил 'bundle install' и все выглядело нормально для установкипока он не добрался до sqlite3-ruby и дал мне это огромное сообщение об ошибке:

Installing sqlite3-ruby (1.3.1) with native extensions /home/connor/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems/installer.rb:483:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

/home/connor/.rvm/rubies/ruby-1.9.2-p0/bin/ruby extconf.rb 
checking for sqlite3.h... no
sqlite3.h is missing. Try 'port install sqlite3 +universal' or 'yum install sqlite3-devel'
*** 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=/home/connor/.rvm/rubies/ruby-1.9.2-p0/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}/lib


Gem files will remain installed in /home/connor/.rvm/gems/ruby-1.9.2-p0/gems/sqlite3-ruby-1.3.1 for inspection.
Results logged to /home/connor/.rvm/gems/ruby-1.9.2-p0/gems/sqlite3-ruby-1.3.1/ext/sqlite3/gem_make.out
from /home/connor/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems/installer.rb:486:in `block in build_extensions'
from /home/connor/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems/installer.rb:446:in `each'
from /home/connor/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems/installer.rb:446:in `build_extensions'
from /home/connor/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems/installer.rb:198:in `install'
from /home/connor/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.3/lib/bundler/source.rb:100:in `install'
from /home/connor/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.3/lib/bundler/installer.rb:55:in `block in run'
from /home/connor/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.3/lib/bundler/spec_set.rb:12:in `block in each'
from /home/connor/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.3/lib/bundler/spec_set.rb:12:in `each'
from /home/connor/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.3/lib/bundler/spec_set.rb:12:in `each'
from /home/connor/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.3/lib/bundler/installer.rb:44:in `run'
from /home/connor/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.3/lib/bundler/installer.rb:8:in `install'
from /home/connor/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.3/lib/bundler/cli.rb:221:in `install'
from /home/connor/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.3/lib/bundler/vendor/thor/task.rb:22:in `run'
from /home/connor/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.3/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /home/connor/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.3/lib/bundler/vendor/thor.rb:246:in `dispatch'
from /home/connor/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.3/lib/bundler/vendor/thor/base.rb:389:in `start'
from /home/connor/.rvm/gems/ruby-1.9.2-p0@global/gems/bundler-1.0.3/bin/bundle:13:in `<top (required)>'
from /home/connor/.rvm/gems/ruby-1.9.2-p0@global/bin/bundle:19:in `load'
from /home/connor/.rvm/gems/ruby-1.9.2-p0@global/bin/bundle:19:in `<main>'

Кто-нибудь знает, что вызывает эти ошибки?РВМ

1 Ответ

6 голосов
/ 18 октября 2010

Нет, это не вина RVM.Это означает, что у вас не установлена ​​библиотека SQLite3.

/home/connor/.rvm/rubies/ruby-1.9.2-p0/bin/ruby extconf.rb 
checking for sqlite3.h... no
sqlite3.h is missing. Try 'port install sqlite3 +universal' or 'yum install sqlite3-devel'
*** 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.

Вам необходимо установить библиотеку SQLite3 и заголовок разработки, чтобы скомпилировать и установить гем SQLite.

...