LoadError:无法加载此类文件 - phusion_passenger / rack_handler

时间:2016-08-05 05:18:34

标签: ruby-on-rails passenger

当我在登台服务器上运行rake db:create时出现错误:

rake aborted!
LoadError: cannot load such file -- phusion_passenger/rack_handler
/usr/local/rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/runtime.rb:86:in `require'
/usr/local/rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/runtime.rb:86:in `block (2 levels) in require'
/usr/local/rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in `each'
/usr/local/rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in `block in require'
/usr/local/rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in `each'

这是我的 Gemfile

group :development, :test do
  # https://github.com/deivid-rodriguez/byebug
  gem 'byebug'
  gem "capistrano", "~> 3.4"
  gem "passenger", ">= 5.0.25", require: "phusion_passenger/rack_handler"
end

我只是想知道我在本地开发时只使用乘客为什么我会收到此错误,谢谢!

1 个答案:

答案 0 :(得分:0)

rake db:create RAILS_ENV=Staging

rake db:create默认环境至少包含develop环境。因为我只是在本地运行此命令,所以我得到了developtest环境数据库。所以错误是显而易见的。