私はrvmを試していて、それにruby 1.9.2とレール3をインストールしました。私はsqlite3-ruby gemを再インストールする必要があります(rvmはrubyのバージョンごとにすべてのgemを別々に保つので)。Rails 3はrvmでsqlite3-ruby gemをインストールしませんか?
問題は、私がしようとしたとき、私は取得するには、次のとおりです。
gem install sqlite3-ruby
/home/jenny/.rvm/rubies/ruby-1.9.2-p0/bin/gem:4: warning: Insecure world writable dir /home/jenny/.rvm/gems/ruby-1.9.2-p0/bin in PATH, mode 040777
Building native extensions. This could take a while...
ERROR: Error installing sqlite3-ruby:
ERROR: Failed to build gem native extension.
/home/jenny/.rvm/rubies/ruby-1.9.2-p0/bin/ruby extconf.rb
checking for sqlite3.h... yes
checking for sqlite3_libversion_number() in -lsqlite3... yes
checking for rb_proc_arity()... yes
checking for sqlite3_initialize()... yes
checking for sqlite3_next_stmt()... yes
checking for sqlite3_column_database_name()... yes
checking for sqlite3_enable_load_extension()... no
checking for sqlite3_load_extension()... no
creating Makefile
make
gcc -I. -I/home/jenny/.rvm/rubies/ruby-1.9.2-p0/include/ruby-1.9.1/i686-linux -I/home/jenny/.rvm/rubies/ruby-1.9.2-p0/include/ruby-1.9.1/ruby/backward -I/home/jenny/.rvm/rubies/ruby-1.9.2-p0/include/ruby-1.9.1 -I. -DHAVE_RB_PROC_ARITY -DHAVE_SQLITE3_INITIALIZE -DHAVE_SQLITE3_NEXT_STMT -DHAVE_SQLITE3_COLUMN_DATABASE_NAME -I/usr/local/include -I/opt/local/include -I/sw/local/include -I/usr/include -D_FILE_OFFSET_BITS=64 -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC -o exception.o -c exception.c
In file included from ./sqlite3_ruby.h:42,
from exception.c:1:
./backup.h:7: error: expected specifier-qualifier-list before ‘sqlite3_backup’
make: *** [exception.o] Error 1
私は本当にそれを作るためにどのような非常にわからないんだけど...私は(レールにする前に、このマシン上のsqlite3のルビーをインストールしています2.3.5)この宝石を(rvmシステム設定を使って)再インストールしようとすると、それはruby 1.8.7環境ではインストールされません。
rvmは宝石を壊しましたか?新しい宝石は私のOSと互換性がありません(opensuse linuxを実行しています)
編集:定期的なルビー環境でsqlite3-rubyを再インストールしようとすると、同じエラーが表示されますしかし、その後、あなたが
gem install sqlite3-ruby -- --with-sqlite3-dir=/path/to/your/sqlite3
そして、それが動作しない場合を試みることができる
あなたのコンピュータにインストールされているsqliteのバージョンは? – bhamby
"sqlite3 -version"と入力すると "3.6.4"となります – Jenny
"sqlite -version"と入力すると "2.8.17" ...混乱します – Jenny