我一步一步地遵循本教程。我的 ruby 版本是 1.9.3,rails 版本是 3.2.16。
但仍然无法工作。给我一个错误:
NameError
undefined local variable or method `netzke' for #<ActionDispatch::Routing::Mapper:0x007ffcb24eb590>
Rails.root: /Users/USER/MyGit/a
看来是root错误,所以我更改了root文件
前:
netzke
root to: "welcome#index"
后:
root to: "welcome#index"
但是当再次运行时,它会给我带来另一个错误:
NoMethodError in Welcome#index
Showing /Users/tangmonk/MyGit/a/app/views/welcome/index.html.erb where line #1 raised:
undefined method `netzke' for #<#<Class:0x007ffcb29cad40>:0x007ffcb29c8248>
Extracted source (around line #1):
1: <%= netzke :tasks, height: 400 %>
Rails.root: /Users/tangmonk/MyGit/a
我将rails版本更改为4.0,但问题仍然存在。
所以,我希望有人能帮助我。