Skip to content

Commit 067b698

Browse files
committed
Add a step to create a root route
We discovered that rails 4.0 on heroku would throw an exception going to the index page if you did not have a root route defined.
1 parent 483d829 commit 067b698

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

sites/installfest/get_a_sticker.step

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,27 @@ git commit -m "Add pg gem for Heroku."
214214
GIT_COMMIT
215215
result "[master 4a275be] Add pg gem for Heroku.
216216
2 files changed, 6 insertions(+)"
217+
218+
message "Use your editor to open the routes.rb (`C:\\sites\\sticker\\config\\routes.rb` or `~/sticker/config/routes.rb`) and find the line containing:"
217219

218-
message "The name of your heroku app will be different. That is fine."
220+
source_code :ruby, <<-RUBY
221+
# root 'welcome#index'
222+
RUBY
223+
224+
message "Remove this line and replace it with"
225+
226+
source_code :ruby, <<-RUBY
227+
root 'drinks#index'
228+
RUBY
229+
230+
message "Commit this change"
231+
232+
console <<-GIT_COMMIT
233+
git add .
234+
git commit -m "Changed root route"
235+
GIT_COMMIT
236+
237+
message "The name of your heroku app will be different. That is fine."
219238

220239
console "heroku create"
221240
result <<-HEROKU_CREATE

0 commit comments

Comments
 (0)