Marc
Marc

Reputation: 2584

Ruby (Rack) Application Could Not be Started... again

Not sure where to start to look. Ive looked at the files mentioned in the backtrace but not seeing any problems with them. Maybe another set of eyes can see something I dont. Heres the backtrace:

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

environment.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'])

application.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

Upvotes: 2

Views: 553

Answers (1)

Hongli
Hongli

Reputation: 18924

The error message tells you to look in the web server error log file. Did you look in there? What is in the file?

Upvotes: 1

Related Questions