2012-07-26 77 views
0

Heyy傢伙,請幫助我。我從4天dreamhost設置軌道。最後,rails已經開始工作,但應用程序沒有運行。我剛剛部署了一款只有一種產品的演示應用程序,並且該頁面沒有打開,它說頁面不存在。生產日誌文件中存在寫入路由錯誤。我是Rails的新手,所以無法弄清楚哪裏出了問題。你可以嘗試自己運行apphttp://meropati.com/products,看到這個應用程序使用日誌文件的源代碼,我git repository * https://github.com/getaasciesh/TestingRailsOnDreamHost * 我會非常感激得到它的解決方案。導軌路由錯誤。應用程序不運行

Started GET "/products" for 208.113.229.116 at 2012-07-26 16:05:55 -0700 

ActionController::RoutingError (No route matches [GET] "/products"): 
    actionpack (3.2.6) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call' 
    actionpack (3.2.6) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' 
    railties (3.2.6) lib/rails/rack/logger.rb:26:in `call_app' 
    railties (3.2.6) lib/rails/rack/logger.rb:16:in `call' 
    actionpack (3.2.6) lib/action_dispatch/middleware/request_id.rb:22:in `call' 
    rack (1.4.1) lib/rack/methodoverride.rb:21:in `call' 
    rack (1.4.1) lib/rack/runtime.rb:17:in `call' 
    activesupport (3.2.6) lib/active_support/cache/strategy/local_cache.rb:72:in `call' 
    rack (1.4.1) lib/rack/lock.rb:15:in `call' 
    rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward' 
    rack-cache (1.2) lib/rack/cache/context.rb:245:in `fetch' 
    rack-cache (1.2) lib/rack/cache/context.rb:185:in `lookup' 
    rack-cache (1.2) lib/rack/cache/context.rb:66:in `call!' 
    rack-cache (1.2) lib/rack/cache/context.rb:51:in `call' 
    railties (3.2.6) lib/rails/engine.rb:479:in `call' 
    railties (3.2.6) lib/rails/application.rb:220:in `call' 
    railties (3.2.6) lib/rails/railtie/configurable.rb:30:in `method_missing' 
    /home/getaasciesh3/.passenger/standalone/3.0.14-x86_64-ruby1.9.3-linux-gcc4.4.5-1002/support/lib/phusion_passenger/rack/request_handler.rb:96:in `process_request' 
    /home/getaasciesh3/.passenger/standalone/3.0.14-x86_64-ruby1.9.3-linux-gcc4.4.5-1002/support/lib/phusion_passenger/abstract_request_handler.rb:516:in `accept_and_process_next_request' 
    /home/getaasciesh3/.passenger/standalone/3.0.14-x86_64-ruby1.9.3-linux-gcc4.4.5-1002/support/lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop' 
    /home/getaasciesh3/.passenger/standalone/3.0.14-x86_64-ruby1.9.3-linux-gcc4.4.5-1002/support/lib/phusion_passenger/rack/application_spawner.rb:206:in `start_request_handler' 
    /home/getaasciesh3/.passenger/standalone/3.0.14-x86_64-ruby1.9.3-linux-gcc4.4.5-1002/support/lib/phusion_passenger/rack/application_spawner.rb:171:in `block in handle_spawn_application' 
    /home/getaasciesh3/.passenger/standalone/3.0.14-x86_64-ruby1.9.3-linux-gcc4.4.5-1002/support/lib/phusion_passenger/utils.rb:470:in `safe_fork' 
    /home/getaasciesh3/.passenger/standalone/3.0.14-x86_64-ruby1.9.3-linux-gcc4.4.5-1002/support/lib/phusion_passenger/rack/application_spawner.rb:166:in `handle_spawn_application' 
    /home/getaasciesh3/.passenger/standalone/3.0.14-x86_64-ruby1.9.3-linux-gcc4.4.5-1002/support/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop' 
    /home/getaasciesh3/.passenger/standalone/3.0.14-x86_64-ruby1.9.3-linux-gcc4.4.5-1002/support/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously' 
    /home/getaasciesh3/.passenger/standalone/3.0.14-x86_64-ruby1.9.3-linux-gcc4.4.5-1002/support/lib/phusion_passenger/abstract_server.rb:180:in `start' 
    /home/getaasciesh3/.passenger/standalone/3.0.14-x86_64-ruby1.9.3-linux-gcc4.4.5-1002/support/lib/phusion_passenger/rack/application_spawner.rb:129:in `start' 
    /home/getaasciesh3/.passenger/standalone/3.0.14-x86_64-ruby1.9.3-linux-gcc4.4.5-1002/support/lib/phusion_passenger/spawn_manager.rb:253:in `block (2 levels) in spawn_rack_application' 
    /home/getaasciesh3/.passenger/standalone/3.0.14-x86_64-ruby1.9.3-linux-gcc4.4.5-1002/support/lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add' 
    /home/getaasciesh3/.passenger/standalone/3.0.14-x86_64-ruby1.9.3-linux-gcc4.4.5-1002/support/lib/phusion_passenger/spawn_manager.rb:246:in `block in spawn_rack_application' 
    /home/getaasciesh3/.passenger/standalone/3.0.14-x86_64-ruby1.9.3-linux-gcc4.4.5-1002/support/lib/phusion_passenger/abstract_server_collection.rb:82:in `block in synchronize' 
    <internal:prelude>:10:in `synchronize' 
    /home/getaasciesh3/.passenger/standalone/3.0.14-x86_64-ruby1.9.3-linux-gcc4.4.5-1002/support/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize' 
    /home/getaasciesh3/.passenger/standalone/3.0.14-x86_64-ruby1.9.3-linux-gcc4.4.5-1002/support/lib/phusion_passenger/spawn_manager.rb:244:in `spawn_rack_application' 
    /home/getaasciesh3/.passenger/standalone/3.0.14-x86_64-ruby1.9.3-linux-gcc4.4.5-1002/support/lib/phusion_passenger/spawn_manager.rb:137:in `spawn_application' 
    /home/getaasciesh3/.passenger/standalone/3.0.14-x86_64-ruby1.9.3-linux-gcc4.4.5-1002/support/lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application' 
    /home/getaasciesh3/.passenger/standalone/3.0.14-x86_64-ruby1.9.3-linux-gcc4.4.5-1002/support/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop' 
    /home/getaasciesh3/.passenger/standalone/3.0.14-x86_64-ruby1.9.3-linux-gcc4.4.5-1002/support/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously' 
    /home/getaasciesh3/.passenger/standalone/3.0.14-x86_64-ruby1.9.3-linux-gcc4.4.5-1002/support/helper-scripts/passenger-spawn-server:99:in `<main>' 
+0

顯示我們的錯誤在你的日誌請 – Dty 2012-07-26 23:30:46

+0

這裏我粘貼從生產的錯誤信息登錄。這是多次嘗試之一的錯誤。他們都有同樣的錯誤。 – 2012-07-26 23:35:20

+0

您的rails網站在本地工作嗎? – Dty 2012-07-27 00:01:47

回答

1

這可能沒有關係,但你:

gem 'sqlite3' 

group :development, :test do 
    gem 'sqlite3' 
end 
... 
gem 'mysql2' 

嘗試刪除第一參考SQLITE3因爲你不希望它在生產中。

正如我所說的,它可能不會對這個特定問題的任何區別,但它會節省你在後面的麻煩就

更新

反對使用客運和RVM的dreamhost wiki提醒,因爲他們不要一起玩得很好。閱讀標題爲「故障排除」的部分。他們建議切換到系統安裝的紅寶石。

如果您想嘗試,你可能會需要從environment.rb

好運刪除提及RVM

+0

謝謝我這樣做,但主要問題仍然存在 – 2012-07-26 23:46:42

+0

我跑了遷移。什麼都沒發生:/ – 2012-07-26 23:53:56

+0

@AsishBhattarai,我在上面更新了我的答案。 – stephenmurdoch 2012-07-27 00:07:17