Skip to content

Instantly share code, notes, and snippets.

@DouglasAllen
Last active September 30, 2015 16:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DouglasAllen/1824968 to your computer and use it in GitHub Desktop.
Save DouglasAllen/1824968 to your computer and use it in GitHub Desktop.
public controller
$ gem install rails
$ rails new testapp
$ cd testapp

If you would like to serve a local copy of the welcome page for Rails.

$ rails generate controller public
$ cd config

# copy this code into routes.rb
Testapp::Application.routes.draw do
  root :to => 'public#index'
end
# find the public/index.html welcome page that used to come in a new app but is now serverd somewhere from rails gem.
$ mkdir ./app/views/public
$ cp ./public/index.html ./app/views/public/index.html.erb
$ rails server
$ firefox http://localhost:3000/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment