使用Apache2和Passenger在CentOS上部署Ruby On Rails时出错

时间:2013-12-04 22:11:31

标签: ruby-on-rails ruby centos passenger

我是Ruby on Rails的新手,在完成我的第一个项目并尝试部署之后,我发现了一堆我不理解的错误。

0   /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb  31  in `gem_original_require'
1   /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb  31  in `require'
2   /var/www/fabiolaalvaradoservices.com/public_html/config/application.rb  3   
3   /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb  31  in `gem_original_require'
4   /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb  31  in `require'
5   /var/www/fabiolaalvaradoservices.com/public_html/config/environment.rb  2   
6   /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb  31  in `gem_original_require'
7   /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb  31  in `require'
8   /usr/lib/ruby/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/classic_rails/application_spawner.rb 222 in `preload_application'
9   /usr/lib/ruby/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/classic_rails/application_spawner.rb 181 in `initialize_server'
10  /usr/lib/ruby/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/utils.rb 563 in `report_app_init_status'
11  /usr/lib/ruby/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/classic_rails/application_spawner.rb 174 in `initialize_server'
12  /usr/lib/ruby/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server.rb   204 in `start_synchronously'
13  /usr/lib/ruby/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server.rb   180 in `start'
14  /usr/lib/ruby/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/classic_rails/application_spawner.rb 149 in `start'
15  /usr/lib/ruby/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb 219 in `spawn_rails_application'
16  /usr/lib/ruby/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server_collection.rb    132 in `lookup_or_add'
17  /usr/lib/ruby/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb 214 in `spawn_rails_application'
18  /usr/lib/ruby/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server_collection.rb    82  in `synchronize'
19  /usr/lib/ruby/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server_collection.rb    79  in `synchronize'
20  /usr/lib/ruby/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb 213 in `spawn_rails_application'
21  /usr/lib/ruby/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb 132 in `spawn_application'
22  /usr/lib/ruby/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb 275 in `handle_spawn_application'
23  /usr/lib/ruby/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server.rb   357 in `__send__'
24  /usr/lib/ruby/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server.rb   357 in `server_main_loop'
25  /usr/lib/ruby/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server.rb   206 in `start_synchronously'
26  /usr/lib/ruby/gems/1.8/gems/passenger-3.0.19/helper-scripts/passenger-spawn-server  99  

拜托,我需要一个能给我提示我需要修理的人。

顺便说一句,我使用 CentOS + Apache2 + 乘客

config / application.rb文件

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

require 'rails/all'

# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env)

module Demo
  class Application < Rails::Application
    # 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.

    # 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
  end
end

开发和制作配置

开发设置
Ruby版本:1.9.3p392
Rails版本:4.0.0.rc2

生产设置
Ruby版本:1.9.3p484
Rails版本:4.0.2

这里是我的宝石文件

source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.0.rc2'

# Use sqlite3 as the database for Active Record
gem 'sqlite3'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0.rc2'

# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'

# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'

# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'

group :doc do
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', require: false
end

# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# Use unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano', group: :development

# Use debugger
# gem 'debugger', group: [:development, :test]

0 个答案:

没有答案