在Rails 4上安装Mercury Editor已返回路由错误

Dav*_*ley 1 ruby-on-rails mercury-editor ruby-on-rails-4

安装Mecury Editor后,当我尝试启动服务器时,我得到以下内容:

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"
Run Code Online (Sandbox Code Playgroud)

这是路线文件

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
Run Code Online (Sandbox Code Playgroud)

我已经尝试编辑路由文件,但我一直得到同样的错误

我希望这与对routes.rb文件缺乏了解有关.

小智 5

今天我也有这个问题.您似乎安装了过时版本的mercury-rails.更新到master将解决此问题,因此在您的Gemfile中更改为:

gem 'mercury-rails', :git => 'git://github.com/jejacks0n/mercury.git'
Run Code Online (Sandbox Code Playgroud)

我也不得不清空我的rvm gemset.跑完之后

rvm gemset empty gemset_name && bundle install
Run Code Online (Sandbox Code Playgroud)

我有一个最新版本的汞及其依赖项,这个错误消失了......

一定要安装0.9.0版本,因为这是当前的主...

PS:如果您打算运行映像迁移,则必须在此处应用此补丁:

#443上的水星拉动请求