1


执行 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

environment.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 版本。
你能帮我解决这个问题吗?

4

0 回答 0