Bug 1065006

Summary: Rails app does not work with custom route to index.html
Product: OpenShift Online Reporter: Oleg Fayans <ofayans>
Component: ImageAssignee: Michal Fojtik <mfojtik>
Status: CLOSED NOTABUG QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: unspecified    
Version: 1.xCC: amarecek, ofayans
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-05 09:48:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
modified files none

Description Oleg Fayans 2014-02-13 16:59:03 UTC
Created attachment 862901 [details]
modified files

Description of problem:
When I remove the default index.html and put the custom route in the routes.rb, the main page of the app is inaccessible

Version-Release number of selected component (if applicable):
devenv_4370 (ami-afa0a5c6)

How reproducible:
Always

Steps to Reproduce:
1. create a rails app from code https://github.com/openshift/rails-example.git
2. add execjs and therubyracer to the Gemfile, execute "bundle install", git push
3. execute "rails generate controller welcome index"
4. Create a file app/views/welcome/index.html.erb with the following conent:
<h1>Hello, Rails!</h1>
5. git rm public/index.html
6. Add the custom route:
sed -i -e 's/^end$/  root :to => "welcome#index"\nend/' config/routes.rb
7. git add . ; git commit -am "test" ; git push
8. Access the app's url 
 
Actual results:
HTTP 404

Expected results:
"Hello Rails" is displayed

Additional info:
The routes.rb and index.html is attached

Comment 1 Michal Fojtik 2014-02-18 15:27:41 UTC
Oleg I cannot reproduce this in devenv anymore, I followed your steps and I got the 'Hello, Rails!' page.

Was the application you created scalable or not?

Comment 2 Red Hat Bugzilla 2023-09-14 02:03:35 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days