Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Ruby on the Web
Search
Diego Guerra Suárez
March 06, 2015
Programming
0
65
Ruby on the Web
Slides from the second day of the ruby@uniovi workshop
Diego Guerra Suárez
March 06, 2015
Tweet
Share
More Decks by Diego Guerra Suárez
See All by Diego Guerra Suárez
Reruby: Automated refactoring with Ruby
dgsuarez
0
170
Programas que se entienden a sí mismos
dgsuarez
0
87
Curando el bacilo enmiequipus funcionabilis
dgsuarez
1
170
Ruby Basics
dgsuarez
0
77
Other Decks in Programming
See All in Programming
GitHub Copilot and GitHub Codespaces Hands-on
ymd65536
2
150
Android 16KBページサイズ対応をはじめからていねいに
mine2424
0
240
CDK引数設計道場100本ノック
badmintoncryer
2
410
MCPを使ってイベントソーシングのAIコーディングを効率化する / Streamlining Event Sourcing AI Coding with MCP
tomohisa
0
160
TypeScriptでDXを上げろ! Hono編
yusukebe
3
690
ふつうの技術スタックでアート作品を作ってみる
akira888
1
1.1k
“いい感じ“な定量評価を求めて - Four Keysとアウトカムの間の探求 -
nealle
2
11k
Startups on Rails in Past, Present and Future–Irina Nazarova, RailsConf 2025
irinanazarova
0
200
Agentic Coding: The Future of Software Development with Agents
mitsuhiko
0
120
Git Sync を超える!OSS で実現する CDK Pull 型デプロイ / Deploying CDK with PipeCD in Pull-style
tkikuc
4
290
脱Riverpod?fqueryで考える、TanStack Queryライクなアーキテクチャの可能性
ostk0069
0
340
初学者でも今すぐできる、Claude Codeの生産性を10倍上げるTips
s4yuba
16
12k
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Side Projects
sachag
455
42k
Raft: Consensus for Rubyists
vanstee
140
7k
Embracing the Ebb and Flow
colly
86
4.7k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
5.9k
Rails Girls Zürich Keynote
gr2m
95
14k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
750
Building an army of robots
kneath
306
45k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Documentation Writing (for coders)
carmenintech
72
4.9k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.6k
A better future with KSS
kneath
238
17k
Transcript
Ruby on the web Ruby: from 0 to 100 in
14400 seconds (2) ruby@uniovi: Introducing the Ruby programming language School of Computer Sciences University of Oviedo March 2015
Git
git clone REPO_URL # make changes… git status git commit
-am “Commit message” git push
cd /vagrant/projects/jukebox-sinatra git pull #updates repo state git checkout workshop
#switches branch Let’s type!
git config --global user.email "a@b.com" git config --global user.name "user
random"
TIP: Use it in your thesis always ;) https://education.github.com
Tests
“Code without tests is bad code. ” - Michael C.
Feathers Working Effectively with Legacy Code
Unit Tests Integration Tests Acceptance Tests Smoke / Mutation /
Stress TDD / BDD
TIP: Use it in your thesis always ;) http://betterspecs.org/
Web Dev
None
None
None
Blocks
some_method do |param| param * 2 end
Sinatra
Time to code! Exercise #0 Hello, world! @ Sinatra https://trello.com/b/ziGtcloe/day-2-user-stories
None
ERB
<ul> <% @artists.each do |artist| %> <li><%= artist.name %></li> <%
end %> </ul>
html = “<ul>” @artists.each do |artist| html << “<li>” html
<< artist.name html << “</li>” end html << “</ul>”
get “/” do erb :”home/show” end
None
None
None
Persistence
None
class Artist include Mongoid::Document field :name, :type => String embeds_many
:songs end
> a = Artist.create(:name => “Billy Strayhorn”) #=> #<Artist …
name: “Billy Strayhorn”>
> Artist.where(:name => “Duke Ellington”).first #=> #<Artist … name: “Duke
Ellington”>
post “/artist” do artist = Artist.create(params) redirect “/artists” end
None
Heroku
None
$ heroku login $ heroku create $ bin/set_mongolab_in_heroku $ git
push heroku workshop:master $ heroku logs -t
& Rails?
To learn more...
None
https://github.com/ruby-uniovi
Happy hacking! :-) Tw: @pablorc @varezhh @dg_suarez @dcarral