当我在登台服务器上运行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
我只是想知道我在本地开发时只使用乘客为什么我会收到此错误,谢谢!
答案 0 :(得分:0)
rake db:create RAILS_ENV=Staging
rake db:create
默认环境至少包含develop
环境。因为我只是在本地运行此命令,所以我得到了develop
和test
环境数据库。所以错误是显而易见的。