Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/66.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails Nitrous.IO--只能预览默认网页_Ruby On Rails - Fatal编程技术网

Ruby on rails Nitrous.IO--只能预览默认网页

Ruby on rails Nitrous.IO--只能预览默认网页,ruby-on-rails,Ruby On Rails,在Nitrous.IO框中为RubyonRails环境进行设置相当容易,但我在预览站点上的浏览器实用程序以查看似乎使用$rails服务器命令运行的应用程序时遇到问题 我的安装显示我已安装以下各项: - ruby 2.1.1p76 - Rails 4.1.0 - git version 2.0.0 - SQLite3 当我尝试“预览”WEBrick上运行的应用程序时, 我得到一个默认网页,上面写着 Routes are set up in the config/

在Nitrous.IO框中为RubyonRails环境进行设置相当容易,但我在预览站点上的浏览器实用程序以查看似乎使用$rails服务器命令运行的应用程序时遇到问题

我的安装显示我已安装以下各项:

   -  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 IDE中的config/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
你知道我需要做什么才能“预览”开发应用程序吗?

执行预览3000。 您可以获得应用程序正在运行的标准信息 在浏览器的地址栏中添加/删除所需的路线,无需引号。 在我的例子中,它看起来是这样的: 评论索引是我需要的路线。 嗯 /雅切克