刚刚通过Homebrew的ruby-install在我的iMac(10.10.2)上安装了Ruby 2.1.3。我已经使用了ruby 2.0.0p481,但是也安装了Rails并且想要更新Ruby。正如我所说,ruby-install确实安装了Ruby 2.1.3,但是当我使用'ruby-v'时,我仍然得到ruby 2.0.0p481。我想使用2.1.3但无法理解为什么它在安装后没有被使用。
感谢。
答案 0 :(得分:0)
尝试brew link Ruby
,它应该将您的Ruby与家庭酿造链接到您在命令行上使用的Ruby。
答案 1 :(得分:0)
在命令行类型<%
Dim records(3, 6)
records(0, 0) = 1
records(1, 0) = 0
records(3, 0) = ".0."
records(2, 0) = "Home"
records(0, 1) = 2
records(1, 1) = 1
records(3, 1) = ".0.1."
records(2, 1) = "About"
records(0, 2) = 3
records(1, 2) = 1
records(3, 2) = ".0.1."
records(2, 2) = "Contact"
records(0, 3) = 4
records(1, 3) = 2
records(3, 3) = ".0.1.2."
records(2, 3) = "What we do"
records(0, 4) = 5
records(1, 4) = 3
records(3, 4) = ".0.1.3."
records(2, 4) = "Employees"
records(0, 5) = 6
records(1, 5) = 5
records(3, 5) = ".0.1.3.5."
records(2, 5) = "Full time"
records(0, 6) = 7
records(1, 6) = 5
records(3, 6) = ".0.1.3.5."
records(2, 6) = "Part time"
function tree(parent, arrPages)
children = false
for x = 0 to ubound(arrPages, 2)
if (cint(arrPages(1, x)) = parent) then
if (children = false AND parent > 0) then
children = true
Response.Write("<ul>")
end if
%>
<li>
<%=arrPages(2,x)%>
<% Call Tree(arrPages(0,x), arrPages) %>
</li>
<%
end if
next
if (children = true AND parent > 0) then
%></ul><%
end if
end function
Response.Write "<ul>"
Call tree(0, records)
Response.Write "</ul>"
%>