rails "No route matches" 錯(cuò)誤的解決方法
更新時(shí)間:2008年12月22日 15:31:51 作者:
有時(shí)候 rails 會(huì)出現(xiàn)
有時(shí)候 rails 會(huì)出現(xiàn):
"No route matches"錯(cuò)誤,
可以利用如下方法解決;
找到 config/routes.rb 文件, 打開編輯, 找到如下行:
# See how all your routes lay out with "rake routes"
在這行下面添加一行, 內(nèi)容如下:
map.connect '',:controller=>"index",:action=>"index"
解決no such file to load — Mysql
> rails -d mysql myapp
"No route matches"錯(cuò)誤,
可以利用如下方法解決;
找到 config/routes.rb 文件, 打開編輯, 找到如下行:
# See how all your routes lay out with "rake routes"
在這行下面添加一行, 內(nèi)容如下:
map.connect '',:controller=>"index",:action=>"index"
解決no such file to load — Mysql
復(fù)制代碼 代碼如下:
> rails -d mysql myapp
您可能感興趣的文章:
- Ruby rails 頁面跳轉(zhuǎn)(render和redirect_to)
- Rails link_to 詳解
- rails常用數(shù)據(jù)庫查詢操作、方法淺析
- 學(xué)習(xí)Ruby你需要了解的相關(guān)知識(shí)(rvm, gem, bundle, rake, rails等)
- Windows下Ruby on Rails開發(fā)環(huán)境安裝配置圖文教程
- ruby on rails 代碼技巧
- 攻克CakePHP(PHP中的Ruby On Rails框架)圖文介紹
- rails 連接mysql的問題解決
- 在阿里云 (aliyun) 服務(wù)器上搭建Ruby On Rails環(huán)境
- CentOS中配置Ruby on Rails環(huán)境
- win7安裝ruby on rails開發(fā)環(huán)境
- 以MVC的思維方式來理解Ruby on Rails框架的設(shè)計(jì)結(jié)構(gòu)
相關(guān)文章
Ruby中實(shí)現(xiàn)統(tǒng)計(jì)文件行數(shù)、單詞數(shù)和字符數(shù)
這篇文章主要介紹了Ruby中實(shí)現(xiàn)統(tǒng)計(jì)文件行數(shù)、單詞數(shù)和字符數(shù),本文是自定義的一個(gè)函數(shù),需要的朋友可以參考下2015-01-01mac及l(fā)inux下搭建ruby+rails環(huán)境
本文給大家分享了如何在mac以及Linux系統(tǒng)中安裝ruby+rails環(huán)境,非常詳細(xì),而且有圖有真相,希望大家能夠喜歡2017-11-11Ruby學(xué)習(xí)筆記二幫助生成Vim添加代碼頭的代碼
這篇文章主要介紹了Ruby幫助生成Vim添加代碼頭的代碼,需要的朋友可以參考下2014-07-07