Rails 请教一个问题,首页<Welcome aboard> 已经修改了,为啥不生效呢

crabby · 2012年03月13日 · 最后由 Crabby 回复于 2012年03月13日 · 3701 次阅读

按照网上的参考,http://guides.ruby.tw/rails3/getting_started.html 1.删除,delete public/index.html,我已操作完毕了 2.生成 rails generate controller home index 3.修改 route,我的如下

# Sample resource route within a namespace: # namespace :admin do # # Directs /admin/products/* to Admin::ProductsController # # (app/controllers/admin/products_controller.rb) # resources :products # end

# You can have the root of your site routed with "root" # just remember to delete public/index.html. root :to => "home#index"

而我的 index 页面如下: [Crabby@Crabby-Lee home]$ more index.html.erb

Hello,crabby,Come on ,Fighting

<%= link_to "My Blog",posts_path %>

Find me in app/views/home/index.html.erb

[Crabby@Crabby-Lee home]$ pwd /home/Crabby/weblog/app/views/home

我已重启了 server WEBrick,但是还是没有生效,咋回事儿呀,没法进行下一步了~

那现在输出什么?

#1 楼 @Rei 多谢你的回复。现在输出,还是原来的样子,

还是:

Welcome aboard You’re riding Ruby on Rails! About your application’s environment

Getting started Here’s how to get rolling:

Use rails generate to create your models and controllers To see all available options, run it without parameters.

#1 楼 @Rei 现在突然好了,真是叫人崩溃 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 多谢了哈,(^__^) 嘻嘻……

*问题已经解决,结帖咯,谢谢各位 XDJM *

问题已经解决,结帖咯,谢谢各位 XDJM

需要 登录 后方可回复, 如果你还没有账号请 注册新账号