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
72
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Ruby on the Web
Slides from the second day of the ruby@uniovi workshop
Diego Guerra Suárez
March 06, 2015
More Decks by Diego Guerra Suárez
See All by Diego Guerra Suárez
Reruby: Automated refactoring with Ruby
dgsuarez
0
180
Programas que se entienden a sí mismos
dgsuarez
0
92
Curando el bacilo enmiequipus funcionabilis
dgsuarez
1
180
Ruby Basics
dgsuarez
0
81
Other Decks in Programming
See All in Programming
TAKTでAI駆動開発の品質を設計する
j5ik2o
7
1.6k
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.7k
AI時代のUIはどこへ行く?その2!
yusukebe
22
7.7k
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
260
Hatena Engineer Seminar #37「言語モデルの活用に関する研究」
slashnephy
0
430
自作OSでスライド発表する
uyuki234
0
2.7k
ランチタイムLT会3周年!ランチタイムLT会を3年間続けられたお話
y0hgi
1
120
LaravelLive Japan の裏方のすべて — 第188回 PHP勉強会@東京 (2026-06-24)
suguruooki
2
140
エージェンティックRAGにAWSで入門しよう!
har1101
9
1.8k
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
430
任せる範囲はこう広がった / How the Scope of AI Delegation Has Expanded
nrslib
1
220
ローカルLLMでどこまでコードが書けるか -縮小版 / How much code can be written on a local LLM Shortened
kishida
2
150
Featured
See All Featured
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.5k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.3k
Music & Morning Musume
bryan
47
7.3k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
550
AI: The stuff that nobody shows you
jnunemaker
PRO
8
750
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
380
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.4k
For a Future-Friendly Web
brad_frost
183
10k
Site-Speed That Sticks
csswizardry
13
1.2k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1k
Abbi's Birthday
coloredviolet
3
8.4k
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 "
[email protected]
" 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