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
69
0
Share
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
170
Programas que se entienden a sí mismos
dgsuarez
0
89
Curando el bacilo enmiequipus funcionabilis
dgsuarez
1
180
Ruby Basics
dgsuarez
0
80
Other Decks in Programming
See All in Programming
今からFlash開発できるわけないじゃん、ムリムリ! (※ムリじゃなかった!?)
arkw
0
190
RSAが破られる前に知っておきたい 耐量子計算機暗号(PQC)入門 / Intro to PQC: Preparing for the Post-RSA Era
mackey0225
3
120
AI活用のコスパを最大化する方法
ochtum
0
370
ローカルで稼働するAI エージェントを超えて / beyond-local-ai-agents
gawa
2
260
まかせられるPM・まかせられないPM / DevTech GUILD Meetup
yusukemukoyama
0
110
今年もTECHSCOREブログを書き続けます!
hiraoku101
0
230
ふりがな Deep Dive try! Swift Tokyo 2026
watura
0
110
AI時代のPhpStorm最新事情 #phpcon_odawara
yusuke
0
130
Vibe하게 만드는 Flutter GenUI App With ADK , 박제창, BWAI Incheon 2026
itsmedreamwalker
0
540
今こそ押さえておきたい アマゾンウェブサービス(AWS)の データベースの基礎 おもクラ #6版
satoshi256kbyte
1
230
Go_College_最終発表資料__外部公開用_.pdf
xe_pc23
0
130
Coding as Prompting Since 2025
ragingwind
0
760
Featured
See All Featured
Un-Boring Meetings
codingconduct
0
260
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
510
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Google's AI Overviews - The New Search
badams
0
960
Ruling the World: When Life Gets Gamed
codingconduct
0
190
Done Done
chrislema
186
16k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
130
Game over? The fight for quality and originality in the time of robots
wayneb77
1
160
We Are The Robots
honzajavorek
0
210
The Spectacular Lies of Maps
axbom
PRO
1
680
Documentation Writing (for coders)
carmenintech
77
5.3k
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