删除在Bitnami / Google Engine上部署的RubyStack启动页面

时间:2015-03-10 03:09:40

标签: ruby-on-rails ruby google-compute-engine bitnami

我正在尝试使用Bitnami在Google Compute Engine上测试示例rails应用程序的部署。我跟着:

https://wiki.bitnami.com/Components/Ruby_on_Rails#How_to_create_a_new_Rails_Web_application

我已多次执行所有步骤,但我没有出现我正在部署的示例rails应用程序,当我指向URL时只显示基本RubyStack启动页面:

enter image description here

如何让我的示例应用程序出现?不是ruby堆栈启动页面?

1 个答案:

答案 0 :(得分:0)

在rails应用程序中,路由控制(路径所在的位置)位于config / routes.rb

SampleApp::Application.routes.draw do
  resources :users do
  member do
    get :following, :followers
  end
  end
  resources :sessions,      only: [:new, :create, :destroy]
  resources :microposts,    only: [:create, :destroy]
  resources :relationships, only: [:create, :destroy]
  root to: 'static_pages#home'
  match '/signup',  to: 'users#new',            via: 'get'
  match '/signin',  to: 'sessions#new',         via: 'get'
  match '/signout', to: 'sessions#destroy',     via: 'delete'
  match '/help',    to: 'static_pages#help',    via: 'get'
  match '/about',   to: 'static_pages#about',   via: 'get'
  match '/contact', to: 'static_pages#contact', via: 'get'
end

最重要的部分是根。这定义了家庭/将要展示的内容。

您可以通过在终端中运行“rake routes”来查看所有路线。

您可以在Rails Guides

中找到更多信息