0
我有一個特殊的問題,即所有我的Rails管理路線我的本地服務器上運行的發展模式精細只掙扎在Rails_admin指數的路線。然而,只有1對生產不工作..缺少在Heroku
上雪松堆棧使用Rails 3.2.6與薄 - Heroku的
我無法加載1種稱爲參考特定型號的#INDEX視圖。
不過,我可以加載新的,編輯和顯示觀點,即同一型號。然後再次。所有的路由都在開發服務器上正常加載
難道你們有什麼想法,在那裏我可以用這個啓動?
在此先感謝這麼多...
這是我得到的Heroku的日誌當我嘗試訪問該頁面的錯誤。
3.2.6/lib/active_support/notifications.rb:123:in `block in instrument'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.6/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/abstract_controller/rendering.rb:45:in `process'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_controller/metal.rb:203:in `dispatch'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_controller/metal.rb:246:in `block in action'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/routing/route_set.rb:73:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/routing/route_set.rb:36:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/
lib/rails/railtie/configurable.rb:30:in `method_missing'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/routing/route_set.rb:600:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/engine.rb:479:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/sass-3.1.20/lib/sass/plugin/rack.rb:54:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/routing/route_set.rb:600:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-pjax-0.5.9/lib/rack/pjax.rb:12:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/warden-1.2.1/lib/warden/manager.rb:35:in `block in call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/warden-1.2.1/lib/warden/manager.rb:34:in `catch'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/warden-1.2.1/lib/warden/manager.rb:34:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/etag.rb:23:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/middleware/head.rb:14:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/conditionalget.rb:25:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/remotipart-1.0.2/lib/remotipart/middleware.rb:30:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/middleware/flash.rb:242:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/middleware/cookies.rb:338:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:in `context'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.6/lib/active_record/query_cache.rb:64:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:473:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/callbacks.rb:405:in `_run__1529569943628666922__call__3530359843174502737__callbacks'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/callbacks.rb:405:in `__run_callback'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/callbacks.rb:81:in `run_callbacks'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/rack/logger.rb:16:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/runtime.rb:17:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/rack/logger.rb:26:in `call_app'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/middleware/request_id.rb:22:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.6/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/lock.rb:15:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/middleware/static.rb:62:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:245:in `fetch'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/engine.rb:479:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:185:in `lookup'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:in `call!'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/application.rb:220:in `call'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3.2.6/lib/rails/railtie/configurable.rb:30:in `method_missing'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/thin/connection.rb:80:in `block in pre_process'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/thin/connection.rb:78:in `catch'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/thin/connection.rb:78:in `pre_process'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/thin/connection.rb:53:in `process'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/thin/connection.rb:38:in `receive_data'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in
`run'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/thin/backends/base.rb:63:in `start'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/thin/controllers/controller.rb:86:in `start'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/thin/server.rb:159:in `start'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/thin/runner.rb:185:in `run_command'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/bin/thin:6:in `<top (required)>'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.4.1/lib/thin/runner.rb:151:in `run!'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/bin/thin:23:in `load'
2012-07-18T07:39:00+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/bin/thin:23:in `<main>'
2012-07-18T07:39:00+00:00 app[web.1]:
而我耙路線看起來正常:
rails_admin /admin RailsAdmin::Engine
projects GET /projects(.:format) projects#index
project GET /projects/:id(.:format) projects#show
clients GET /clients(.:format) clients#index
client GET /clients/:id(.:format) clients#show
references GET /references(.:format) references#index
reference GET /references/:id(.:format) references#show
new_user_session GET /users/sign_in(.:format) devise/sessions#new
user_session POST /users/sign_in(.:format) devise/sessions#create
destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy
user_password POST /users/password(.:format) devise/passwords#create
new_user_password GET /users/password/new(.:format) devise/passwords#new
edit_user_password GET /users/password/edit(.:format) devise/passwords#edit
PUT /users/password(.:format) devise/passwords#update
cancel_user_registration GET /users/cancel(.:format) devise/registrations#cancel
user_registration POST /users(.:format) devise/registrations#create
new_user_registration GET /users/sign_up(.:format) devise/registrations#new
edit_user_registration GET /users/edit(.:format) devise/registrations#edit
PUT /users(.:format) devise/registrations#update
DELETE /users(.:format) devise/registrations#destroy
root / projects#index
about /about(.:format) high_voltage/pages#show {:id=>"about_me"}
site /site(.:format) high_voltage/pages#show {:id=>"site"}
contact /contact(.:format) contact_us/contacts#new
page /pages/*id high_voltage/pages#show
contacts POST /contacts(.:format) contact_us/contacts#create
new_contact GET /contacts/new(.:format) contact_us/contacts#new
contact_us /contact_us(.:format) contact_us/contacts#new
Routes for RailsAdmin::Engine:
dashboard GET / rails_admin/main#dashboard
index GET|POST /:model_name(.:format) rails_admin/main#index
new GET|POST /:model_name/new(.:format) rails_admin/main#new
export GET|POST /:model_name/export(.:format) rails_admin/main#export
bulk_delete POST|DELETE /:model_name/bulk_delete(.:format) rails_admin/main#bulk_delete
history_index GET /:model_name/history(.:format) rails_admin/main#history_index
bulk_action POST /:model_name/bulk_action(.:format) rails_admin/main#bulk_action
show GET /:model_name/:id(.:format) rails_admin/main#show
edit GET|PUT /:model_name/:id/edit(.:format) rails_admin/main#edit
delete GET|DELETE /:model_name/:id/delete(.:format) rails_admin/main#delete
history_show GET /:model_name/:id/history(.:format) rails_admin/main#history_show
show_in_app GET /:model_name/:id/show_in_app(.:format) rails_admin/main#show_in_app
最後,我的routes.rb文件:
Resume::Application.routes.draw do
mount RailsAdmin::Engine => '/admin', :as => 'rails_admin'
resources :projects, :only => [:index, :show]
resources :clients, :only => [:index, :show]
resources :references, :only => [:index, :show]
devise_for :users
root :to => 'projects#index'
#static pages
match 'about' => 'high_voltage/pages#show', :id => 'about_me'
match 'site' => 'high_voltage/pages#show', :id => 'site'
match 'contact' => 'contact_us/contacts#new'
嗯。謝謝本傑明。也許這是Heroku或Thin的問題。因爲在開發服務器上顯然沒有問題。但值得一試。如果沒有其他事情出現,我會在今晚嘗試做。感謝您的建議。 – Adam 2012-07-19 23:35:32
當然可以!另一件我能想到的就是你忘記了'heroku運行rake db:migrate'或者'heroku rake db:migrate',這取決於你所在的堆棧。 – 2012-07-20 01:31:12
謝謝。我做到了。奇怪的是,每條路線的工作除了引用/#索引。 #秀,#編輯等...他們都很好。今晚會嘗試重命名。 – Adam 2012-07-20 04:32:57