-
Notifications
You must be signed in to change notification settings - Fork 0
TryRubyTutorial
Anatoly Lapshin edited this page Feb 21, 2012
·
12 revisions
... Describe what should be as a result of tutorial ...
Lets get started. First of all we have to make new rails application and add it to Github:
$ rails new try-ruby --database=postgresql
$ cd try-ruby
$ git add .
$ git commit -m 'Initial commit'
$ git remote add origin git@github.com:holywarez/try-ruby.git
$ git push -u origin masterIgnore unnecessary IDE files:
$ cat ".idea" >> .gitignore
$ git commit -am 'gitignore updated'Update database config to use trusted connection to Postgresql server:
$ cat config/database.yml | sed -e 's/username: try-ruby/username: /g' > config/database.yml
$ git commit -am 'simplify database conf'... Steps describe how to implement first version of UI for project ...
Add first controller: HomeController with 'index' action
$ rails g controller Home indexAnd make it an entry point by replacing (config/routes.rb):
get "home_controller/index"with:
root to: 'home#index', via: 'get'Always check the result of changes of routes.rb:
$ rake routesNow output of this command should be:

And don't forget to remove public/index.html
$ rm public/index.html