我正在尝试在 ec2 上创建一个新的 rails 应用程序。我正在使用 ruby 1.9.3 和 rails 3.2.3
[root@xxxx]# rails g
/usr/local/share/gems/gems/sqlite3-1.3.6/lib/sqlite3.rb:6:in `require': cannot load such file -- sqlite3/sqlite3_native
(LoadError)
from /usr/local/share/gems/gems/sqlite3-1.3.6/lib/sqlite3.rb:6:in `rescue in <top (required)>'
from /usr/local/share/gems/gems/sqlite3-1.3.6/lib/sqlite3.rb:2:in `<top (required)>'
from /usr/local/share/gems/gems/bundler-1.1.3/lib/bundler/runtime.rb:68:in `require'
from /usr/local/share/gems/gems/bundler-1.1.3/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from /usr/local/share/gems/gems/bundler-1.1.3/lib/bundler/runtime.rb:66:in `each'
from /usr/local/share/gems/gems/bundler-1.1.3/lib/bundler/runtime.rb:66:in `block in require'
from /usr/local/share/gems/gems/bundler-1.1.3/lib/bundler/runtime.rb:55:in `each'
from /usr/local/share/gems/gems/bundler-1.1.3/lib/bundler/runtime.rb:55:in `require'
from /usr/local/share/gems/gems/bundler-1.1.3/lib/bundler.rb:119:in `require'
from /root/twt/config/application.rb:7:in `<top (required)>'
from /usr/local/share/gems/gems/railties-3.2.3/lib/rails/commands.rb:24:in `require'
from /usr/local/share/gems/gems/railties-3.2.3/lib/rails/commands.rb:24:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
当我做:
[root@xxxx]# find / | grep sqlite3/sqlite3_native
我懂了:
/usr/local/lib/gems/exts/sqlite3-1.3.6/lib/sqlite3/sqlite3_native.so
/usr/local/share/gems/gems/sqlite3-1.3.6/ext/sqlite3/sqlite3_native.so
为什么rails看不到我的sqlite3?