rails 细研base.rb(rails_generator)

lib/ruby/gems/1.8/gems/rails-1.2.3/lib/rails_generator/base.rb

require File.dirname(__FILE__) + '/options'
require File.dirname(__FILE__) + '/manifest'
require File.dirname(__FILE__) + '/spec'
require File.dirname(__FILE__) + '/generated_attribute'

module Rails
# Rails::Generator is a code generation platform tailored for the Rails
# web application framework. Generators are easily invoked within Rails
# applications to add and remove components such as models and controllers.
# New generators are easy to create and may be distributed as RubyGems,
# tarballs, or Rails plugins for inclusion system-wide, per-user,
# or per-application.
#
# For actual examples see the rails_generator/generators directory in the
# Rails source (or the +railties+ directory if you have frozen the Rails
# source in your application).
#
# Generators may subclass other generators to provide variations that
# require little or no new logic but replace the template files.
#
# For a RubyGem, put your generator class and templates in the +lib+
# directory. For a Rails plugin, make a +generators+ directory at the
# root of your plugin.
#
# The layout of generator files can be seen in the built-in
# +controller+ generator:
#
# generators/
# controller/
# controller_generator.rb
# templates/
# controller.rb
# functional_test.rb
# helper.rb
# view.rhtml
#
# The directory name (+controller+) matches the name of the generator file
# (controller_generator.rb) and class (+ControllerGenerator+). The files
# that will be copied or used as templates are stored in the +templates+
# directory.
#
# The filenames of the templates don't matter, but choose something that
# will be self-explatatory since you will be referencing these in the
# +manifest+ method inside your generator subclass.
#
#
module Generator
class GeneratorError < StandardError; end
class UsageError < GeneratorError; end


# The base code generator is bare-bones. It sets up the source and
# destination paths and tells the logger whether to keep its trap shut.
#
# It's useful for copying files such as stylesheets, images, or
# javascripts.
#
# For more comprehensive template-based passive code generation with
# arguments, you'll want Rails::Generator::NamedBase.
#
# Generators create a manifest of the actions they perform then hand
# the manifest to a command which replays the actions to do the heavy
# lifting (such as checking for existing files or creating directories
# if needed). Create, destroy, and list commands are included. Since a
# single manifest may be used by any command, creating new generators is
# as simple as writing some code templates and declaring what you'd like
# to do with them.
#
# The manifest method must be implemented by subclasses, returning a
# Rails::Generator::Manifest. The +record+ method is provided as a
# convenience for manifest creation. Example:
#
# class StylesheetGenerator < Rails::Generator::Base
# def manifest
# record do |m|
# m.directory('public/stylesheets')
# m.file('application.css', 'public/stylesheets/application.css')
# end
# end
# end
#
# See Rails::Generator::Commands::Create for a list of methods available
# to the manifest.
class Base
include Options

# Declare default options for the generator. These options
# are inherited to subclasses.
default_options :collision => :ask, :quiet => false

# A logger instance available everywhere in the generator.
cattr_accessor :logger

# Every generator that is dynamically looked up is tagged with a
# Spec describing where it was found.
class_inheritable_accessor :spec

attr_reader :source_root, :destination_root, :args

def initialize(runtime_args, runtime_options = {})
@args = runtime_args
parse!(@args, runtime_options)

# Derive source and destination paths.
@source_root = options[:source] || File.join(spec.path, 'templates')
if options[:destination]
@destination_root = options[:destination]
elsif defined? ::RAILS_ROOT
@destination_root = ::RAILS_ROOT
end

# Silence the logger if requested.
logger.quiet = options[:quiet]

# Raise usage error if help is requested.
usage if options[:help]
end

# Generators must provide a manifest. Use the +record+ method to create
# a new manifest and record your generator's actions.
def manifest
raise NotImplementedError, "No manifest for '#{spec.name}' generator."
end

