0
votes

I am attempting to test deployment of a sample rails application on the Google Compute Engine with Bitnami. I am following:

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

I have been through all the steps multiple times but the sample rails app I am deploying does not appear, only the base RubyStack splash page appears when I direct to the URL:

enter image description here

How can I make my sample application appear? Not the ruby stack splash page?

1

1 Answers

0
votes

In a rails application the routes control (where the paths go) are in 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

The most important part is the root. This defines what the home / will show.

You can see all the routes by running "rake routes" in the terminal.

You can find more information in the Rails Guides