1

DreamHost.comで個人用Railsアプリを実行しています。正常に動作していますが、2週間ほど使用していません。さて、サイトにアクセスすると、「Railsアプリケーションが正常に起動しませんでした」というメッセージが表示されます。アカウントにSSHで接続し、ターミナルからコマンドを実行してみました。実稼働モードでコンソールに入ろうとし、「rakeroutes」を実行してみました。どちらの場合も、次の出力が得られます。ルートの問題だと思いますが、よくわかりません。問題が私に報告されているかどうか、そしてそれが何であるかを私が知ることができるかもしれないよりも、誰かがレールにもっと興味を持っていることを望んでいました。

助けてくれてありがとう。これが私が実行しているものです:

[coneflower]$ ruby -v
ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-linux]
[coneflower]$ gem -v
1.8.25
[coneflower]$ rails -v
Rails 3.2.2

エラー出力:

[coneflower]$ rake routes
rake aborted!
missing :action
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.2/lib/action_dispatch/routing/mapper.rb:183:in `default_controller_and_action'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.2/lib/action_dispatch/routing/mapper.rb:76:in `normalize_options!'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.2/lib/action_dispatch/routing/mapper.rb:59:in `initialize'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.2/lib/action_dispatch/routing/mapper.rb:1302:in `new'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.2/lib/action_dispatch/routing/mapper.rb:1302:in `add_route'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.2/lib/action_dispatch/routing/mapper.rb:1282:in `decomposed_match'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.2/lib/action_dispatch/routing/mapper.rb:1268:in `block in match'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.2/lib/action_dispatch/routing/mapper.rb:1268:in `each'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.2/lib/action_dispatch/routing/mapper.rb:1268:in `match'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.2/lib/action_dispatch/routing/mapper.rb:258:in `root'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.2/lib/action_dispatch/routing/mapper.rb:1315:in `root'
/home/johndcow/rails/drywall/releases/20130306000519/config/routes.rb:2:in `block in <top (required)>'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.2/lib/action_dispatch/routing/route_set.rb:276:in `instance_exec'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.2/lib/action_dispatch/routing/route_set.rb:276:in `eval_block'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.2/lib/action_dispatch/routing/route_set.rb:254:in `draw'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:245:in `load'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:245:in `block in load'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.2/lib/active_support/dependencies.rb:245:in `load'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.2/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/railties- 3.2.2/lib/rails/application/routes_reloader.rb:40:in `each'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.2/lib/rails/application/routes_reloader.rb:40:in `load_paths'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.2/lib/rails/application/routes_reloader.rb:16:in `reload!'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.2/lib/rails/application/routes_reloader.rb:26:in `block in updater'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.2/lib/active_support/file_update_checker.rb:78:in `call'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.2/lib/active_support/file_update_checker.rb:78:in `execute'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.2/lib/rails/application/routes_reloader.rb:27:in `updater'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.2/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.2/lib/rails/application/finisher.rb:66:in `block in <module:Finisher>'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.2/lib/rails/initializable.rb:30:in `instance_exec'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.2/lib/rails/initializable.rb:30:in `run'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.2/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.2/lib/rails/initializable.rb:54:in `each'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.2/lib/rails/initializable.rb:54:in `run_initializers'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.2/lib/rails/application.rb:136:in `initialize!'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.2/lib/rails/railtie/configurable.rb:30:in `method_missing'
/home/johndcow/rails/drywall/releases/20130306000519/config/environment.rb:5:in `<top (required)>'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.2/lib/rails/application.rb:103:in `require'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.2/lib/rails/application.rb:103:in `require_environment!'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.2/lib/rails/application.rb:292:in `block (2 levels) in initialize_tasks'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `eval'
/home/johndcow/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => routes => environment
(See full trace by running task with --trace)
[coneflower]$ 

ルートファイル:

Drywall::Application.routes.draw do
  resources :access, :only => :index  
  resources :users, :only => [:index, :new] 
  resources :payments
  resources :materials
  resources :hours
  resources :jobs 
  resources :customer 
  resources :reports, :only => :index do
    collection do
      get :statement
    end
  end

  # I removed the commented out examples here
  #
  # The priority is based upon order of creation:
  # first created -> highest priority.

  # See how all your routes lay out with "rake routes"

  # This is a legacy wild controller route that's not recommended for RESTful applications.
  # Note: This route will make all actions in every controller accessible via GET requests.

  match ':controller(/:action(/:id))(.:format)'
end
4

1 に答える 1

0

それresources :accessが問題を引き起こしている可能性があります。製品のレーキで複数化を破ることが知られています。モード。http://bparanj.blogspot.no/2011/07/reserved-words-in-rails.htmlを参照してください

于 2013-03-18T13:15:53.757 に答える