【问题标题】:Ruby (Rack) Application Could Not be Started... againRuby (Rack) 应用程序无法启动...再次
【发布时间】:2012-01-09 09:15:54
【问题描述】:

不知道从哪里开始寻找。我查看了回溯中提到的文件,但没有发现任何问题。也许另一双眼睛可以看到我看不到的东西。这是回溯:

The application has exited during startup (i.e. during the evaluation of config/environment.rb). The error message may have been written to the web servers log file. Please check the web servers log file (i.e. not the (Rails) applications log file) to find out why the application exited.
If that doesnt help, then please use the backtrace below to debug the problem.

Application root:
/home/marc_m3pt0/m3pt0.com
Backtrace:
#   File    Line    Location
0   /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/setup.rb  10  in exit
1   /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/setup.rb  10  
2   /usr/lib/ruby/1.8/rubygems/custom_require.rb    36  in gem_original_require
3   /usr/lib/ruby/1.8/rubygems/custom_require.rb    36  in require
4   /home/marc_m3pt0/m3pt0.com/config/boot.rb   6   
5   /usr/lib/ruby/1.8/rubygems/custom_require.rb    31  in gem_original_require
6   /usr/lib/ruby/1.8/rubygems/custom_require.rb    31  in require
7   /home/marc_m3pt0/m3pt0.com/config/application.rb    1   
8   /usr/lib/ruby/1.8/rubygems/custom_require.rb    31  in gem_original_require
9   /usr/lib/ruby/1.8/rubygems/custom_require.rb    31  in require
10  /home/marc_m3pt0/m3pt0.com/config/environment.rb    2   
11  /usr/lib/ruby/1.8/rubygems/custom_require.rb    31  in gem_original_require
12  /usr/lib/ruby/1.8/rubygems/custom_require.rb    31  in require
13  config.ru   3   
14  /usr/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/builder.rb  46  in instance_eval
15  /usr/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/builder.rb  46  in initialize
16  config.ru   1   in new
17  config.ru   1

环境.rb

# Load the rails application
require File.expand_path('../application', __FILE__)

# Initialize the rails application
M3p0::Application.initialize!

config.ru

# This file is used by Rack-based servers to start the application.

require ::File.expand_path('../config/environment',  __FILE__)
run M3p0::Application

boot.rb

require 'rubygems'

# Set up gems listed in the Gemfile.
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)

require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])

应用程序.rb

    require File.expand_path('../boot', __FILE__)

require 'rails/all'

if defined?(Bundler)
  # If you precompile assets before deploying to production, use this line
  Bundler.require *Rails.groups(:assets => %w(development test))
  # If you want your assets lazily compiled in production, use this line
  # Bundler.require(:default, :assets, Rails.env)
end

module M3p0
  class Application < Rails::Application
    config.autoload_paths << "#{config.root}/lib"    # 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.

    # Custom directories with classes and modules you want to be autoloadable.
    # config.autoload_paths += %W(#{config.root}/extras)

    # Only load the plugins named here, in the order given (default is alphabetical).
    # :all can be used as a placeholder for all plugins not explicitly named.
    # config.plugins = [ :exception_notification, :ssl_requirement, :all ]

    # Activate observers that should always be running.
    # config.active_record.observers = :cacher, :garbage_collector, :forum_observer

    # 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

    # Configure the default encoding used in templates for Ruby 1.9.
    config.encoding = "utf-8"

    # Configure sensitive parameters which will be filtered from the log file.
    config.filter_parameters += [:password]

    # Enable the asset pipeline
    config.assets.enabled = true

    # Version of your assets, change this if you want to expire all your assets
    config.assets.version = '1.0'
  end
end

【问题讨论】:

    标签: ruby-on-rails-3 passenger


    【解决方案1】:

    错误消息告诉您查看 Web 服务器错误日志文件。你进去看了吗?文件里有什么?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-10-15
      • 2012-11-26
      • 2013-09-25
      • 2012-06-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多