Rails 3不会用rvm安装sqlite3-ruby gem?

前端之家收集整理的这篇文章主要介绍了Rails 3不会用rvm安装sqlite3-ruby gem?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试rvm,并安装了 ruby 1.9.2和rails 3.我需要重新安装sqlite3-ruby gem(因为rvm保留所有gem为不同版本的ruby分开).

问题是,当我尝试时,我得到:

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-ruby(使用rails 2.3.5)当我尝试重新安装这个gem(使用rvm系统设置)时,它没有安装在ruby1.8.7环境中,EITHER.

rvm打破了宝石吗?新宝石是否与我的操作系统不兼容(我正在运行opensuse linux)

编辑:当我尝试在我的常规ruby环境中重新安装(卸载而不是再次安装)sqlite3-ruby时,我得到了相同的错误,但是后来看到我的gem列表中列出的sqlite3-ruby(不确定它是否以某种方式从备份恢复,或安装尽管有错误)

你可以试试
gem install sqlite3-ruby -- --with-sqlite3-dir=/path/to/your/sqlite3

如果这不起作用,你可能会尝试update your sqlite3,3.6.4相当陈旧,我认为较新版本的Ruby sqlite存在旧问题.

(最可能的原因是你得到两个不同的答案是版本2和3之间是一个重大变化 – 我相信大多数处理Unicode,而且有些程序仍使用2,而不是3).

原文链接:https://www.f2er.com/sqlite/197608.html

猜你在找的Sqlite相关文章