We started to hear rumours that TDD is dead, Ruby on Rails is dead. Yeah, right. This is a tutorial on developing a simple Ruby on Rails app and deploying it to Heroku. In lithuanian @ VilniusRB 2014-11-22, WIX office.
View Slide
DOMAS BITVINSKASdomasbitvinskas.com@Nedomas
NAUDOKITJAVASCRIPT
FUCK JAVASCRIPT
MYLIU JAVASCRIPTMYLIU RUBY!MYLIU PHP*
Draugai, kurie myli RailsusDraugai, kurie nekenčia Railsų
RAILSAI KEIČIA PASAULĮ
ŽMONĖMSRAILSAI -DHH
BOOK
RAILS KARKASAS
Post
content:stringPost
Postcontent:stringusername:string
railsnewserver
railsnewservergenerate
rake db:migrate
BENDRUOMENĖ
Gemfilegem "twitter-bootstrap-rails"
rails generatebootstrap:install static
HTMLListing posts…Juoda maike ir…Domas……
app/views/posts/index.html.erbListing posts<% @posts.each do |post| %><%= post.content %><%= post.username %>…<% end %>…RUBY/ERB
app/views/posts/index.html.erbListing posts<% @posts.each do |post| %><%= post.content %><%= post.username %><% end %>RUBY/ERB
Ačiū!
Užduotis
rails new pavadinimascd pavadinimasrails serverrails generate scaffold Post content:string username:stringrake db:migrategem “twitter-bootstrap-rails" įdėti į Gemfilebundle installrails generate bootstrap:install staticPažiūrėti http://getbootstrap.com/css ir įdėti blockquotesį app/views/posts/index.html.erbgem “sqlite3”, group: :development į Gemfilegem “pg”, group: :production į Gemfilegem “rails_12factor”, group: :production į Gemfilebundle install --without productionUžsiregistruoti heroku.com ir įsirašyti Heroku Toolbeltheroku create; git init; git add .; git commit -m “Initial”git push heroku master; heroku run rake db:migrate