Ruby on Rails tutorial part two

2019-09-25 07:26发布

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条回答
来,给爷笑一个
2楼-- · 2019-09-25 07:55

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/
查看更多
登录 后发表回答