0

我已将以下 Gem 安装到我的 Gemfile 中。 https://github.com/kenpratt/wikipedia-client

我在 home.html.erb 文件中包含了以下代码(主页代码)

<% require 'wikipedia' %>
<% page = Wikipedia.find('Getting Things Done') %>
<h1> <% page.title %> </h1>

但我的主页上没有任何显示。会发生什么?

4

1 回答 1

1

尝试将=符号添加到您的标签:

<h1> <%= page.title %> </h1>
于 2013-08-17T23:23:19.397 回答