Bug 1065006 - Rails app does not work with custom route to index.html
Summary: Rails app does not work with custom route to index.html
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Image
Version: 1.x
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: ---
Assignee: Michal Fojtik
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-13 16:59 UTC by Oleg Fayans
Modified: 2023-09-14 02:03 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-03-05 09:48:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
modified files (5.98 KB, application/gzip)
2014-02-13 16:59 UTC, Oleg Fayans
no flags Details

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


Note You need to log in before you can comment on or make changes to this bug.