# Return the full path from the source root for the given path.
# Example for source_root = '/source':
# source_path('some/path.rb') == '/source/some/path.rb'
#
# The given path may include a colon ':' character to indicate that
# the file belongs to another generator. This notation allows any
# generator to borrow files from another. Example:
# source_path('model:fixture.yml') = '/model/source/path/fixture.yml'
def source_path(relative_source)
# Check whether we're referring to another generator's file.
name, path = relative_source.split(':', 2)

# If not, return the full path to our source file.
if path.nil?
File.join(source_root, name)

# Otherwise, ask our referral for the file.
else
# FIXME: this is broken, though almost always true. Others'
# source_root are not necessarily the templates dir.
File.join(self.class.lookup(name).path, 'templates', path)
end
end

# Return the full path from the destination root for the given path.
# Example for destination_root = '/dest':
# destination_path('some/path.rb') == '/dest/some/path.rb'
def destination_path(relative_destination)
File.join(destination_root, relative_destination)
end

protected
# Convenience method for generator subclasses to record a manifest.
def record
Rails::Generator::Manifest.new(self) { |m| yield m }
end

# Override with your own usage banner.
def banner
"Usage: #{$0} #{spec.name} [options]"
end

# Read USAGE from file in generator base path.
def usage_message
File.read(File.join(spec.path, 'USAGE')) rescue ''
end
end


# The base generator for named components: models, controllers, mailers,
# etc. The target name is taken as the first argument and inflected to
# singular, plural, class, file, and table forms for your convenience.
# The remaining arguments are aliased to +actions+ as an array for
# controller and mailer convenience.
#
# Several useful local variables and methods are populated in the
# +initialize+ method. See below for a list of Attributes and
# External Aliases available to both the manifest and to all templates.
#
# If no name is provided, the generator raises a usage error with content
# optionally read from the USAGE file in the generator's base path.
#
# For example, the +controller+ generator takes the first argument as
# the name of the class and subsequent arguments as the names of
# actions to be generated:
#
# ./script/generate controller Article index new create
#
# See Rails::Generator::Base for a discussion of manifests,
# Rails::Generator::Commands::Create for methods available to the manifest,
# and Rails::Generator for a general discussion of generators.
class NamedBase < Base
attr_reader :name, :class_name, :singular_name, :plural_name, :table_name
attr_reader :class_path, :file_path, :class_nesting, :class_nesting_depth
alias_method :file_name, :singular_name
alias_method :actions, :args

def initialize(runtime_args, runtime_options = {})
super

# Name argument is required.
usage if runtime_args.empty?

@args = runtime_args.dup
base_name = @args.shift
assign_names!(base_name)
end

protected
# Override with your own usage banner.
def banner
"Usage: #{$0} #{spec.name} #{spec.name.camelize}Name [options]"
end

def attributes
@attributes ||= @args.collect do |attribute|
Rails::Generator::GeneratedAttribute.new(*attribute.split(":"))
end
end


private
def assign_names!(name)
@name = name
base_name, @class_path, @file_path, @class_nesting, @class_nesting_depth = extract_modules(@name)
@class_name_without_nesting, @singular_name, @plural_name = inflect_names(base_name)
@table_name = ActiveRecord::Base.pluralize_table_names ? plural_name : singular_name
if @class_nesting.empty?
@class_name = @class_name_without_nesting
else
@table_name = @class_nesting.underscore << "_" << @table_name
@class_name = "#{@class_nesting}::#{@class_name_without_nesting}"
end
end

# Extract modules from filesystem-style or ruby-style path:
# good/fun/stuff
# Good::Fun::Stuff
# produce the same results.
def extract_modules(name)
modules = name.include?('/') ? name.split('/') : name.split('::')
name = modules.pop
path = modules.map { |m| m.underscore }
file_path = (path + [name.underscore]).join('/')
nesting = modules.map { |m| m.camelize }.join('::')
[name, path, file_path, nesting, modules.size]
end

def inflect_names(name)
camel = name.camelize
under = camel.underscore
plural = under.pluralize
[camel, under, plural]
end
end
end
end

