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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
89
Curando el bacilo enmiequipus funcionabilis
dgsuarez
1
180
Ruby Basics
dgsuarez
0
80
Other Decks in Programming
See All in Programming
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
2k
ふん…おもしれぇ Parser。RubyKaigi 行ってやるぜ
aki_pin0
0
110
あなたはユーザーではない #PdENight
kajitack
4
290
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
7
2.6k
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
200
「やめとこ」がなくなった — 1月にZennを始めて22本書いた AI共創開発のリアル
atani14
0
320
DSPy入門 Pythonで実現する自動プロンプト最適化 〜人手によるプロンプト調整からの卒業〜
seaturt1e
1
350
個人開発は儲からない - それでも開発開始1ヶ月で300万円売り上げた方法
taishiyade
0
120
CopilotKit + AG-UIを学ぶ
nearme_tech
PRO
1
110
Head of Engineeringが現場で回した生産性向上施策 2025→2026
gessy0129
0
200
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
5
900
エージェント開発初心者の僕がエージェントを作った話と今後やりたいこと
thasu0123
0
200
Featured
See All Featured
Un-Boring Meetings
codingconduct
0
220
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Utilizing Notion as your number one productivity tool
mfonobong
3
230
Become a Pro
speakerdeck
PRO
31
5.8k
Skip the Path - Find Your Career Trail
mkilby
0
69
Paper Plane
katiecoart
PRO
0
47k
What does AI have to do with Human Rights?
axbom
PRO
0
2k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
140
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
350
Between Models and Reality
mayunak
1
210
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Context Engineering - Making Every Token Count
addyosmani
9
710
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