$ rake routes
rake aborted!
ArgumentError: Missing :action key on routes definition, please check your routes.
/usr/local/rvm/gems/ruby-2.1.2/gems/actionpack-4.1.5/lib/action_dispatch/routing/mapper.rb:243:in `default_controller_and_action'
/usr/local/rvm/gems/ruby-2.1.2/gems/actionpack-4.1.5/lib/action_dispatch/routing/mapper.rb:117:in `normalize_options!'
/usr/local/rvm/gems/ruby-2.1.2/gems/actionpack-4.1.5/lib/action_dispatch/routing/mapper.rb:65:in `initialize'
/usr/local/rvm/gems/ruby-2.1.2/gems/actionpack-4.1.5/lib/action_dispatch/routing/mapper.rb:1487:in `new'
/usr/local/r................
這裏是我的routes.rb
Rails.application.routes.draw do
get 'script/index'
get 'landing/index'
root 'landing/index'
end
什麼原因造成的問題,如何解決它。
我不知道爲什麼這個工程 – 2016-04-08 10:31:27
基本上你定義都如何根會看(左),以及導軌如何實際找到它(右)。 – tfantina 2016-11-04 22:20:47
重要提示:在**右側**使用**#**符號。 (這是我的錯誤原因。) – Beauty 2017-05-28 14:25:00