E:/Bitnami/redmine-5.0.3-0/ruby/bin/ruby.exe -x E:\Bitnami\redmine-5.0.3-0\apps\redmine\htdocs\bin\bundle exec E:\Bitnami\redmine-5.0.3-0\ruby\bin\ruby.exe E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/bin/rails server -b 127.0.0.1 -p 3000 -e development Beginning in Rails 4, Rails ships with a `rails` binstub at ./bin/rails that should be used instead of the Bundler-generated `rails` binstub. If you are seeing this message, your binstub at ./bin/rails was generated by Bundler instead of Rails. You might need to regenerate your `rails` binstub locally and add it to source control: rails app:update:bin # Bear in mind this generates other binstubs # too that you may or may not want (like yarn) If you already have Rails binstubs in source control, you might be inadvertently overwriting them during deployment by using bundle install with the --binstubs option. If your application was created prior to Rails 4, here's how to upgrade: bundle config --delete bin # Turn off Bundler's stub generator rails app:update:bin # Use the new Rails executables git add bin # Add bin/ to source control You may need to remove bin/ from your .gitignore as well. When you install a gem whose executable you want to use in your app, generate it and add it to source control: bundle binstubs some-gem-name git add bin/new-executable => Booting Thin => Rails 6.1.7 application starting in development http://127.0.0.1:3000 => Run `bin/rails server --help` for more startup options Exiting E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/plugins/my_auth_plugin/init.rb:10:in `block in <top (required)>': undefined local variable or method `config' for #<Redmine::Plugin:0x0000016a30172500> (NameError) from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/lib/redmine/plugin.rb:96:in `instance_eval' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/lib/redmine/plugin.rb:96:in `register' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/plugins/my_auth_plugin/init.rb:3:in `<top (required)>' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/lib/redmine/plugin_loader.rb:31:in `load' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/lib/redmine/plugin_loader.rb:31:in `run_initializer' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/lib/redmine/plugin_loader.rb:108:in `each' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/lib/redmine/plugin_loader.rb:108:in `block in load' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:427:in `instance_exec' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:427:in `block in make_lambda' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:198:in `block (2 levels) in halting' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:604:in `block (2 levels) in default_terminator' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:603:in `catch' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:603:in `block in default_terminator' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:199:in `block in halting' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:512:in `block in invoke_before' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:512:in `each' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:512:in `invoke_before' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:105:in `run_callbacks' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7/lib/active_support/reloader.rb:88:in `prepare!' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/application/finisher.rb:124:in `block in <module:Finisher>' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/initializable.rb:32:in `instance_exec' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/initializable.rb:32:in `run' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/initializable.rb:61:in `block in run_initializers' from E:/Bitnami/redmine-5.0.3-0/ruby/lib/ruby/2.6.0/tsort.rb:228:in `block in tsort_each' from E:/Bitnami/redmine-5.0.3-0/ruby/lib/ruby/2.6.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component' from E:/Bitnami/redmine-5.0.3-0/ruby/lib/ruby/2.6.0/tsort.rb:431:in `each_strongly_connected_component_from' from E:/Bitnami/redmine-5.0.3-0/ruby/lib/ruby/2.6.0/tsort.rb:349:in `block in each_strongly_connected_component' from E:/Bitnami/redmine-5.0.3-0/ruby/lib/ruby/2.6.0/tsort.rb:347:in `each' from E:/Bitnami/redmine-5.0.3-0/ruby/lib/ruby/2.6.0/tsort.rb:347:in `call' from E:/Bitnami/redmine-5.0.3-0/ruby/lib/ruby/2.6.0/tsort.rb:347:in `each_strongly_connected_component' from E:/Bitnami/redmine-5.0.3-0/ruby/lib/ruby/2.6.0/tsort.rb:226:in `tsort_each' from E:/Bitnami/redmine-5.0.3-0/ruby/lib/ruby/2.6.0/tsort.rb:205:in `tsort_each' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/initializable.rb:60:in `run_initializers' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/application.rb:391:in `initialize!' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/config/environment.rb:16:in `<top (required)>' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/zeitwerk-2.6.1/lib/zeitwerk/kernel.rb:35:in `require' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/zeitwerk-2.6.1/lib/zeitwerk/kernel.rb:35:in `require' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:332:in `block in require' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:299:in `load_dependency' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:332:in `require' from config.ru:3:in `block in <main>' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/rack-2.2.4/lib/rack/builder.rb:116:in `eval' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/rack-2.2.4/lib/rack/builder.rb:116:in `new_from_string' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/rack-2.2.4/lib/rack/builder.rb:105:in `load_file' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/rack-2.2.4/lib/rack/builder.rb:66:in `parse_file' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/rack-2.2.4/lib/rack/server.rb:349:in `build_app_and_options_from_config' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/rack-2.2.4/lib/rack/server.rb:249:in `app' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/rack-2.2.4/lib/rack/server.rb:422:in `wrapped_app' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/commands/server/server_command.rb:77:in `log_to_stdout' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/commands/server/server_command.rb:37:in `start' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/commands/server/server_command.rb:144:in `block in perform' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/commands/server/server_command.rb:135:in `tap' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/commands/server/server_command.rb:135:in `perform' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/command/base.rb:69:in `perform' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/command.rb:48:in `invoke' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/commands.rb:18:in `<top (required)>' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/app_loader.rb:59:in `require' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/app_loader.rb:59:in `block in exec_app' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/app_loader.rb:48:in `loop' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/app_loader.rb:48:in `exec_app' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/cli.rb:7:in `<top (required)>' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/exe/rails:10:in `require' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/exe/rails:10:in `<top (required)>' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/bin/rails:29:in `load' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/bin/rails:29:in `<main>' Process finished with exit code 1
09-10
E:/Bitnami/redmine-5.0.3-0/ruby/bin/ruby.exe -x E:\Bitnami\redmine-5.0.3-0\apps\redmine\htdocs\bin\bundle exec E:\Bitnami\redmine-5.0.3-0\ruby\bin\ruby.exe E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/bin/rails server -b 127.0.0.1 -p 3000 -e development Beginning in Rails 4, Rails ships with a `rails` binstub at ./bin/rails that should be used instead of the Bundler-generated `rails` binstub. If you are seeing this message, your binstub at ./bin/rails was generated by Bundler instead of Rails. You might need to regenerate your `rails` binstub locally and add it to source control: rails app:update:bin # Bear in mind this generates other binstubs # too that you may or may not want (like yarn) If you already have Rails binstubs in source control, you might be inadvertently overwriting them during deployment by using bundle install with the --binstubs option. If your application was created prior to Rails 4, here's how to upgrade: bundle config --delete bin # Turn off Bundler's stub generator rails app:update:bin # Use the new Rails executables git add bin # Add bin/ to source control You may need to remove bin/ from your .gitignore as well. When you install a gem whose executable you want to use in your app, generate it and add it to source control: bundle binstubs some-gem-name git add bin/new-executable => Booting Thin => Rails 6.1.7 application starting in development http://127.0.0.1:3000 => Run `bin/rails server --help` for more startup options Exiting E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/zeitwerk-2.6.1/lib/zeitwerk/loader/callbacks.rb:25:in `on_file_autoloaded': expected file E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/plugins/redmine_account_lockable/app/hooks/account_controller_hook.rb to define constant AccountControllerHook, but didn't (Zeitwerk::NameError) from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/zeitwerk-2.6.1/lib/zeitwerk/kernel.rb:28:in `require' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7/lib/active_support/dependencies/zeitwerk_integration.rb:51:in `require_dependency' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/plugins/redmine_account_lockable/lib/account_lockable.rb:15:in `block in <top (required)>' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/plugins/redmine_account_lockable/lib/account_lockable.rb:15:in `each' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/plugins/redmine_account_lockable/lib/account_lockable.rb:15:in `<top (required)>' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/plugins/redmine_account_lockable/init.rb:16:in `require_relative' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/plugins/redmine_account_lockable/init.rb:16:in `<top (required)>' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/lib/redmine/plugin_loader.rb:31:in `load' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/lib/redmine/plugin_loader.rb:31:in `run_initializer' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/lib/redmine/plugin_loader.rb:108:in `each' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/lib/redmine/plugin_loader.rb:108:in `block in load' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:427:in `instance_exec' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:427:in `block in make_lambda' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:198:in `block (2 levels) in halting' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:604:in `block (2 levels) in default_terminator' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:603:in `catch' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:603:in `block in default_terminator' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:199:in `block in halting' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:512:in `block in invoke_before' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:512:in `each' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:512:in `invoke_before' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:105:in `run_callbacks' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7/lib/active_support/reloader.rb:88:in `prepare!' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/application/finisher.rb:124:in `block in <module:Finisher>' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/initializable.rb:32:in `instance_exec' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/initializable.rb:32:in `run' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/initializable.rb:61:in `block in run_initializers' from E:/Bitnami/redmine-5.0.3-0/ruby/lib/ruby/2.6.0/tsort.rb:228:in `block in tsort_each' from E:/Bitnami/redmine-5.0.3-0/ruby/lib/ruby/2.6.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component' from E:/Bitnami/redmine-5.0.3-0/ruby/lib/ruby/2.6.0/tsort.rb:431:in `each_strongly_connected_component_from' from E:/Bitnami/redmine-5.0.3-0/ruby/lib/ruby/2.6.0/tsort.rb:349:in `block in each_strongly_connected_component' from E:/Bitnami/redmine-5.0.3-0/ruby/lib/ruby/2.6.0/tsort.rb:347:in `each' from E:/Bitnami/redmine-5.0.3-0/ruby/lib/ruby/2.6.0/tsort.rb:347:in `call' from E:/Bitnami/redmine-5.0.3-0/ruby/lib/ruby/2.6.0/tsort.rb:347:in `each_strongly_connected_component' from E:/Bitnami/redmine-5.0.3-0/ruby/lib/ruby/2.6.0/tsort.rb:226:in `tsort_each' from E:/Bitnami/redmine-5.0.3-0/ruby/lib/ruby/2.6.0/tsort.rb:205:in `tsort_each' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/initializable.rb:60:in `run_initializers' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/application.rb:391:in `initialize!' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/config/environment.rb:16:in `<top (required)>' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/zeitwerk-2.6.1/lib/zeitwerk/kernel.rb:35:in `require' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/zeitwerk-2.6.1/lib/zeitwerk/kernel.rb:35:in `require' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:332:in `block in require' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:299:in `load_dependency' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7/lib/active_support/dependencies.rb:332:in `require' from config.ru:3:in `block in <main>' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/rack-2.2.4/lib/rack/builder.rb:116:in `eval' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/rack-2.2.4/lib/rack/builder.rb:116:in `new_from_string' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/rack-2.2.4/lib/rack/builder.rb:105:in `load_file' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/rack-2.2.4/lib/rack/builder.rb:66:in `parse_file' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/rack-2.2.4/lib/rack/server.rb:349:in `build_app_and_options_from_config' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/rack-2.2.4/lib/rack/server.rb:249:in `app' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/rack-2.2.4/lib/rack/server.rb:422:in `wrapped_app' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/commands/server/server_command.rb:77:in `log_to_stdout' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/commands/server/server_command.rb:37:in `start' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/commands/server/server_command.rb:144:in `block in perform' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/commands/server/server_command.rb:135:in `tap' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/commands/server/server_command.rb:135:in `perform' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/command/base.rb:69:in `perform' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/command.rb:48:in `invoke' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/commands.rb:18:in `<top (required)>' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/app_loader.rb:59:in `require' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/app_loader.rb:59:in `block in exec_app' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/app_loader.rb:48:in `loop' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/app_loader.rb:48:in `exec_app' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/lib/rails/cli.rb:7:in `<top (required)>' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/exe/rails:10:in `require' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/vendor/bundle/ruby/2.6.0/gems/railties-6.1.7/exe/rails:10:in `<top (required)>' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/bin/rails:29:in `load' from E:/Bitnami/redmine-5.0.3-0/apps/redmine/htdocs/bin/rails:29:in `<main>' Process finished with exit code 1
09-10
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值