我正在阅读 railstutorial.org 的书,并在代码中出现编译时错误
<div class="center hero-unit">
<h1>Welcome to the Sample App</h1>
<h2>
This is the home page for the
<a href="http://railstutorial.org/">Ruby on Rails Tutorial</a>
sample application.
</h2>
<%= link_to "Sign up now!", '#', class: "btn btn-large btn-primary" %>
</div>
<%= link_to image_tag("rails.png", alt: "Rails"), 'http://rubyonrails.org/' %>
我的错误是
compile error
/home/ritesh/projects/sample/app/views/static_pages/home.html.erb:8: syntax error, unexpected ':'
...to "Sign up now!", '#', class: "btn btn-large btn-primary" )...
^
/home/ritesh/projects/sample/app/views/static_pages/home.html.erb:10: syntax error, unexpected ':', expecting ')'
...to image_tag("rails.png", alt: "Rails"), 'http://rubyonrails...
^
/home/ritesh/projects/sample/app/views/static_pages/home.html.erb:10: syntax error, unexpected ')', expecting kEND
...), 'http://rubyonrails.org/' );@output_buffer.safe_concat('
^
我想:下课后应该在那里。有人可以建议如何纠正这个错误