jhass[m] changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.1.2, 3.0.4, 2.7.6: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ
bogn has quit [Quit: Konversation terminated!]
<John_Ivan> ox1eef, yup. that's more or less what I felt dissapointed in. :)
bogn has joined #ruby
<bogn> Thanks for your help ox1eef
<bogn> bye all
<ox1eef> see you
bogn has quit [Client Quit]
sgt_chuckles has quit [Quit: Client closed]
<John_Ivan> ox1eef, maybe sinatra may not be the best place to start with ruby web development after all. is there any framework that is "learning" oriented that covers basic topics as well?
RickHull has joined #ruby
<weaksauce> that's a pretty cool use case for that debugging
ur5us_ has quit [Ping timeout: 248 seconds]
infernix has joined #ruby
kinduff has quit [Ping timeout: 240 seconds]
artemon has quit [Ping timeout: 240 seconds]
hideki0[m] has quit [Ping timeout: 252 seconds]
Mikaela- has quit [Ping timeout: 240 seconds]
coolshaurya has quit [Ping timeout: 256 seconds]
jhass[m] has quit [Ping timeout: 256 seconds]
iramaro[m] has quit [Ping timeout: 260 seconds]
sixecho has quit [Ping timeout: 260 seconds]
sagax has quit [Remote host closed the connection]
<adam12> John_Ivan: What's missing or what you're finding a challenge?
<weaksauce> John_Ivan rails is pretty well documented and has good guides
<weaksauce> tons of tutorials
<John_Ivan> adam12, weaksauce well, it's not my difficulty of using a framework. it's just that, I never had any formal education on actual web concepts. like I obviously can go putting together a fullstack webapp. but a lot of concepts like serialization, MIME types, webserver path directives, **conventions and general web flow** (e.g how a certain aspect of a web process is implemented [e.g webservers directory to serve user files, ACLs, minification,
<John_Ivan> flow of pages, etc])
<John_Ivan> adam12, weaksauce, in short I lack the theory behind how web stuff works. but not to a level where I'm completely ignorant.
kinduff has joined #ruby
<John_Ivan> maybe I should say I lack how "SOME" webapp related concepts are implemented.
jhass[m] has joined #ruby
<John_Ivan> I don't know the conventions people take
<John_Ivan> and the "norm" of how certain tasks are achieved.
<weaksauce> it's antiquated piled on top of antiquated
Rounin has quit [Ping timeout: 252 seconds]
<adam12> John_Ivan: Seems like things you could learn as you encounter them?
<John_Ivan> I guess.
<weaksauce> do you understand how the webserver can keep track of your "state" even though the web is inherently stateless
artemon has joined #ruby
<John_Ivan> that I do, yes. though I will say that I find it annoying how state can be implemented through many ways.
<John_Ivan> browser side. server side. cookies. html5 database....
<weaksauce> yeah the web is messy
<John_Ivan> weaksauce, here's one particular confusion I have. apache http uses Directives to specify access to certain folders the application is allowed to read from
<John_Ivan> that's config on the webserver
<weaksauce> sure
<John_Ivan> but there's also ACLs in the framework itself!
<weaksauce> yeah that makes sense
<John_Ivan> and sometimes you just don't find a certain way of implementing something (was trying to look how to define a custom directive grant access for sinatra for example)
<John_Ivan> found nothing!
<John_Ivan> so I thought - "do I look into their puma light webserver config...?"
<John_Ivan> "do I get apache httpd?2
<John_Ivan> do I keep digging sinatra dogs?
<weaksauce> normally webservers serve up static assets and then run as a reverse proxy for an application server
<weaksauce> so the static assets would be served by directives in apache or the like but dynamic content would be served by the app server like puma
<weaksauce> and the authorization would be done by the app server based on something like "ok is this user an admin" or "is the user allowed to see this"
<adam12> John_Ivan: If you're using Sinatra (or Ruby in general), just forget about Apache. It's useful to know for LAMP stack but not for Ruby.
<weaksauce> and i'd say use a more modern webserver like caddy
<John_Ivan> hmm
<John_Ivan> I see
sixecho has joined #ruby
<adam12> Or even just forget about them for now and deploy to Heroku, Fly, or Render.
coolshaurya has joined #ruby
<John_Ivan> Yeah, no worries. Thanks, I appreciate all the info. Just right now, it's a little late so I can't push further asking any more questions.
<John_Ivan> 2:28am here. mind's fuzzy.
hideki0[m] has joined #ruby
<adam12> Yah
<adam12> I'd just say you're overthinking it.
<weaksauce> yeah at the end of the day it's basically just a bunch of text being slung around
ur5us_ has joined #ruby
sagax has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
iramaro[m] has joined #ruby
artemon has quit [Ping timeout: 240 seconds]
Mikaela- has joined #ruby
artemon has joined #ruby
RickHull has quit [Ping timeout: 260 seconds]
Glitch85678 has quit [Quit: Connection closed for inactivity]
Ziyan has joined #ruby
<ox1eef> check out roda, sinatra is great but to a certain extent frozen in time
RickHull has joined #ruby
johnjaye has quit [Ping timeout: 246 seconds]
johnjaye has joined #ruby
FetidToot6 has joined #ruby
reset has quit [Ping timeout: 260 seconds]
FetidToot has quit [Ping timeout: 276 seconds]
FetidToot6 is now known as FetidToot
trillp has joined #ruby
Pixi` has quit [Quit: Leaving]
RickHull has quit [Ping timeout: 260 seconds]
Pixi has joined #ruby
Furai has quit [Quit: WeeChat 3.5]
Furai has joined #ruby
teclator has joined #ruby
RickHull has joined #ruby
dionysus69 has quit [Read error: Connection reset by peer]
dionysus70 has joined #ruby
dionysus70 is now known as dionysus69
roadie has joined #ruby
RickHull has quit [Read error: Connection reset by peer]
dionysus69 has quit [Quit: dionysus69]
dionysus70 has joined #ruby
dionysus70 has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
ur5us_ has quit [Ping timeout: 240 seconds]
Jonopoly has joined #ruby
dionysus69 has quit [Remote host closed the connection]
trillp has left #ruby [Leaving]
Rounin has joined #ruby
floss-jas has quit [Ping timeout: 250 seconds]
ur5us_ has joined #ruby
fercell has joined #ruby
dionysus69 has joined #ruby
teclator has quit [Quit: No Ping reply in 180 seconds.]
teclator has joined #ruby
dionysus69 has quit [Ping timeout: 276 seconds]
gr33n7007h has quit [Quit: WeeChat 3.5]
gr33n7007h has joined #ruby
dionysus69 has joined #ruby
hideki0[m] has quit [Quit: You have been kicked for being idle]
reset has joined #ruby
Ziyan has quit [Ping timeout: 276 seconds]
Ziyan has joined #ruby
Ziyan has quit [Ping timeout: 240 seconds]
Ziyan has joined #ruby
goldfish has joined #ruby
goldfish has quit [Read error: Connection reset by peer]
Aminda has joined #ruby
jtdowney has left #ruby [Bye]
enyc has quit [Ping timeout: 248 seconds]
Ziyan has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
ur5us_ has quit [Ping timeout: 260 seconds]
Ziyan has joined #ruby
Mikaela- has quit [Quit: issued !quit command]
jpn has joined #ruby
enyc has joined #ruby
jpn has quit [Ping timeout: 240 seconds]
Ziyan has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Ziyan has joined #ruby
Ziyan has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Ziyan has joined #ruby
Ziyan has quit [Client Quit]
Aminda has quit [Remote host closed the connection]
postmodern has quit [Remote host closed the connection]
Aminda has joined #ruby
Ziyan has joined #ruby
szkl has joined #ruby
crimsonkinda has joined #ruby
emcb545 has joined #ruby
emcb54 has quit [Ping timeout: 252 seconds]
emcb545 is now known as emcb54
jpn has joined #ruby
roadie has quit [Ping timeout: 260 seconds]
jpn has quit [Ping timeout: 276 seconds]
bit4bit has joined #ruby
bit4bit has quit [Client Quit]
roadie has joined #ruby
roadie has quit [Ping timeout: 260 seconds]
hellstabber has joined #ruby
gr33n7007h has quit [Read error: Connection reset by peer]
jpn has joined #ruby
roadie has joined #ruby
hellstabber has quit [Quit: Textual IRC Client: www.textualapp.com]
jpn has quit [Ping timeout: 256 seconds]
hellstabber has joined #ruby
hellstabber has quit [Client Quit]
hellstabber has joined #ruby
roadie has quit [Ping timeout: 260 seconds]
totoro has quit [Quit: ZNC 1.8.2 - https://znc.in]
totoro has joined #ruby
totoro has quit [Client Quit]
totoro has joined #ruby
roadie has joined #ruby
tonytonyjan has joined #ruby
tonytonyjan has quit [Client Quit]
tonytonyjan has joined #ruby
tonytonyjan has quit [Client Quit]
roadie has quit [Ping timeout: 260 seconds]
roadie has joined #ruby
gr33n7007h has joined #ruby
<John_Ivan> weaksauce, would you mind if we go over what we started last night?
Ziyan has quit [Ping timeout: 256 seconds]
kaleido has quit [Quit: peas]
Ziyan has joined #ruby
_ht has joined #ruby
kaleido has joined #ruby
kaleido has quit [Changing host]
kaleido has joined #ruby
roadie has quit [Quit: ERC (IRC client for Emacs 25.3.50.1)]
tonytonyjan34 has joined #ruby
Ziyan has quit [Ping timeout: 246 seconds]
Ziyan has joined #ruby
tonytonyjan34 has quit [Client Quit]
tonytonyjan has joined #ruby
tonytonyjan has quit [Client Quit]
roadie has joined #ruby
roadie has quit [Client Quit]
protektwar has quit [Remote host closed the connection]
protektwar has joined #ruby
protektwar has joined #ruby
protektwar has quit [Changing host]
tonytonyjan has joined #ruby
johnjaye has quit [Ping timeout: 246 seconds]
fercell has quit [Quit: ZNC - https://znc.in]
fercell has joined #ruby
crimsonkinda has quit [Remote host closed the connection]
___nick___ has joined #ruby
___nick___ has quit [Client Quit]
___nick___ has joined #ruby
<weaksauce> John_Ivan sure
<John_Ivan> weaksauce, so, you were saying that, originally, the webserver was to simply serve static pages.
<John_Ivan> weaksauce, and that any "webapplication" is a reverse proxy done by the webserver?
<weaksauce> yeah the webserver is something like nginx/apache/caddy and it serves us primarily static assets and routes dynamic stuff(well a subset of the urls you specify) to the application server
oxfuxxx has joined #ruby
<weaksauce> so it may say serve /static/* directly or /images/* directly or javascript or stylesheets but then outside of the few folders you decide are static assets woul be routed to the application
<weaksauce> which in and of itself has a notion of routes
<John_Ivan> weaksauce, I see. so two entities. the webserver and it's static files + routes. and the webapp which is itself and it's routes.
<weaksauce> yeah basically
<John_Ivan> Let me write this down so I don't forget
<weaksauce> there's also a slightly more complicated version that will try to serve files in a directory if it can but then fallback to the application server but that's a little fringe
<John_Ivan> weaksauce, I see. where do miscellaneous other webservers stand? say for example ruby's WEBRick?
<weaksauce> that's a toy hybrid but mainly a webserver
<weaksauce> you wouldn't use that for anything other than toy scripts
fef has joined #ruby
<John_Ivan> weaksauce, understood. puma as well? the default that comes with sinatra.
<weaksauce> app server that's you'd proxy to
<weaksauce> of course it can serve static assets like it does in development
<weaksauce> but that's not the primary use of it
<weaksauce> you would want to use something like the heavy hitters (nginx/apache/caddy) because they do the load balancing/are faster at static serving/etc.
<weaksauce> lower memory overhead probably too
<John_Ivan> ok
<John_Ivan> weaksauce, now, what about paths? so the ones I know of are:
<John_Ivan> /public - accessible to everyone.
<John_Ivan> /var/www - ...? index path?
<John_Ivan> / application server root?
<John_Ivan> /templates - ERB files/partials
<John_Ivan> I think that's all I know mostly.
dionysus69 has quit [Ping timeout: 256 seconds]
<weaksauce> eh it's kinda up to you on paths and what they mean
<John_Ivan> weaksauce, hmm, then let me ask differently. let's say I had files that anyone can access no matter the authorization. they can easily be grabbed by a direct path which translates to a direct file e.g "/folder/files.txt" - these would go in /public on the webserver side?
<weaksauce> that's a common convention
<John_Ivan> weaksauce, ok. now what about files that a user uploads to your web application and are accessible only to himself?
<weaksauce> that's an authorization command
<weaksauce> so it would be typically handled by your app server portion and separate from static images
<John_Ivan> sure. but they have to be stored somewhere
<weaksauce> that's up to you. in a folder somewhere generally. could be s3
<weaksauce> or some other service
<John_Ivan> up to me.. so it could just be a directory in the root of the application server's path called /per_user_files ? where inside there's a /per_user_files/2536346 representing each user?
<weaksauce> there are a lot of ways to skin that cat yeah
oxfuxxx has quit [Ping timeout: 260 seconds]
<weaksauce> but importantly it's outside any statically served paths
oxfuxxx has joined #ruby
<John_Ivan> weaksauce, understood. neat! now, what about source code or files that only the webserver should have access to such as temporary files created locally? they go in / (root) of the webapp server?
<John_Ivan> or **any folder that's outside any statically served paths?**
<weaksauce> generally you would have /var/www/ be the root of all that
<weaksauce> and then a subfolder having the static assets
<weaksauce> i'd do the rails getting started guide and poke around that to see a well configured basic webapp... poke around the directories
<John_Ivan> alright then. thank you
Ziyan_ has joined #ruby
Ziyan has quit [Ping timeout: 246 seconds]
tonytonyjan has quit [Quit: leaving]
<weaksauce> no worries
<weaksauce> pretty thorough overview of it all
tonytonyjan has joined #ruby
<John_Ivan> weaksauce, cheers
TomyWork has joined #ruby
tonytonyjan has quit [Ping timeout: 252 seconds]
oxfuxxx has quit [Quit: quit]
tonytonyjan has joined #ruby
tonytonyjan has quit [Client Quit]
tonytonyjan has joined #ruby
FetidToot has quit [Quit: The Lounge - https://thelounge.chat]
FetidToot has joined #ruby
dionysus69 has joined #ruby
emcb548 has joined #ruby
CrazyEddy has joined #ruby
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
emcb54 has quit [Ping timeout: 260 seconds]
emcb548 is now known as emcb54
___nick___ has joined #ruby
fef has quit [Ping timeout: 240 seconds]
tonytonyjan has quit [Quit: leaving]
tonytonyjan has joined #ruby
Ziyan_ has quit [Ping timeout: 240 seconds]
Ziyan has joined #ruby
tonytonyjan has quit [Quit: leaving]
tonytonyjan has joined #ruby
dionysus69 has quit [Ping timeout: 256 seconds]
protektwar has quit [Ping timeout: 252 seconds]
dionysus69 has joined #ruby
_ht has quit [Remote host closed the connection]
___nick___ has quit [Ping timeout: 256 seconds]
Ziyan has quit [Quit: Textual IRC Client: www.textualapp.com]
ssh073 has joined #ruby
victori has quit [Quit: ZNC 1.8.2 - https://znc.in]
victori has joined #ruby
jpn has joined #ruby
jpn_ has joined #ruby
jpn has quit [Ping timeout: 260 seconds]
kiki_lamb has joined #ruby
TomyWork has quit [Quit: Leaving]
TomyWork has joined #ruby
jpn_ has quit [Ping timeout: 260 seconds]
TomyWork has quit [Client Quit]
oxfuxxx has joined #ruby
ur5us_ has joined #ruby
oxfuxxx has quit [Ping timeout: 252 seconds]
victori has quit [Quit: ZNC 1.8.2 - https://znc.in]
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
victori has joined #ruby
leachim6 has quit [Quit: WeeChat 2.3]
<ox1eef> Rails has already figured out all the questions you asked, RAILS_ROOT/public being from where static assets are served, and when it comes to image assets, there's usually a plugin or gem that does all that for you. i wouldnt recommend going too far down that path, youll learn a lot more if you make the decisions rather than rails, which can be like a magic box sometimes.
pusewic|away__ has quit [Ping timeout: 256 seconds]
pusewic|away__ has joined #ruby
ssh0735 has joined #ruby
ssh073 has quit [Ping timeout: 240 seconds]
ssh0735 is now known as ssh073
floss-jas has joined #ruby
Sankalp has quit [Ping timeout: 240 seconds]
Sankalp has joined #ruby
dionysus69 has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
szkl has quit [Quit: Connection closed for inactivity]
dionysus69 has quit [Quit: dionysus69]
dionysus69 has joined #ruby