howdoi has quit [Quit: Connection closed for inactivity]
jenrzzz has quit [Ping timeout: 256 seconds]
alexherbo26 has joined #ruby
alexherbo2 has quit [Ping timeout: 240 seconds]
alexherbo26 is now known as alexherbo2
chalkmonster has quit [Quit: WeeChat 2.8]
sagax has joined #ruby
mossplix has quit [Remote host closed the connection]
Mia has quit [Read error: Connection reset by peer]
Mia has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
jenrzzz has joined #ruby
ldepandis has joined #ruby
mossplix has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
bocaneri has quit [Ping timeout: 246 seconds]
salerace has joined #ruby
alexherbo2 has quit [Read error: Connection reset by peer]
drincruz has joined #ruby
alexherbo2 has joined #ruby
bocaneri has joined #ruby
bocaneri has quit [Max SendQ exceeded]
drincruz has quit [Ping timeout: 260 seconds]
bocaneri has joined #ruby
dfucci has quit [Ping timeout: 258 seconds]
dfucci has joined #ruby
seaef has joined #ruby
jenrzzz has joined #ruby
seaef has quit [Quit: ZZZzzz…]
Industrial has joined #ruby
imadper has quit [Read error: Connection reset by peer]
imode has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
BH23 has quit [Ping timeout: 246 seconds]
bamdad has joined #ruby
<Industrial>
Is there a "proper" way to remove something from a hash?
<Industrial>
oh, #delete :p
<Industrial>
that was pathetic ..
<Industrial>
xD
ellcs1 has joined #ruby
tau has quit [Ping timeout: 246 seconds]
bamdad has quit [Quit: quit]
bamdad has joined #ruby
BH23 has joined #ruby
ellcs1 has quit [Ping timeout: 260 seconds]
oddp has joined #ruby
<Industrial>
Hi. Say I have a `module A def handle_A_foo(connection, payload) ... end, ... end` and I have a `module B def handle_B_foo(connection, payload) ... end, ... end` and I have a `class MyClass include A include B ... def handle_message(connection, payload) ... end ... end`. Depending on the contents of the payload in handle_message, I need to send it to a method. Can I select the method from the current
<Industrial>
instance using two variables?
BH23 has quit [Ping timeout: 258 seconds]
jenrzzz has joined #ruby
lightstalker has quit [Ping timeout: 256 seconds]
BH23 has joined #ruby
bamdad has quit [Quit: quit]
bamdad has joined #ruby
lightstalker has joined #ruby
snuz has joined #ruby
drincruz has joined #ruby
arahael2 is now known as Arahael
drincruz has quit [Ping timeout: 260 seconds]
fabio__ has quit [Ping timeout: 240 seconds]
salerace has quit [Quit: quit]
snuz has quit [Ping timeout: 260 seconds]
ldepandis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
snuz has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
mossplix has quit [Ping timeout: 264 seconds]
phoo1234567 has joined #ruby
phoo1234567 has quit [Client Quit]
phoo1234567 has joined #ruby
phoo1234567 has quit [Client Quit]
schne1der has joined #ruby
phoo1234567 has joined #ruby
jenrzzz has joined #ruby
clemens3 has joined #ruby
alexherbo24 has joined #ruby
alexherbo2 has quit [Ping timeout: 265 seconds]
alexherbo24 is now known as alexherbo2
akem has quit [Ping timeout: 240 seconds]
d3fault0ptions has joined #ruby
d3fault0ptions has left #ruby [#ruby]
u0_a260 has joined #ruby
colins has joined #ruby
nofxx_ has quit [Remote host closed the connection]
nofxx_ has joined #ruby
dualfade has quit [Ping timeout: 246 seconds]
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
Industrial has quit [Ping timeout: 260 seconds]
sleetdrop has joined #ruby
drincruz has joined #ruby
drincruz has quit [Ping timeout: 256 seconds]
sleetdrop has quit [Ping timeout: 256 seconds]
colins has quit [Quit: WeeChat 2.8]
jenrzzz has quit [Ping timeout: 256 seconds]
skx86 has joined #ruby
cliluw has quit [Ping timeout: 240 seconds]
cliluw has joined #ruby
bkuhlmann has joined #ruby
u0_a260 has quit [Quit: WeeChat 2.8]
bkuhlman_ has quit [Ping timeout: 240 seconds]
ellcs1 has joined #ruby
jenrzzz has joined #ruby
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
tau has joined #ruby
tau has quit [Changing host]
tau has joined #ruby
mossplix has joined #ruby
tau has quit [Client Quit]
mossplix has quit [Ping timeout: 264 seconds]
schne1der has quit [Ping timeout: 260 seconds]
Industrial has joined #ruby
shansen has quit [Quit: ZNC 1.7.4+deb0+bionic0 - https://znc.in]
<Industrial>
Hi.
<Industrial>
How do I group a bunch of functions together so that I can index them with a variable? `collection[myvar](a, b, c)` ?
shansen has joined #ruby
<Industrial>
I want to avoid a huge nested case situation :p
bsdbandit-01 has quit [Quit: -a- Connection Timed Out]
bkuhlman_ has joined #ruby
nofxx has quit [Remote host closed the connection]
nofxx has joined #ruby
bkuhlmann has quit [Ping timeout: 260 seconds]
bsdbandit-01 has joined #ruby
TCZ has joined #ruby
akem has joined #ruby
jenrzzz has joined #ruby
norayr has quit [Ping timeout: 240 seconds]
norayr has joined #ruby
TCZ has quit [Quit: Leaving]
bsdbandit-01 has quit [Quit: -a- Connection Timed Out]
bsdbandit-01 has joined #ruby
schne1der has joined #ruby
TCZ has joined #ruby
DTZUZU_ is now known as DTZUZU
gr33n7007h has joined #ruby
al2o3-cr has quit [Ping timeout: 256 seconds]
troulouliou_div2 has joined #ruby
<mydog2>
morn...
<havenwood>
mydog2: hi
<mydog2>
is it "hard/easy/reasonable" to convert a ruby/rails app to php/apache?
<havenwood>
mydog2: that sounds hard and unreasonable on first impression. say more?
<havenwood>
mydog2: That said, if it's a trivially simple app, it could be easy.
<havenwood>
mydog2: What does the app do?
<mydog2>
there's an app.. prelaunchr in github. it's ruby/rails, running on heroku. i'm interested in having the app work on centos/apache, and then if it "looks" reasonable, having the functions/features I need merged into another app
<mydog2>
the other app would probably be php/symphony based..
gr33n7007h is now known as al2o3-cr
<havenwood>
mydog2: I'm not familiar with that Rails app, so I don't have a difficulty estimate.
<mydog2>
prelaunchr as an app is used to collect emails, and to build a viral graph of users who sign up, as well as refer other users
<havenwood>
mydog2: I have run Rails alongside a PHP app before. It's fairly common to reverse proxy from Apache to Rails.
<mydog2>
is the github repo if it woud help to take a quick look
<mydog2>
let me step back.. how easy is it to take a ruby/rails app thats running on heroku.. ad move it into/on centos/apache?
<havenwood>
mydog2: Glancing, I'd think you could reproduce this in Symphony fairly simply.
<havenwood>
mydog2: Yes, you can run a Rails app on CentOS/Apache.
<mydog2>
haven't found many articles/sites on what the process would consist
<mydog2>
consist of
rippa has joined #ruby
<havenwood>
mydog2: Typically, you set up Rails with SystemD so it stays up then edit your Apache conf to reverse proxy some routes to the socket Puma is running on.
<mydog2>
I say symphony, due to my understanding that Drupal (as well as Drupal based apps) are symphony.. I could be wrong here
<mydog2>
havenwood, -- so what you
<havenwood>
mydog2: This Rails app looks dated, so you might just want to port the functionality to a Drupal plugin (or whatever you do in Drupal?).
<mydog2>
havenwood, -- so what you're saying.. is that if I research.. I should find information on doing this!!
<havenwood>
mydog2: If it was a complex, maintained app, you could just run it alongside PHP.
<havenwood>
mydog2: We can help you get Rails running on CentOS with Apache, if you decide to go that way.
<mydog2>
havenwood, -- it is dated. which is why I want to get it up/running, so I can "see" what it kind of does in the current state..
<havenwood>
mydog2: I've used Passenger's Apache module before on CentOS with a Rails app that was a sub path of a PHP app. It worked fine.
<mydog2>
I can then determine if there's enough of what I want there to port it over or if I should just do the mods in the Drupal app from Scratc
<mydog2>
scratch
<havenwood>
mydog2: The two main options for running Rails on Apache/CentOS are Passenger's Apache module or the more common route of just "reverse proxying."
<mydog2>
Ive had other people on IRC be less than forthcoming with pointers/help!
<mydog2>
alright.. so .. let me figure out how to clone the repo.. and get started on this path
<havenwood>
mydog2: My suspicion is that you should reproduce this functionality for Drupal in PHP.
<mydog2>
worse case.. I'll create a test digitalocean VM.. and allow anyone who wants to shed some pointers to access the VM..
<havenwood>
mydog2: You absolutely *can* get this Rails app working, but I think your time might be better spent on a Drupal plugin—or whatever the norm is in Drupal.
<havenwood>
mydog2: If you'd like to get Rails running for whatever reason, happy to help.
<mydog2>
havenwood, -- I'm not a drupal dev.. in fact, I don't claim to be a dev at all.. those days are long gone.. but I do need to put the time in to be able to "show" a dev.. this is what I'm going for..
<havenwood>
mydog2: This Rails app is unfortunately dated, which make it harder.
<mydog2>
thanks for yur discussion.. 'ppreciate it
<havenwood>
mydog2: To run it, you'd install Ruby 2.1 on CentOS, then `gem install bundler` and `cd` into the app dir and run `bundle install`.
<havenwood>
mydog2: You'd then be able to run the app with: rails s
<havenwood>
mydog2: You can then setup Apache reverse proxy to the port the app is running on to test it.
<havenwood>
mydog2: For real, you
mossplix has quit [Remote host closed the connection]
yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
jenrzzz has quit [Ping timeout: 240 seconds]
<havenwood>
you'll then want to use SystemD and change the reverse proxy from the port to the socket of the service.
<mydog2>
ok.. so the reverse proy fits within the virthost block
<mydog2>
ok.. more investigation/research.. no porb..
<mydog2>
gives me a basic path
yxhuvud has joined #ruby
<havenwood>
mydog2: Since this app hasn't been updated in years, you may run into more difficulty getting Ruby and gems to compile than you'd have with a modern Rails app.
<havenwood>
Then again, CentOS loves old.
<havenwood>
mydog2: Good luck!
<havenwood>
mydog2: I still suspect your hunch you should port this to PHP is correct.
<havenwood>
Either that or get off Drupal. :P
<mydog2>
Hey .. the drupal thing.. is due to my having found the "community" app that can be ripped apart for the overall project.
<mydog2>
I suspect at some point.. there might be a rewrite. beggars can't be choosers
<havenwood>
mydog2: What does "community". do?
<havenwood>
Like FaceBook for cats type of thing?
<havenwood>
Or forums?
<havenwood>
mydog2: Diapora is the Ruby goto for community or Discourse for forums.
TCZ has quit [Quit: Leaving]
bsdbandit-01 has quit [Quit: -a- Connection Timed Out]
<havenwood>
mydog2: Are either of those ^ along the lines of what you're thinking?
<mydog2>
looked at diaspora before.. might be worth rechecking
<mydog2>
discourse .. being focused on discussion -not so much.. the "pod" nature of diaspora.. didnt dig too deeply into it.
<mydog2>
the community app/process will be the function that a user who wants to oin gets to sign up for, connect with others.. search others, etc..
<mydog2>
drupal+openSocial appears t provide this.. nd can be modified..
<mydog2>
it's a process
<havenwood>
mydog2: I'd pick either PHP or Ruby. You *can* do both but don't.
<havenwood>
mydog2: You might consider a custom Rails app from scratch.
<havenwood>
mydog2: Both Discourse and Diaspora and the dated app you're looking at are all Rails apps.
norayr has quit [Ping timeout: 258 seconds]
<mydog2>
thanks..
<havenwood>
A Rails dev can typically spin up a prototype quickly.
bsdbandit-01 has joined #ruby
<havenwood>
mydog2: The #rubyonrails channel or more popular Slack Rails channel have a bunch of Rails devs.
<mydog2>
something to think about.. keep in mind.. small personal project.. means small budget!
<havenwood>
Dunno why the Rails devs went to Slack? IRC forever!!
<mydog2>
I respect people wanting their cash/$$
<havenwood>
mydog2: Rails if fun to learn, in any case. Great docs.
<havenwood>
Still quite challenging.
<mydog2>
this is just the small initial piece... the overall project is to allow us college students to acquire cheaper textbooks .. think chegg+groupon
mossplix has joined #ruby
<havenwood>
mydog2: That reminds me of another Ruby app my girlfriend wrote. It's Roda not Rails, but it lets you use your Goodreads bookshelf to either exchange books irl or get ebooks from the local library. https://www.yonderbook.com/
<havenwood>
mydog2: Basically each web request runs a script which spins up then dies.
<mydog2>
hey havenwood -- it appears that passenger is a mod used by apache for rails instead or reverse-proxy?
<havenwood>
mydog2: Yes, Passenger is unique in that it has an Apache mod option. There's also a "standalone" Passenger that you can reverse proxy to like Puma, the default.
<havenwood>
mydog2: Happy to say more. Have more questions?
<mydog2>
not for now. at some time i might need to see an eample apache conf file or a rails app aswell as a regular app with aliases as well as virtualhost blocks for both ..but i'm not there yet
<havenwood>
CGI had Perl, PHP, Python, Ruby and friends all trying to start up fast since every request had to wait on the VM to load.
<havenwood>
PHP loads super fast for this reason.
<havenwood>
FCGI came along to make it faster. (Fast)CGI.
<havenwood>
(Is it "Fast?")
<havenwood>
Dunno.
<havenwood>
But afaik it spins up VMs ahead of time so they're ready for requests.
<havenwood>
Instead of playing the CGI game, Ruby opted for a convention around a tool called "Rack."
<havenwood>
Rails is a Rack app.
<havenwood>
With Rack, you keep the VM spun up through multiple requests. It stays up instead of dying.
<havenwood>
This it typical these days for web requests across many langs.
<mydog2>
got it.. thanks
<havenwood>
mydog2: Apache is handling your FCGI but it can also gracefully just hand traffic to Rack.
<havenwood>
Many folk still use Apache in front of Rack apps, since Apache is battle tested and handles serving static files very well.
<havenwood>
Hack is a Rack-like VM to contrast with plain modern CGI PHP.
jenrzzz has joined #ruby
<havenwood>
I said that poorly. Rack is a webserver not VM, but my point is it stays running and handles multiple requests via threading, forking, and event loops instead of CGI.
envex has joined #ruby
reaVer has quit [Remote host closed the connection]
tau has quit [Ping timeout: 240 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ldepandis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
reaVer has joined #ruby
wymillerlinux has quit [Ping timeout: 240 seconds]
Technodrome has joined #ruby
BuildTheRobots has quit [Ping timeout: 246 seconds]
BuildTheRobots has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cgfbee has quit [Ping timeout: 256 seconds]
Technodrome has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
<mydog2>
this is totally offtopic.. and I get it!! but for those of you who are old (like me!) -- there used to be a site called "fucked company" -- by a phillip kaplan.
<mydog2>
the site was essentially a "gossip/tmz" kind of site for companies in the dot-com/dot explosion timeframe..
<mydog2>
If you recall the site, get back to me!
Uncle_Cid has quit [Remote host closed the connection]