Ruby on rails NameError:在Rails 3.2中使用Rails.root未初始化常量Rails

Ruby on rails NameError:在Rails 3.2中使用Rails.root未初始化常量Rails,ruby-on-rails,delayed-job,Ruby On Rails,Delayed Job,我在执行environment.rb时遇到以下错误 C:\RailsProject>jruby script/delayed_job start NameError: uninitialized constant RAILS_ROOT const_missing at org/jruby/RubyModule.java:2647 (root) at C:/RailsProject/config/environment.rb:20 require at


我在执行environment.rb时遇到以下错误

C:\RailsProject>jruby script/delayed_job start
NameError: uninitialized constant RAILS_ROOT
  const_missing at org/jruby/RubyModule.java:2647
         (root) at C:/RailsProject/config/environment.rb:20
        require at org/jruby/RubyKernel.java:1062
         (root) at script/delayed_job:3
rb包含以下代码

# Be sure to restart your server when you modify this file
 require "rubygems"
require 'memcache'
if ENV['LOCAL'] == 'Y'

  require "bundler/setup"
end

# Uncomment below to force Rails into production mode when
# you don't control web/app server and can't set it the proper way
# ENV['Rails.env'] = 'production'

# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '3.2.13' unless defined? RAILS_GEM_VERSION
ENABLE_FACEBOOK = false
# Bootstrap the Rails environment, frameworks, and default configuration



Dir["#{Rails.root}/lib/integration/*.rb"].each do | file|
  require file
end


# Initialize the rails application
RailsProject::Application.initialize!
我使用的是rails 3.2.13版本。
你能帮我一下吗