在Nitrous.IO框中设置RubyonRails环境相当容易,但我在使用预览(网站上的浏览器实用程序)来查看似乎正在使用$ rails server命令运行的应用程序时遇到了问题。
我的安装显示我安装了以下软件:
- ruby 2.1.1p76
- Rails 4.1.0
- git version 2.0.0
- SQLite3当我尝试“预览”在WEBrick上运行的应用程序时,我得到一个默认的网页,上面写着:
Routes are set up in the config/routes.rb
running in development mode and haven't set a root route yet.我在Nitrous.IO集成开发环境中检查了配置/routes.rb文件,它包含以下内容:
Rails.application.routes.draw.do
resources :comments (from $ rails generate scaffold comment post_id:integer /
body:text [this was second of two commands] )
resources :posts ( $ rails generate scaffold post title:string body:text /
[this was run 1st of these two commands] )
( post and comment database tables created with: $ rake db:migrate )
# lines 6 -> 59 are comments giving coding examples of routes)
end你知道我需要做什么才能“预览”开发应用吗??
发布于 2014-08-18 04:19:13
执行预览3000。在浏览器的地址栏中添加“/(您需要的路由)”(不带引号),即可获得应用程序正在运行的标准信息。在我的例子中,它看起来是这样的:"comments#index“是我需要的路由。HTH /Jacek
https://stackoverflow.com/questions/25344925
复制相似问题