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
68
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
88
Curando el bacilo enmiequipus funcionabilis
dgsuarez
1
170
Ruby Basics
dgsuarez
0
79
Other Decks in Programming
See All in Programming
はじめてのカスタムエージェント【GitHub Copilot Agent Mode編】
satoshi256kbyte
0
180
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
640
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
150
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
670
ELYZA_Findy AI Engineering Summit登壇資料_AIコーディング時代に「ちゃんと」やること_toB LLMプロダクト開発舞台裏_20251216
elyza
2
1.1k
DevFest Android in Korea 2025 - 개발자 커뮤니티를 통해 얻는 가치
wisemuji
0
180
CSC307 Lecture 04
javiergs
PRO
0
640
CSC307 Lecture 02
javiergs
PRO
1
760
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
130
AgentCoreとHuman in the Loop
har1101
5
170
The Art of Re-Architecture - Droidcon India 2025
siddroid
0
160
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
190
Featured
See All Featured
Become a Pro
speakerdeck
PRO
31
5.8k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Designing for Performance
lara
610
70k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
0
290
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.3k
Ethics towards AI in product and experience design
skipperchong
1
170
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
Designing Powerful Visuals for Engaging Learning
tmiket
0
200
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Agile that works and the tools we love
rasmusluckow
331
21k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
150
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