Ruby on rails 4 部署rails应用程序时,Uniinitialized常量

Ruby on rails 4 部署rails应用程序时,Uniinitialized常量,ruby-on-rails-4,nginx,capistrano,bundler,unicorn,Ruby On Rails 4,Nginx,Capistrano,Bundler,Unicorn,我正试图使用rack attack中间件将rails 4应用程序部署到生产环境中,但在加载过程中出错了 [2014-06-26T17:00:10.247426 #30561] ERROR -- : uninitialized constant Rack::Attack (NameError) /home/deploy/apps/dieuDonne/releases/20140626205924/config/application.rb:29:in `<class:Applicat

我正试图使用rack attack中间件将rails 4应用程序部署到生产环境中,但在加载过程中出错了

    [2014-06-26T17:00:10.247426 #30561] ERROR -- : uninitialized constant Rack::Attack (NameError)
/home/deploy/apps/dieuDonne/releases/20140626205924/config/application.rb:29:in `<class:Application>'
/home/deploy/apps/dieuDonne/releases/20140626205924/config/application.rb:12:in `<module:Wizard>'
/home/deploy/apps/dieuDonne/releases/20140626205924/config/application.rb:11:in `<top (required)>'
/home/deploy/apps/dieuDonne/releases/20140626205924/config/environment.rb:2:in `require'
/home/deploy/apps/dieuDonne/releases/20140626205924/config/environment.rb:2:in `<top (required)>'
config.ru:4:in `require'
config.ru:4:in `block in <main>'
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
config.ru:1:in `new'
config.ru:1:in `<main>'
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/unicorn-4.8.3/lib/unicorn.rb:48:in `eval'
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/unicorn-4.8.3/lib/unicorn.rb:48:in `block in builder'
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:764:in `call'
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:764:in `build_app!'
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:628:in `init_worker_process'
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:651:in `worker_loop'
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:525:in `spawn_missing_workers'
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:536:in `maintain_worker_count'
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:294:in `join'
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/unicorn-4.8.3/bin/unicorn:126:in `<top (required)>'
/home/deploy/.rbenv/versions/2.0.0-p353/bin/unicorn:23:in `load'
/home/deploy/.rbenv/versions/2.0.0-p353/bin/unicorn:23:in `<main>'
E, [2014-06-26T17:00:10.264215 #29381] ERROR -- : reaped #<Process::Status: pid 30561 exit 1> worker=1
I, [2014-06-26T17:00:10.264613 #29381]  INFO -- : worker=1 spawning...

I, [2014-06-26T17:00:10.269636 #30567]  INFO -- : worker=1 spawned pid=30567
I, [2014-06-26T17:00:10.272775 #30567]  INFO -- : Refreshing Gem list

E, [2014-06-26T17:00:10.996570 #30564] ERROR -- : uninitialized constant Rack::Attack (NameError)
[2014-06-26T17:00:10.247426#30561]错误--:未初始化的常量机架::攻击(名称错误)
/home/deploy/apps/dieuDonne/releases/20140626205924/config/application.rb:29:in`'
/home/deploy/apps/dieuDonne/releases/20140626205924/config/application.rb:12:in`'
/home/deploy/apps/dieuDonne/releases/20140626205924/config/application.rb:11:in`'
/home/deploy/apps/dieuDonne/releases/20140626205924/config/environment.rb:2:in'require'
/home/deploy/apps/dieuDonne/releases/20140626205924/config/environment.rb:2:in`'
config.ru:4:in'require'
config.ru:4:in'block in'
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in'instance_eval'
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:在“初始化”中
config.ru:1:in'new'
config.ru:1:in`'
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/unicorn-4.8.3/lib/unicorn.rb:48:in'eval'
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/unicorn-4.8.3/lib/unicorn.rb:48:在“构建器中的块”中
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/unicorn-4.8.3/lib/unicorn/http_-server.rb:764:in'call'
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:764:in'build_app!'
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/unicorn-4.8.3/lib/unicorn/http_-server.rb:628:in`init_worker_进程'
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/unicorn-4.8.3/lib/unicorn/http_-server.rb:651:in'worker_-loop'
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:525:in'spawn_missing_workers'
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:536:在“维护工作人员计数”中
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:294:在“加入”中
/home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/unicorn-4.8.3/bin/unicorn:126:in`'
/home/deploy/.rbenv/versions/2.0.0-p353/bin/unicorn:23:在“加载”中
/home/deploy/.rbenv/versions/2.0.0-p353/bin/unicorn:23:in`'
E、 [2014-06-26T17:00:10.264215#29381]错误--:收获的工人=1
一、 [2014-06-26T17:00:10.264613#29381]信息--:工人=1产卵。。。
一、 [2014-06-26T17:00:10.269636#30567]信息--:工人=1衍生pid=30567
一、 [2014-06-26T17:00:10.272775#30567]信息--:刷新宝石列表
E、 [2014-06-26T17:00:10.996570#30564]错误--:未初始化的常量机架::攻击(名称错误)
下面是我的部署过程中的gem列表

DEBUG[28cd8523]     Using rake 10.3.2
DEBUG[28cd8523]     Using i18n 0.6.9
DEBUG[28cd8523]     Using minitest 4.7.5
DEBUG[28cd8523]     Using multi_json 1.10.1
DEBUG[28cd8523]     Using thread_safe 0.3.4
DEBUG[28cd8523]     Using tzinfo 0.3.39
DEBUG[28cd8523]     Using activesupport 4.0.2
DEBUG[28cd8523]     Using builder 3.1.4
DEBUG[28cd8523]     Using erubis 2.7.0
DEBUG[28cd8523]     Using rack 1.5.2
DEBUG[28cd8523]     Using rack-test 0.6.2
DEBUG[28cd8523]     Using actionpack 4.0.2
DEBUG[28cd8523]     Using mime-types 1.25.1
DEBUG[28cd8523]     Using polyglot 0.3.5
DEBUG[28cd8523]     Using treetop 1.4.15
DEBUG[28cd8523]     Using mail 2.5.4
DEBUG[28cd8523]     Using actionmailer 4.0.2
DEBUG[28cd8523]     Using arbre 1.0.1
DEBUG[28cd8523]     Using sass 3.2.19
DEBUG[28cd8523]     Using thor 0.19.1
DEBUG[28cd8523]     Using bourbon 3.2.3
DEBUG[28cd8523]     Using coffee-script-source 1.7.0
DEBUG[28cd8523]     Using execjs 2.1.0
DEBUG[28cd8523]     Using coffee-script 2.2.0
DEBUG[28cd8523]     Using railties 4.0.2
DEBUG[28cd8523]     Using coffee-rails 4.0.1
DEBUG[28cd8523]     Using formtastic 2.3.0.rc3
DEBUG[28cd8523]     Using has_scope 0.6.0.rc
DEBUG[28cd8523]     Using responders 1.0.0
DEBUG[28cd8523]     Using inherited_resources 1.4.1
DEBUG[28cd8523]     Using jquery-rails 3.1.0
DEBUG[28cd8523]     Using jquery-ui-rails 4.2.1
DEBUG[28cd8523]     Using kaminari 0.15.1
DEBUG[28cd8523]     Using activemodel 4.0.2
DEBUG[28cd8523]     Using activerecord-deprecated_finders 1.0.3
DEBUG[28cd8523]     Using arel 4.0.2
DEBUG[28cd8523]     Using activerecord 4.0.2
DEBUG[28cd8523]     Using bundler 1.6.2
DEBUG[28cd8523]     Using hike 1.2.3
DEBUG[28cd8523]     Using tilt 1.4.1
DEBUG[28cd8523]     Using sprockets 2.11.0
DEBUG[28cd8523]     Using sprockets-rails 2.0.1
DEBUG[28cd8523]     Using rails 4.0.2
DEBUG[28cd8523]     Using polyamorous 1.0.0
DEBUG[28cd8523]     Using ransack 1.2.3
DEBUG[28cd8523]     Using sass-rails 4.0.3
DEBUG[28cd8523]     Using activeadmin 1.0.0.pre from git://github.com/gregbell/active_admin.git (at master)
DEBUG[28cd8523]     Using bcrypt 3.1.7
DEBUG[28cd8523]     Using cancan 1.6.10
DEBUG[28cd8523]     Using colorize 0.7.3
DEBUG[28cd8523]     Using net-ssh 2.9.1
DEBUG[28cd8523]     Using net-scp 1.2.1
DEBUG[28cd8523]     Using sshkit 1.5.1
DEBUG[28cd8523]     Using capistrano 3.2.1
DEBUG[28cd8523]     Using capistrano-bundler 1.1.2
DEBUG[28cd8523]     Using capistrano-rails 1.1.1
DEBUG[28cd8523]     Using capistrano-rbenv 2.0.2
DEBUG[28cd8523]     Using json 1.8.1
DEBUG[28cd8523]     Using carrierwave 0.10.0
DEBUG[28cd8523]     Using daemons 1.1.9
DEBUG[28cd8523]     Using delayed_job 4.0.1
DEBUG[28cd8523]     Using delayed_job_active_record 4.0.1
DEBUG[28cd8523]     Using orm_adapter 0.5.0
DEBUG[28cd8523]     Using warden 1.2.3
DEBUG[28cd8523]     Using devise 3.2.4
DEBUG[28cd8523]     Using diff-lcs 1.2.5
DEBUG[28cd8523]     Using excon 0.34.0
DEBUG[28cd8523]     Using formatador 0.2.5
DEBUG[28cd8523]     Using fog-core 1.22.0
DEBUG[28cd8523]     Using fog-json 1.0.0
DEBUG[28cd8523]     Using fog-brightbox 0.0.2
DEBUG[28cd8523]     Using ipaddress 0.8.0
DEBUG[28cd8523]     Using mini_portile 0.6.0
DEBUG[28cd8523]     Using nokogiri 1.6.2.1
DEBUG[28cd8523]     Using fog 1.22.1
DEBUG[28cd8523]     Using jbuilder 1.5.3
DEBUG[28cd8523]     Using jquery-fileupload-rails 0.4.1
DEBUG[28cd8523]     Using kgio 2.9.2
DEBUG[28cd8523]     Using liquid 2.6.1
DEBUG[28cd8523]     Using subexec 0.2.3
DEBUG[28cd8523]     Using mini_magick 3.7.0
DEBUG[28cd8523]     Using pg 0.17.1
DEBUG[28cd8523]     Using rack-attack 4.1.0
DEBUG[28cd8523]     Using raindrops 0.13.0
DEBUG[28cd8523]     Using rdoc 4.1.1
DEBUG[28cd8523]     Using rmagick 2.13.2
DEBUG[28cd8523]     Using rolify 3.4.0
DEBUG[28cd8523]     Using rspec-core 2.14.8
DEBUG[28cd8523]     Using rspec-expectations 2.14.5
DEBUG[28cd8523]     Using rspec-mocks 2.14.6
DEBUG[28cd8523]     Using rspec 2.14.1
DEBUG[28cd8523]     Using sdoc 0.4.0
DEBUG[28cd8523]     Using uglifier 2.5.0
DEBUG[28cd8523]     Using unicorn 4.8.3
DEBUG[28cd8523]     Using wicked 1.0.3
DEBUG[28cd8523]     Your bundle is complete!
DEBUG[28cd8523]     Gems in the groups development and test were not installed.
DEBUG[28cd8523]     It was installed into /home/deploy/apps/<appname>/shared/vendor/bundle
使用rake 10.3.2调试[28cd8523] 使用i18n 0.6.9调试[28cd8523] 使用minitest 4.7.5调试[28cd8523] 使用multi_json 1.10.1调试[28cd8523] 使用线程安全0.3.4调试[28cd8523] 使用tzinfo 0.3.39调试[28cd8523] 使用activesupport 4.0.2调试[28cd8523] 使用builder 3.1.4调试[28cd8523] 使用erubis 2.7.0调试[28cd8523] 使用rack 1.5.2调试[28cd8523] 使用机架测试0.6.2调试[28cd8523] 使用actionpack 4.0.2调试[28cd8523] 使用mime类型1.25.1调试[28cd8523] 使用polyglot 0.3.5调试[28cd8523] 使用treetop 1.4.15调试[28cd8523] 使用mail 2.5.4调试[28cd8523] 使用actionmailer 4.0.2调试[28cd8523] 使用arbre 1.0.1调试[28cd8523] 使用sass 3.2.19调试[28cd8523] 使用thor 0.19.1调试[28cd8523] 使用bourbon 3.2.3调试[28cd8523] 使用coffee脚本源代码1.7.0调试[28cd8523] 使用execjs 2.1.0调试[28cd8523] 使用coffee脚本2.2.0调试[28cd8523] 使用railties 4.0.2调试[28cd8523] 使用coffee rails 4.0.1调试[28cd8523] 使用formtastic 2.3.0.rc3调试[28cd8523] 使用has_scope 0.6.0.rc调试[28cd8523] 使用响应程序1.0.0调试[28cd8523] 使用继承的_资源1.4.1调试[28cd8523] 使用jquery rails 3.1.0调试[28cd8523] 使用jquery ui rails 4.2.1调试[28cd8523] 使用kaminari 0.15.1调试[28cd8523] 使用activemodel 4.0.2调试[28cd8523] 使用activerecord-Disprecated_finders 1.0.3调试[28cd8523] 使用arel 4.0.2调试[28cd8523] 使用activerecord 4.0.2调试[28cd8523] 使用bundler 1.6.2调试[28cd8523] 使用hike 1.2.3调试[28cd8523] 使用tilt 1.4.1调试[28cd8523] 使用链轮2.11.0调试[28cd8523] 使用链轮导轨2.0.1调试[28cd8523] 使用rails 4.0.2调试[28cd8523] 使用polyamorous 1.0.0调试[28cd8523] 使用ransack 1.2.3调试[28cd8523] 使用sass rails 4.0.3调试[28cd8523] 从使用activeadmin 1.0.0.pre调试[28cd8523]git://github.com/gregbell/active_admin.git (船长) 使用bcrypt 3.1.7调试[28cd8523] 使用cancan 1.6.10调试[28cd8523] 使用colorize 0.7.3调试[28cd8523] 使用NetSSH 2.9.1调试[28cd8523] 使用net scp 1.2.1调试[28cd8523] 使用sshkit 1.5.1调试[28cd8523] 使用capistrano 3.2.1调试[28cd8523] 使用capistrano bundler 1.1.2调试[28cd8523] 使用capistrano rails 1.1.1调试[28cd8523] 使用capistrano rbenv 2.0.2调试[28cd8523] 使用json 1.8.1调试[28cd8523] 使用carrierwave 0.10.0调试[28cd8523] 使用守护进程1.1.9调试[28cd8523] 使用延迟的_作业4.0.1调试[28cd8523] 使用延迟作业活动记录4.0.1调试[28cd8523] 使用orm_适配器0.5.0调试[28cd8523] 使用warden 1.2.3调试[28cd8523] 使用Desive 3.2.4调试[28cd8523] 使用diff lcs 1.2.5调试[28cd8523] 使用excon 0.34.0调试[28cd8523] 使用formatador 0.2.5调试[28cd8523] 使用fog core 1.22.0调试[28cd8523] 使用fog json 1.0.0调试[28cd8523] 使用fog brightbox 0.0.2调试[28cd8523] 使用ipaddress 0.8.0调试[28cd8523] 调试[28cd8523]
require File.expand_path('../boot', __FILE__)

require 'rails/all'
require 'rubygems'
require 'rack'

# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env)

module Wizard
  class Application < Rails::Application
    # Settings in config/environments/* take precedence over those specified here.
    # Application configuration should go into files in config/initializers
    # -- all .rb files in that directory are automatically loaded.

    # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
    # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
    # config.time_zone = 'Central Time (US & Canada)'

    # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
    # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
    # config.i18n.default_locale = :de
    config.app_generators.scaffold_controller = :scaffold_controller

    # we dont really care for localization.
    config.i18n.enforce_available_locales = false
    config.autoload_paths << Rails.root.join('lib', 'shared/vendor/bundle/*')
    config.middleware.use Rack::Attack
  end
end