Ruby on Rails tutorial part two

淺唱寂寞╮ 提交于 2019-12-13 11:19:57

问题


I keep getting stock [sic] in a RoR tutorial. Part 1 is here. After doing that, I ran the command:

rails generate devise User

Not sure if that is the correct code to type as the tutorial is not clear. I'm not sure what the command does, and which files are connected to what etc. I get an error:

/home/sam/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-4.2.4/lib/action_dispatch/routing/mapper.rb:260:in `block (2 levels) in check_controller_and_action': 'BookmarksController' is not a supported controller name. This can lead to potential routing problems. See http://guides.rubyonrails.org/routing.html#specifying-a-controller-to-use (ArgumentError)

Any help is appreciated.


回答1:


Change the following from

root :to => "BookmarksController#index"

to this

root :to => "bookmarks#index"

Look at these tutorials

  1. http://tryruby.org/
  2. http://railsforzombies.org/


来源:https://stackoverflow.com/questions/33811214/ruby-on-rails-tutorial-part-two

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!