exhiled has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<baweaver>
keyword arguments are pretty useful for defaults: def initialize(database_file: DATABASE_FILE)
<baweaver>
Line 12 doesn't make much sense there considering you're just outputting the value of that constant
<baweaver>
Now then, what exactly are you trying to set and why do you need to modify a constant?
yeticry has joined #ruby
<mikhael_k33hl>
baweaver: during test, I just want to change the location to the current testing directory. Tried initializing it on my spec file with let(:database) { MirrorDatabase.new(:database_file => TEST_DATABASE_FILE) } but it doesn't seem to work
drowze has quit [Ping timeout: 248 seconds]
evenix has quit [Remote host closed the connection]
troys_ is now known as troys
<baweaver>
define doesn't seem to
alfiemax has joined #ruby
<mikhael_k33hl>
baweaver: oh what's the best way of defining relative path?
<baweaver>
that's not what I asked.
<mikhael_k33hl>
baweaver: like the spec file is inside the spec/unit/lib directory . . . but my overriding value is TEST_DATABASE_FILE = 'spec/unit/test_data_dir/mirror_test.db'. Oh sorry about that, what I meant was it doesn't seem to be able to find the file
evenix has joined #ruby
<baweaver>
so your path ends up being spec/unit/lib/spec/unit/test_data_dir/mirror_test.db
<baweaver>
and your debugging statement won't do anything
<Sparda>
i can't figure it out what is the problem.
<Burgestrand>
Sparda a first note of etiquette, it's also customary to paste longer lines of text into a web based service suitable for such a task, and then sending a link to the result, as opposed to into the channel; don't worry about it for now, but remember it for the next time :)
<Burgestrand>
Sparda the message you're receiving is typically due to a dependency that is expected to be around has not yet been pulled in, typically through e.g. `require 'thedependency'`
rrutkowski has quit [Ping timeout: 240 seconds]
<Burgestrand>
Sparda it could also be an order-of-operations problem, in that the dependency is pulled in too late
<Burgestrand>
Sparda _and_ it could simply be a logical error of the developer, there are probably more causes but it's hard to tell without the source code at hand
<Sparda>
they should be in the correct order as i see it.
aupadhye has joined #ruby
<Burgestrand>
Sparda unfortunately the computer says no!
<ruby[bot]>
Sparda: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<Sparda>
i see that it doesn't work. that's unfortunately
<Sparda>
i'll use gist.github from now. i'll wait for your response after you take a look at the basic structure.
zipkid has quit [Ping timeout: 258 seconds]
micalexander has quit [Ping timeout: 258 seconds]
Travis-42 has joined #ruby
lipoqil has joined #ruby
<Burgestrand>
Sparda I can understand the error, and I believe your expectation is that `Ext` should be available, but for some reason neither 'sketchup.rb' nor 'extensions.rb' define it, which is your problem
<Sparda>
yeah what you said made me realize it.
<Sparda>
i check the folder which happened to missing the two files: Sketchup.rb and Extension.rb
guille-moe has quit [Ping timeout: 255 seconds]
micalexander has joined #ruby
<Sparda>
i will need to get the files. so hold on.
Dimik has quit [Ping timeout: 268 seconds]
marr has joined #ruby
<Burgestrand>
Sparda ruby works in such a way that not all dependencies need to be located in the same folder, there's a package/dependency management system called rubygems, which most likely has the files you're requiring
<Burgestrand>
Sparda otherwise you'd get an error that the required files are not available
<Sparda>
oh i dont know about the rubygems, i am an idiot.
<Sparda>
but somehow, my instinct knew the real reason why i am getting these error message is due to 2 missing files.
guille-moe has joined #ruby
ppm_floss has quit [Ping timeout: 240 seconds]
gone_haywire has joined #ruby
<Burgestrand>
Sparda inexperience is not idiocy, you can't know the unknown :)
spastorino has quit [Ping timeout: 258 seconds]
miky_ has joined #ruby
<miky_>
hello, I need a bit of help regarding some arrays
<Burgestrand>
Sparda and once again, I'm not convinced the files are missing, because if they were _really_ missing then you'd get an error about the files missing
<Burgestrand>
miky_ don't ask to ask, just ask, it's not impolite
<Sparda>
well i can tell you that i am a beginner.
spastorino has joined #ruby
<miky_>
i have an array and all their items are like: [#<User nick="NICKNAME">, ["o"]
<Burgestrand>
Sparda everybody was once :) do you have some kind of documentation or example that you're trying to follow?
<Sparda>
of course i am studying on how to programming because i have good idea of a plugin that could be useful
milardovich has joined #ruby
<miky_>
i need to get the nickname out or this, but is it an array or something?
<Sparda>
yes i have followed a book.
<Sparda>
i have been reading a useful book recommended by someone. via Sketchup Community
ppm_floss has joined #ruby
<Burgestrand>
Sparda ah, paper, is it possible that your book is a few years out of date?
<Burgestrand>
Sparda software moves fast, what was once the truth might now be The Wrong Way (tm)
<Sparda>
well. let me get you the name of that book: The 4th Pragmatic Programmer, Programming Ruby 1.9&2.0” by Dave Thomas with Chad Fowler and Andy Hunt
<Sparda>
yes.. that's why i asked someone in Sketchup Community to ensure that i do not have an outdated book.
<Burgestrand>
Sparda it sounds general enough, is the Sketchup code samples you've provided really from the book, or from somewhere else?
<Sparda>
well i have been looking at the documents provided by other users in sketchup community.. these documents are good example via Github
<Sparda>
of how to build a plugin and other stuff.
<Burgestrand>
(but instead of upcasing the text, you could grab the name from your user)
milardovich has quit [Ping timeout: 240 seconds]
<Burgestrand>
Sparda unfortunately I have no experience with sketchup specifically, but I can tell you that there are two likely culprits to your problem
<Burgestrand>
Sparda 1) you need to require some other dependency that has the `Ext` thing you're adding properties to
<Sparda>
again, the examples is not from the book.. it came from many examples via website called "github"
<Burgestrand>
Sparda 2) Ext is not the name you're supposed to be using, maybe it was the old way, and you should be using something else
<Burgestrand>
Sparda and actually 3) you should be the one creating Ext, which is also a possibility
<Sparda>
alright.
plexigras has quit [Quit: WeeChat 2.0]
<Burgestrand>
Sparda indeed, github is a popular and well-known website, but like any community-like site some content is old, some is new, and some is cutting edge
<Sparda>
yeah
<Sparda>
just a question if you can answer.
<Sparda>
does "Ext" has to do with the fact it require a file such as extension.rb?
<Burgestrand>
Sparda `Ext` is an arbitrary name, likely for a Module (or class), that your code as written expects to be available, and _if_ it would have been available one could have assumed that it would be located in `extension.rb`
<Burgestrand>
Sparda but while there are idioms, customs, and good practice, you can never know for sure without looking, assumptions are not facts or rules :)
<Sparda>
i can tell you i have seen that example before.
<Sparda>
01 hello cube, i have used it before.
<Burgestrand>
Sparda in the example code I linked you, it appears they do not use `Ext`, but instead create something that looks to be a substitute/the new way in `ext = SketchupExtension.new(…)`
<Burgestrand>
Sparda with what I've seen so far, it's reasonable to assume _that_ is what you should do, instead of using `Ext`
celine_ has quit [Quit: Connection closed for inactivity]
csk157 has quit [Ping timeout: 250 seconds]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
ur5us has quit [Remote host closed the connection]
nofxx_ has joined #ruby
yeticry has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Cavallari has joined #ruby
alfiemax has quit [Ping timeout: 248 seconds]
nofxx__ has quit [Ping timeout: 255 seconds]
alfiemax has joined #ruby
jottr has joined #ruby
elphe has joined #ruby
anisha has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
ta__ has quit [Read error: Connection reset by peer]
ta_ has joined #ruby
<loveablelobster>
Hi there, anybody with experience with the sequel gem and inflections? I am having a strange issue where my custom inflections are being ignored
bmarkons has joined #ruby
nofxx_ has quit [Remote host closed the connection]
<bmarkons>
Is it possible to dynamically intercept each statement within a Ruby block?
nofxx has joined #ruby
nofxx has quit [Remote host closed the connection]
agent_white has quit [Ping timeout: 255 seconds]
bmarkons has left #ruby [#ruby]
elphe has quit [Ping timeout: 248 seconds]
qba73 has joined #ruby
kke_ has quit [Quit: Reconnecting]
qba73 has quit [Remote host closed the connection]
kke has joined #ruby
kke has quit [Changing host]
kke has joined #ruby
<kke>
any ideas how you can order by a composite column in sequel? like Items.order("version.major")
qba73 has joined #ruby
RevanOne has quit [Remote host closed the connection]
qba73 has quit [Remote host closed the connection]
ferr has left #ruby ["WeeChat 2.0"]
rbo has joined #ruby
qba73 has joined #ruby
ldnunes has joined #ruby
Neptu has quit [Ping timeout: 252 seconds]
yeticry has quit [Ping timeout: 240 seconds]
zipkid has joined #ruby
mikecmpbll has joined #ruby
<kke>
Items.order("(version).major") does not work either
<kke>
Sequel::DatabaseError: PG::SyntaxError: ERROR: non-integer constant in ORDER BY "ORDER BY '(version)..."
rrutkowski has quit [Ping timeout: 255 seconds]
guardianx has joined #ruby
pifon has joined #ruby
raynold has joined #ruby
yeticry has joined #ruby
sammi` has quit [Quit: leaving]
im0nde has quit [Ping timeout: 255 seconds]
ana_ has quit [Quit: Leaving]
shinnya has joined #ruby
yeticry has quit [Ping timeout: 268 seconds]
RougeT430 has joined #ruby
alex`` has joined #ruby
jaruga has joined #ruby
alex`` has quit [Client Quit]
jottr_ has joined #ruby
alfiemax has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 246 seconds]
alfiemax has joined #ruby
Beams has joined #ruby
guardianx has quit [Read error: Connection reset by peer]
uZiel has quit [Ping timeout: 248 seconds]
guardianx has joined #ruby
friday has quit [Ping timeout: 240 seconds]
friday has joined #ruby
elphe has joined #ruby
alfiemax has quit [Ping timeout: 248 seconds]
yeticry has joined #ruby
qba73 has quit [Remote host closed the connection]
qba73 has joined #ruby
Beams has quit [Quit: .]
iamarun has quit [Remote host closed the connection]
alfiemax has joined #ruby
spectrum has quit [Ping timeout: 268 seconds]
sammi` has joined #ruby
Beams has joined #ruby
Serpent7776 has joined #ruby
elphe has quit [Ping timeout: 250 seconds]
tcopeland has quit [Quit: tcopeland]
jottr_ has quit [Ping timeout: 248 seconds]
alfiemax has quit [Ping timeout: 250 seconds]
rbo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmarkons has joined #ruby
bmarkons has left #ruby [#ruby]
sheva2nd has quit [Ping timeout: 260 seconds]
hfp_work has quit [Quit: bye]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hfp_work has joined #ruby
guardianx has quit []
alfiemax has joined #ruby
elphe has joined #ruby
jottr_ has joined #ruby
postmodern has quit [Quit: Leaving]
PaulCapestany has quit [Read error: Connection reset by peer]
cagmez__ has joined #ruby
PaulCapestany has joined #ruby
guille-moe has quit [Ping timeout: 240 seconds]
cagmz_ has quit [Ping timeout: 260 seconds]
rrutkowski has joined #ruby
cdg has joined #ruby
crova has joined #ruby
alex`` has joined #ruby
alex`` is now known as alexherbo2
cdg has quit [Ping timeout: 250 seconds]
alexherbo2 is now known as alex``
ur5us has joined #ruby
Guest26360 is now known as marahin
marahin has quit [Changing host]
marahin has joined #ruby
elsevero has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
jnyw has quit [Quit: WeeChat 2.0]
drowze has joined #ruby
mistnim has joined #ruby
<mistnim>
how do I rename Digest::MD5.hexdigest(astr) to md5(astr)?
tcopeland has joined #ruby
yeticry has quit [Ping timeout: 250 seconds]
cdg has joined #ruby
yeticry has joined #ruby
<havenwood>
mistnim: module Kernel; def md5(astr); Digest::MD5.hexdigest(astr) end end
cdg has quit [Ping timeout: 240 seconds]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mistnim>
havenwood: really? isn't there something like "require as"?
alfiemax has quit [Remote host closed the connection]
banisterfiend has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdg has joined #ruby
aScottishBoat has joined #ruby
rrutkowski has quit [Quit: rrutkowski]
cdg has quit [Ping timeout: 246 seconds]
alfiemax has joined #ruby
alfiemax has quit [Remote host closed the connection]
Beams has quit [Quit: .]
yeticry has quit [Ping timeout: 248 seconds]
tcopeland has quit [Quit: tcopeland]
apparition has joined #ruby
Psybur has joined #ruby
brandthdl has joined #ruby
uZiel has joined #ruby
rabajaj has quit [Remote host closed the connection]
yeticry has joined #ruby
webguynow has quit [Ping timeout: 240 seconds]
selim has quit [Ping timeout: 248 seconds]
webguynow has joined #ruby
cdg has joined #ruby
selim has joined #ruby
mtkd has quit [Ping timeout: 248 seconds]
AJA4350 has joined #ruby
mtkd has joined #ruby
cdg has quit [Ping timeout: 248 seconds]
<havenwood>
mistnim: nope, there's no `as`
qba73 has quit [Ping timeout: 240 seconds]
kith has joined #ruby
bradleyprice has quit [Remote host closed the connection]
bradleyprice has joined #ruby
alfiemax has joined #ruby
charliesome has joined #ruby
Riddell has quit [Ping timeout: 240 seconds]
bradleyprice has quit [Ping timeout: 255 seconds]
Riddell has joined #ruby
cdg has joined #ruby
aupadhye has quit [Ping timeout: 268 seconds]
alfiemax has quit [Ping timeout: 268 seconds]
cdg has quit [Ping timeout: 255 seconds]
minimalism has quit [Ping timeout: 248 seconds]
bkxd has joined #ruby
bkxd_ has joined #ruby
alfiemax has joined #ruby
nofxx has joined #ruby
bkxd has quit [Ping timeout: 248 seconds]
nofxx has quit [Read error: Connection reset by peer]
nofxx has joined #ruby
bkxd has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
tvw has joined #ruby
brandthdl has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Beams has joined #ruby
KeyJoo has joined #ruby
bkxd_ has quit [Ping timeout: 248 seconds]
kith has quit [Quit: kith]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jottr_ is now known as jottr
minimalism has joined #ruby
alfiemax has joined #ruby
tsglove has quit [Remote host closed the connection]
<Burgestrand>
RougeT430 indent the loop do, should help you spot it
ur5us has joined #ruby
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
<Burgestrand>
RougeT430 your indentation is all over the place, don't be sloppy
polishdub has joined #ruby
<RougeT430>
Burgestrand: ill look at tthat now and try fixing indent too
<RougeT430>
yeah, that was it ugh. and yes indenting it properly did make it more visible
Beams has joined #ruby
<RougeT430>
is there a good guide on ruby indentation?
ur5us has quit [Ping timeout: 240 seconds]
cdg has joined #ruby
<Burgestrand>
RougeT430 style doesn't matter too much (in my opinion), but consistency does, but I guess this guide is as good as any: https://github.com/bbatsov/ruby-style-guide
<RougeT430>
yeah that does look a lot nicer and readable. im going to have a compare now between mine and yours to see how to improve
<Burgestrand>
aScottishBoat changing the attacks_hashes to a local variable makes it unreachable inside string_hash, which'll cause a runtime error when attempting to read it
<aScottishBoat>
I mean, there was a function that had an unassigned hash. Should it have stayed like that?
<RougeT430>
isnt using global variables frowned upon unless truly neccessary
<Burgestrand>
aScottishBoat that makes it global, which I'd recommend against as well, I'd just keep it as a method, at most make it a constant (first letter of the variable name turned capital)
<Burgestrand>
aScottishBoat it wasn't unassigned, it was the return value
<RougeT430>
^
<aScottishBoat>
I got that, but it seemed odd to me.
<aScottishBoat>
I trust you two, cool
<RougeT430>
im not sure of the best way to do it tbh
<Burgestrand>
aScottishBoat if you want, you could name it `Attacks_hashes = { … }` instead, that'll do what you intended
<aScottishBoat>
what's the scope of a constant?
<RougeT430>
that would give it the scope for that class no?
<Burgestrand>
It'd be Super_calc::Attacks_hashes
<Burgestrand>
or whatever the name of that class was :)
<aScottishBoat>
Ooo cool. Ugh I need to get back into using Ruby. I've forgotten loads.
krawchyk has joined #ruby
<RougeT430>
better than me aScottishBoat ;) ive yet to learn loads to forget
<aScottishBoat>
Don't shun me but I've been working on a side project using PHP... And yes, I'm utilizing the ncurses library that PHP provides haha
<aScottishBoat>
RougeT430, well the community is fantastic (I mentioned that yesterday when you were around). Please feel free to stick around.
<Burgestrand>
Also, in line with the majority* of style guides, Ruby tend to use CamelCasing instead of Snake_Case for constants/modules/classes, i.e. SuperChar and AttacksHashes
<Burgestrand>
That's purely stylistic though, but generally recommended to avoid that popping up in every discussion when posting code ;)
<aScottishBoat>
If I'm not mistaken I think I've always seen Ruby constants in all uppercase
ledestin has joined #ruby
<Burgestrand>
You're definitely mistaken
<Burgestrand>
Actually
<Burgestrand>
I can't decide your facts
<Burgestrand>
But I can tell you that it's not always so :)
<aScottishBoat>
Then some people on exercism give non-community styled feedback
elphe has joined #ruby
<aScottishBoat>
cool
charliesome has joined #ruby
<Burgestrand>
Community-style is whatever you perceive to be the majority, all-uppercase constants is not necessarily frowned upon
<Burgestrand>
Keep in mind class names and module names are also constants, and they're not all-uppercase
<aScottishBoat>
That is true, err but using a constant as a variable
<aScottishBoat>
But fair.
<aScottishBoat>
I just like doing what the majority of the language community agrees on... Saves me headaches
<Burgestrand>
I agree with that
gnufied has joined #ruby
DLSteve_ has joined #ruby
<octomancer>
lol
<RougeT430>
is there a way of converting symbols to strings in ruby (not rails)
<RougeT430>
was finding methods for rails
<RougeT430>
ill just make them strings for now, but look for a way to do it later
charliesome has quit [Ping timeout: 255 seconds]
marr has quit [Ping timeout: 248 seconds]
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
<aScottishBoat>
hmm well this is a good time to acquaint yourself with the ruby docs
<aScottishBoat>
ruby-doc.org
<aScottishBoat>
and if you go
<aScottishBoat>
Core in the navbar (Core API are classes/methods/etc. that you have access to without having to import any additional libraries -- for importable libraries you can work with, that ship with a standard Ruby install, check out Std-Lib)
<aScottishBoat>
You'll get two searchable fields, one for Classes and one for Methods. You can type in "Symbol" into the Classes searchbar, and click on C Symbol to learn more about that class.
exchgr` has quit [Ping timeout: 240 seconds]
<aScottishBoat>
All pages have a "Methods" section. You'll notice that some methods have :: and some have #. For example. Symbol::all_symbols is a class method. You can execute it directly from the class name (Symbol)
brandthdl has quit [Ping timeout: 240 seconds]
<aScottishBoat>
Symbol#capitalize on the otherhand is executed on an object of a symbol. :my_symbol.capitalize
<aScottishBoat>
It just so happens there is a Symbol#to_s function.
<aScottishBoat>
;)
qba73 has quit [Remote host closed the connection]
<aScottishBoat>
RougeT430 ^
qba73 has joined #ruby
<aScottishBoat>
Also, I didn't know you could turn off GC in Ruby. IS there any point to that?
qba73 has quit [Remote host closed the connection]
qba73 has joined #ruby
elphe has quit [Ping timeout: 240 seconds]
petervbeck has quit [Quit: WeeChat 1.9.1]
petervbeck has joined #ruby
iloveitaly has joined #ruby
shinnya has quit [Ping timeout: 268 seconds]
alfiemax has quit [Remote host closed the connection]
<kspencer>
this may sound a bit weird, but if I create a file that i 'require' that has classes like Sequel Models, and require them into Cinch plugins, that's completely fine and valid use of them right?
AndreiZ has left #ruby ["hold my beer and watch this!"]
<polishdub>
should work, but whether it's the ruby way, I cannot say :/
<kspencer>
yeah, its more because I want to have valid paths from each class or constant and not have to use $vars in all my code :|
mtkd has quit [Ping timeout: 240 seconds]
guille-moe has quit [Ping timeout: 240 seconds]
oleo2 has joined #ruby
yeticry has joined #ruby
oleo has joined #ruby
jolamb_ is now known as jolamb
mtkd has joined #ruby
jnollette has quit [Remote host closed the connection]
jnollette has joined #ruby
minimalism has quit [Quit: minimalism]
qba73 has quit [Remote host closed the connection]
safetypin has joined #ruby
qba73 has joined #ruby
guille-moe has joined #ruby
aScottishBoat has quit [Remote host closed the connection]
aScottishBoat has joined #ruby
eckhardt has joined #ruby
Rapture has joined #ruby
JaccoP has joined #ruby
oleo2 has quit [Remote host closed the connection]
<Burgestrand>
Bish depending on use-case you might want to take a look at Rational
oleo2 has joined #ruby
petervbeck has joined #ruby
<Bish>
Burgestrand: i already figured that would help
<Bish>
how do rationals work
<Bish>
are they just 2 integers?
<Burgestrand>
Bish a numerator and denominator
gizmore|2 is now known as gizmore
<Bish>
yeah but what are they?
<Burgestrand>
>> Rational("1.5/3.7")
<ruby[bot]>
Burgestrand: # => invalid value for convert(): "1.5/3.7" (ArgumentError) ...check link for more (https://eval.in/917729)
<mikecmpbll>
and in the case where foo.hash == hash.keys.first.hash? :'<
<mikecmpbll>
foo is an activerecord, for what it's worth .. i think i need to look at this with a fresh head. i'm probably doing something retarded.
ramfjord has joined #ruby
nadir has joined #ruby
jud^ has joined #ruby
funburn has joined #ruby
troys_ is now known as troys
aspiers has quit [Ping timeout: 248 seconds]
lupine_ has quit [Ping timeout: 255 seconds]
lupine has joined #ruby
jud has quit [Ping timeout: 252 seconds]
terens has joined #ruby
mikecmpbll has quit [Ping timeout: 268 seconds]
aspiers has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
bradleyprice has joined #ruby
houhoulis has joined #ruby
ramfjord has quit [Ping timeout: 250 seconds]
dviola has joined #ruby
<terens>
Hello. Which is the best way to communicate between a webserver and 10.000 devices ? Send configuration/ updates/ and receive statistics / live tools etc ?
jxv has joined #ruby
alfiemax has joined #ruby
oleo2 has joined #ruby
<havenwood>
terens: DRb! ;-)
alfiemax has quit [Ping timeout: 260 seconds]
funburn has quit [Quit: funburn]
exhiled has joined #ruby
KeyJoo has joined #ruby
marr has joined #ruby
MrSparkle has quit [Read error: Connection reset by peer]
oleo2 has quit [Quit: Leaving]
orbyt_ has joined #ruby
guille-moe1 has joined #ruby
<RickHull>
terens: is HTTP an option?
guille-moe has quit [Ping timeout: 240 seconds]
guille-moe1 is now known as guille-moe
<terens>
yes
despai has quit [Quit: ...]
AJA4350 has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
AJA4350 has joined #ruby
MrSparkle has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<RickHull>
thinking broadly: you would have to maintain your "cloud webserver server" pretty tightly -- DNS, SSL, etc.
<RickHull>
s/server server/server/ :)
<RickHull>
and the device would have to be preconfigured with the DNS and certs, etc.
alfiemax has joined #ruby
<RickHull>
then it can check in, download new configs and updates
graft has joined #ruby
<RickHull>
you'll have to be careful about DoS on the webserver. probably want to authenticate critical requests
<RickHull>
is this what you have in mind? it's not trivial to do it right
<RickHull>
you will want to make sure your IoT devices can update their network stack in response to CVEs etc
hahuang65 has joined #ruby
allcentury has joined #ruby
hahuang65 has quit [Client Quit]
marxarelli|afk is now known as marxarelli
conta2 has joined #ruby
guille-moe has quit [Ping timeout: 240 seconds]
zautomata1 has joined #ruby
zautomata1 has quit [Client Quit]
jottr has quit [Ping timeout: 255 seconds]
milardovich has quit []
alfiemax has quit [Remote host closed the connection]
guille-moe has joined #ruby
banisterfiend has joined #ruby
jxv has quit [Quit: string on the can snapped off]
rm8 has left #ruby ["i quit"]
<RickHull>
definitely consider validating downloads with checksums
<RickHull>
for uploading stats etc. PUT and POST should be fine
<RickHull>
make sure whatever update loop the device is running can cope with downtime
<terens>
I see but I want some realtime shit
mcr1 has joined #ruby
<terens>
Initially i tried with websockets/actioncable
<terens>
but ssl with event machine is not secure
<terens>
and actioncable isn't enough mature
<terens>
doing http requests polling would ruin my server
<terens>
Also I tried a bit mqtt but have other issues
<terens>
scaling etc
mistnim has quit [Quit: WeeChat 1.9.1]
uZiel has joined #ruby
RougeT430 has quit [Ping timeout: 260 seconds]
elphe has joined #ruby
hahuang65 has joined #ruby
despai has joined #ruby
elphe has quit [Ping timeout: 240 seconds]
TomyWork has quit [Ping timeout: 240 seconds]
Technodrome has joined #ruby
vee__ has quit [Ping timeout: 240 seconds]
ogres has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pifon is now known as plifon
plifon is now known as pifon
John____ has joined #ruby
despai has quit [Read error: Connection reset by peer]
sameerynho has joined #ruby
despai_ has joined #ruby
bmurt has joined #ruby
tomphp has joined #ruby
<havenwood>
terens: Is Elixir with Phoenix Channels an option?
<havenwood>
10k would be no problem with a BEAM process per WebSocket.
funburn has joined #ruby
vee__ has joined #ruby
<havenwood>
terens: How about H2? There're good Ruby libraries on that front.
_whitelogger has quit [Remote host closed the connection]
fury has joined #ruby
syndikate has joined #ruby
nikivi has joined #ruby
endemic has joined #ruby
halt has joined #ruby
selim has joined #ruby
Tharbakim has joined #ruby
Tharbakim has joined #ruby
halt is now known as Guest94338
Liothen has joined #ruby
shortdudey123 has joined #ruby
coderphive has joined #ruby
daemonwrangler_ has joined #ruby
russt has joined #ruby
swat2 has joined #ruby
voxxit has joined #ruby
spider-mario has joined #ruby
simonizor has joined #ruby
haylon has joined #ruby
shortdudey123 has quit [Excess Flood]
Ltem has joined #ruby
shortdudey123 has joined #ruby
hurricanehrndz has joined #ruby
miah has joined #ruby
G has joined #ruby
chmurifree has quit [*.net *.split]
cosimo_ has quit [*.net *.split]
claw has quit [*.net *.split]
heftig has quit [*.net *.split]
aef has quit [*.net *.split]
linduxed has quit [*.net *.split]
nickjj has quit [*.net *.split]
brodul has quit [*.net *.split]
mr_rich101 has quit [*.net *.split]
silverdust has quit [*.net *.split]
claw has joined #ruby
brodul has joined #ruby
heftig has joined #ruby
nickjj has joined #ruby
mr_rich101 has joined #ruby
linduxed has joined #ruby
aef has joined #ruby
cosimo_ has joined #ruby
bokayio has quit [Ping timeout: 240 seconds]
fmccann_ has quit [Ping timeout: 260 seconds]
hahuang65 has joined #ruby
<fury>
anyone familiar with the ruby alpine docker image? i can't seem to enter the rails console, it says it can't find rake in any of the sources... the app itself works fine, i can even pull it up in my web browser, or start up another console and say "rails server" and it's aware enough that a server is already running...but "rails console" seems to have no clue
bokayio has joined #ruby
fmccann has joined #ruby
cdg has joined #ruby
eblip has joined #ruby
charliesome has joined #ruby
cdg has quit [Ping timeout: 260 seconds]
chmurifree has joined #ruby
CrazyEddy has joined #ruby
<RickHull>
try `gem env`
<RickHull>
wherever the ruby binary lives, there should be a rake binary as well, as ruby still comes packaged with rake IIRC
<RickHull>
that said, there is a rake gem to get a newer rake
<RickHull>
paste the error message you're getting -- use a paste site
<RickHull>
also include the output from `gem env` as well as `which ruby` and `which rake`
charliesome has quit [Ping timeout: 264 seconds]
cagomez has quit [Remote host closed the connection]
safetypin has quit [Ping timeout: 240 seconds]
cdg has joined #ruby
jamiejackson has joined #ruby
rhyselsmore has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<RickHull>
it looks like `bundle install` would be run -- but I'm not sure
Axy has quit [Read error: Connection reset by peer]
<fury>
yeah, it does run it, and when i do that in the terminal it just gives me the green light right away, says 19 gemfile dependencies, 74 gems installed
<fury>
my init.sh is pretty simple, just bundle exec rake db:create db:migrate then bundle exec rails server -p 80 -b 0.0.0.0
dionysus69 has quit [Ping timeout: 240 seconds]
DTZUZU has joined #ruby
<RickHull>
after running `bundle install`
<fury>
so that's what it runs on container startup, and that does work, cause the app server works - i can access port 80 of the container and run the app, it talks to my database, etc
<RickHull>
can you `grep -i rake Gemfile.lock` ?
alfiemax_ has joined #ruby
alfiemax has quit [Ping timeout: 268 seconds]
<fury>
two lines, rake (>= 0.8.7) and rake (12.3.0)
<RickHull>
you should have a Gemfile.lock somewhere
<fury>
yep
<fury>
should i delete it and run bundle install again?
<fury>
matter of fact Gemfile.lock is in my git repo, not sure if that should be the case or what
<RickHull>
find that 12.3.0 line in the Gemfile, and see who needs it
<RickHull>
(I'm sure there is a quicker way to resolve this, but we can work through it naively)
<RickHull>
sorry, in the Gemfile.lock
<fury>
12.3.0 is in the top level under specs:
<RickHull>
hmmm
<fury>
the >= 0.8.7 is under railties (5.1.4)
nogic has joined #ruby
<RickHull>
i don't know what specs means in the Gemfile.lock -- I haven't used bundler in a while
<RickHull>
it sounds like bundler itself depends on rake 12.3
<fury>
sounds about right, i never defined it in the gemfile so i'd think it comes with the thing
<RickHull>
just for fun, what do you get for `rake --version` ?
<fury>
12.3.0
<RickHull>
ok -- you need to do `bundle exec rails console` maybe
kapil___ has quit [Quit: Connection closed for inactivity]
<RickHull>
sounds FUBAR to me
<fury>
this is starting to weird me out... how can it find rake but not be able to find rake :P
Xeago has joined #ruby
<RickHull>
anyways, try #bundler maybe, unless someone else can chime in
<fury>
everything else works, literally all i was going to use the rails console for was to create a user so i didn't need to add a user signup page to my one-off app for which i reeeeeeally don't want a user signup page (only want a username and password to lock down a database view/edit)
<RickHull>
well -- this is something I would want to fix. this is FUBAR IMHO and I wouldn't want to proceed without fixing/understanding
<RickHull>
whatever this mystery is, it's likely to cause more pain and mystery later
<fury>
yes
redondos has joined #ruby
sammi`_ has joined #ruby
Ouchy has joined #ruby
Ouchy has joined #ruby
Ouchy has quit [Changing host]
<fury>
think it has something to do with that path. i was trying to get it to where i could cache the gem building output between builds so my gitlab CI could go a little faster between commits (i tend to do those rapid-fire "maybe this'll work?" "nope, try this" commits when i don't have the environment set up on my local machine)
br0d1n has quit [Quit: Leaving]
pastorinni has joined #ruby
sammi` has quit [Quit: Lost terminal]
rrutkowski has quit [Quit: rrutkowski]
houhoulis has quit []
rrutkowski has joined #ruby
silverdu1t has joined #ruby
<fury>
well, that wasn't it, and it put it in the same folder anyway, so dunno
im0nde has joined #ruby
eblip has quit [Quit: WeeChat 1.9.1]
tcopeland has quit [Quit: tcopeland]
jenrzzz has quit [Ping timeout: 240 seconds]
<fury>
so when i say gem uninstall rake, that tells me rake is not installed in GEM_HOME
Guest94338 has quit [Ping timeout: 276 seconds]
<fury>
thinking i told bundle to install to the wrong location
cdg_ has joined #ruby
eblip has joined #ruby
jordanm has quit [Remote host closed the connection]
halt has joined #ruby
halt is now known as Guest74048
jordanm has joined #ruby
mbr_ is now known as mbr
cdg has quit [Ping timeout: 264 seconds]
exhiled has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sameerynho has quit [Ping timeout: 240 seconds]
funburn has joined #ruby
tomphp has quit [Read error: Connection reset by peer]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
miskatonic has joined #ruby
kenichi_ is now known as kencihi
kencihi is now known as kenichi
garyserj has joined #ruby
exhiled has joined #ruby
<RickHull>
fury: yeah, bundler and rubygems have some overlap and can disagree about things. in general, rubygems will put gems in the configured location, and they are "globally" available (not per-project)
bruce_lee has quit [Remote host closed the connection]
<RickHull>
this can be in a system location (via sudo) or in a user location
<RickHull>
bundler is about installing gems to a per-project location, to avoid incompatibilities (particularly with versioning) against previously installed gems
<RickHull>
and this is why `bundle exec` is used -- to make sure only per-project gems are considered
allcentury has quit [Remote host closed the connection]
allcentury has joined #ruby
bmurt has joined #ruby
<RickHull>
if you are using bundler, then you should probably *NOT* try to fix things with `gem`
alfiemax_ has quit [Remote host closed the connection]
<RickHull>
i.e. `gem install` and `gem uninstall` will not affect projects using bundler
<RickHull>
as to what's going on with bundler and rake in your situation, I'm not sure
despai has quit [Quit: ...]
allcentury has quit [Ping timeout: 264 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]