1

我已经开始了对基于 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 安装成功。
  • 复制整个应用程序目录并在其中运行bundle install

然后,运行rake以确保一切正常,出现以下错误:

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 serverrails console都会显示相同的错误。

4

0 回答 0