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
190
Ruby Basics
dgsuarez
0
82
Other Decks in Programming
See All in Programming
霧の中の代数的エフェクト
funnyycat
1
440
GDG Korea Android: 2026 I/O Extended ~ What's new in Android development tools
pluu
0
190
PHP に部分適用が来るぞ!……ところで何それ?おいしいの? #phpcon / phpcon-2026
shogogg
0
430
テーブルをDELETEした
yuzneri
0
120
Laravelで学ぶ Webアプリケーションチューニング入門/web_application_tuning_101
hanhan1978
4
1.4k
광주소프트웨어마이스터고등학교 DevFest 특강 - 바이브 코딩 시대에서 주니어 개발자로 살아남는 방법
utilforever
1
160
SREの積み重ねがAI駆動開発のガードレールになった ― 7つの実践/SRE Guardrails The 7
tomoyakitaura
9
5.8k
Build-to-own AI: Agentic Development for Humans
inesmontani
PRO
0
120
作るコストが小さくなった時代 幸せに働くために改めて考えたいこと 〜エンジニアとして価値を出し続けるために注視している二分野〜
yuppeeng
0
140
今さら聞けない .NET CLI
htkym
0
150
数百円から始めるRuby電子工作
tarosay
0
120
【やさしく解説 設計編・中級 #6】良いアーキテクチャとは ~ 一本の登り道の、行き先 ~
panda728
PRO
0
190
Featured
See All Featured
RailsConf 2023
tenderlove
30
1.5k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
330
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
400
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
KATA
mclloyd
PRO
35
15k
30 Presentation Tips
portentint
PRO
1
360
Building Applications with DynamoDB
mza
96
7.1k
Designing for humans not robots
tammielis
254
26k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
360
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
Fireside Chat
paigeccino
42
4k
Into the Great Unknown - MozCon
thekraken
41
2.6k
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