ruby自带的webrick服务器怎么启动不了?

Python012

ruby自带的webrick服务器怎么启动不了?,第1张

首先 rails学习建议使用 1.8.7+rails2 ,rails3目前资料过少 ,aglie webdevelopment with rails 第四版还在英文beta中

其次 , 除了1.8.6 one-click安装包外 ,其他的ruby发行版都不包含 mysql链接库和sqlite3链接库 ,需要手动下载安装

其他的1楼描述的很明确了 , rails3 很多东西都做了修改 ,比如新建项目变为 rails new projectname, webrick的启动变为 rails s 等

我个人还是认为rails最好的开发学习平台是MacosX ,其次是Linux ,windows下面先天不足

puts "hello 是写在rb文件中的

eg

app/controllers/hello_controller.rb #画面的控制

class HelloController <ActionController

def index

@hello = "hello"

puts @hello # "hello"

end

end

app/views/hello/index.rhtml

<table border="1">

<tr>

<td><%=@hello%></td> #@hello 或者$hello 这种变量才能在页面中使用

</tr>

</table>

地址是:http://localhost:3000/hello/say