2014-02-05 22 views
1

安裝美科星編輯器後,當我嘗試啓動我得到以下服務器:安裝在導軌4水星編輯器返回路由錯誤

in `normalize_conditions!': You should not use the `match` method in your router without specifying an HTTP method. (RuntimeError) 
If you want to expose your action to both GET and POST, add `via: [:get, :post]` option. 
If you want to expose your action to GET, use `get` in the router: 
    Instead of: match "controller#action" 
    Do: get "controller#action" 

這裏的routes文件

Bootcanvise::Application.routes.draw do 

Mercury::Engine.routes 



    resources :newsletters 

    resources :advertisers 

    devise_for :users 
    get "home/index" 
    # The priority is based upon order of creation: first created -> highest priority. 
    # See how all your routes lay out with "rake routes". 

    # You can have the root of your site routed with "root" 
    root 'home#index' 
end 

我我試圖編輯路線文件,但我一直得到相同的錯誤

我期望這是與對routes.rb文件缺乏理解。

回答

5

今天我也有這個問題。看來你安裝了過時的水銀軌。 更新到主會解決這個問題,所以在你的Gemfile改成這樣:

gem 'mercury-rails', :git => 'git://github.com/jejacks0n/mercury.git' 

我不得不清空我RVM寶石了。運行

rvm gemset empty gemset_name && bundle install 

後,我有汞及其依賴的先進的最新版本,但此錯誤消失......

確保安裝0.9.0版本,因爲這是當前的主...

PS:如果你打算運行圖像遷移,你要在這裏應用這個補丁:

Mercury pull request on #443

+1

寶石卸載「水銀軌道」爲我工作,我沒有完全消滅我的寶石。 –

+0

只需運行'bundle update mercury-rails'。這就夠了 – catsky

0

你的水星寶石創建的路線導致了問題。

您需要修改水星創建的路線(目前的寶石......在我寫這篇文章的時候)會爲你做到這一點:

routes.rb改變這一行:

Mercury::Engine.routes 

要這樣:

mount Mercury::Engine => '/' 

之後,你應該是好去!