在将rails应用程序部署到新的Debian服务器后,无法加载此类文件--sqlite3 / sqlite3_native

时间:2012-12-03 13:50:23

标签: deployment ruby-on-rails-3.2

我已经开始基于Debian Squeeze的生产服务器部署过程了。 我们一直在MacOS中开发这个Rails应用程序。

  • Rails是版本3.2.8
  • Ruby版本为1.9.3p194(2012-04-20修订版35410)[x86_64-darwin12.2.0]

我们已经安装了rvm,因为开始运行,应用程序在我的计算机上完美运行。

为了理解需要什么,然后用Capistrano制作剧本,我开始:

  • 成功安装Ruby。
  • 成功安装Rails。
  • 已安装SQLite3。 (我不会在制作中使用它)
  • 成功安装RVM。
  • 复制整个应用程序目录并在其中运行捆绑安装

然后,运行 rake about ,只是为了确保一切正常,收到以下错误:

rake aborted!
cannot load such file -- sqlite3/sqlite3_native
/root/rails_app/depot/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.6/lib/sqlite3.rb:6:in        `require'
/root/rails_app/depot/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.6/lib/sqlite3.rb:6:in   `rescue in <top (required)>'
/root/rails_app/depot/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.6/lib/sqlite3.rb:2:in `<top (required)>'
/usr/local/rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.2/lib/bundler/runtime.rb:68:in `require'
/usr/local/rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.2/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
/usr/local/rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.2/lib/bundler/runtime.rb:66:in `each'
/usr/local/rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.2/lib/bundler/runtime.rb:66:in `block in require'
/usr/local/rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.2/lib/bundler/runtime.rb:55:in `each'
/usr/local/rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.2/lib/bundler/runtime.rb:55:in `require'
/usr/local/rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.2/lib/bundler.rb:128:in `require'
/root/rails_app/depot/config/application.rb:7:in `<top (required)>'
/root/rails_app/depot/Rakefile:5:in `require'
/root/rails_app/depot/Rakefile:5:in `<top (required)>'
/root/rails_app/depot/vendor/bundle/ruby/1.9.1/gems/rake- 0.9.2.2/lib/rake/rake_module.rb:25:in `load'
/root/rails_app/depot/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/root/rails_app/depot/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:501:in `raw_load_rakefile'
/root/rails_app/depot/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:82:in `block in load_rakefile'
/root/rails_app/depot/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/root/rails_app/depot/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:81:in `load_rakefile'
/root/rails_app/depot/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:65:in `block in run'
/root/rails_app/depot/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/root/rails_app/depot/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/root/rails_app/depot/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/usr/local/rvm/gems/ruby-1.9.3-p327/bin/rake:19:in `load'
/usr/local/rvm/gems/ruby-1.9.3-p327/bin/rake:19:in `<main>'
/usr/local/rvm/gems/ruby-1.9.3-p327/bin/ruby_noexec_wrapper:14:in `eval'
/usr/local/rvm/gems/ruby-1.9.3-p327/bin/ruby_noexec_wrapper:14:in `<main>'

其他所有命令,例如 rails server rails console 都会显示相同的错误。

0 个答案:

没有答案