banisterfiend has quit [Read error: Connection reset by peer]
<havenwood>
Frankenstein: She's looking to hire an Elixir dev to do the backend SVG generation work. The LiveView portion should then be fairly straightforward.
ravenousmoose has joined #ruby
<havenwood>
With TruffleRuby you'd be able to use use lang interop to use Chart.js from the backend. :)
<Frankenstein>
stimulus looks really cool. i might have to play around with that
<Frankenstein>
oh so is the clone a professional project then?
ravenousmoose has quit [Ping timeout: 245 seconds]
uranoss has quit [Quit: Connection closed for inactivity]
<phaul>
testing will be difficult this way (but still possible) because of the IO is interleaved with the business logic. You could have a method that instead of doing IO gets the input as an argument, and insteadof puts returns the result as a string. Then you can assert on the return value. The main program would use that method to do IO
blackmesa1 has quit [Quit: WeeChat 2.6]
<phaul>
otherwise you would need to stub IO i think to be able to assert on it.
<phaul>
you have a few incorrect parts at line 2, and line 4
<neha>
ohk thanks
<neha>
Any reference for IO to write test case ?
<c-c>
I would make a static class and a static method for the (starting a new) guessing-loop with class var boolean to signify if while -loop still valid, finally a static method for IO
<c-c>
but thats just me
rbanffy has joined #ruby
Esa_ has joined #ruby
<phaul>
we don't have static methods in ruby
<neha>
ok
Ai9zO5AP has joined #ruby
<neha>
I have stuck with this code when i run that time error was liked: "LocalJumpError: no block given (yield)" code
<c-c>
something like: class GuessGame; @@correct = false; def self.get_input(prompt); p prompt; return gets.chomp_to_i; end; self.ask_guess; guessed = self.get_input("Guess?"); end; def self.new_game; magic = rand(100); while !@@correct do; self.ask_guess;
<c-c>
phaul: you don't like def self.NNN?
brendan- has quit [Read error: Connection reset by peer]
<phaul>
I have nothing against it. but static is a C++ terminology and it's a completely different mechanism from the way it works in Ruby
<c-c>
its lexically static
<c-c>
B)
<phaul>
not really
<ccooke>
neha: you're using yield in the working implementation of your 'math' method (line 16). However, you don't pass a block when you call it. Change line 21 to - for instance - 'math(let_array) { |a,b,c| puts [a,b,c] }' and it will print any yielded values
mossplix has quit [Remote host closed the connection]
<c-c>
phaul: well its not instantiated class object
mossplix has joined #ruby
brendan- has joined #ruby
<c-c>
so in this approach, one does: GuessGame::new_game()
<phaul>
you shouldn't use :: in front of method calls
<phaul>
GuessGame.new_game is the accepted way
<c-c>
but you get the point
<neha>
No
<c-c>
one could use plain instantiated class as well but that feels so dirty for a small job like this
<ged>
I guess it depends on where you are geographically, but there are quite a few Ruby jobs in the US in the usual tech-job places, especially if you know Rails.
<ged>
I can't speak to other countries.
<Mrbuck>
ged: so for job preference ruby is not best but though better to learn oop ?
<ged>
I don't understand what you're asking.
<Mrbuck>
learn ruby to become good at oop concepts but not for jobs
<Mrbuck>
am I right?
<mikecmpbll>
there's plenty of ruby jobs, more than there are ruby devs. certainly here in the UK.
<mikecmpbll>
there's fewer overall jobs than e.g. .NET or PHP though.
<ged>
I disagree, but you can learn some OOP concepts with Ruby.
<mikecmpbll>
but what relevance has that? :) demand is everything.
<ged>
I am employed as a full-time Ruby programmer, FWIW.
<Mrbuck>
FWIW means ?
<mikecmpbll>
me too.
<ged>
For What It's Worth
<Mrbuck>
I wan't to learn ruby also thinking there will be scarcity for rubydevs
<ged>
And I've been getting paid to write Ruby for 12+ years.
salinasc has quit [Ping timeout: 250 seconds]
<ged>
I don't have any interest in convincing you of anything, though. Do what makes you happy.
<havenwood>
Mrbuck: Ruby is very actively developed and there are plenty of jobs. Every one of the top ten languages is actively developed with available jobs though.
<mikecmpbll>
fwiw, if anyone's looking for a ruby job in yorkshire, uk, lemme know ;)
<havenwood>
I like Ruby a lot.
<Mrbuck>
mikecmpbll: I will learn and let you know ?
<Mrbuck>
havenwood: why ? how it is so different ?
<mikecmpbll>
sure :)
<rapha>
mikecmpbll: that'd be fun moving to the UK when all other continent-dwellers are fleeing in the brexit woes :P
<mikecmpbll>
ah, no such woes. all of our many european workers have applied for the right to remain brexit process, and received it within weeks.
dbz_ has joined #ruby
<mikecmpbll>
very efficient process.
queip has quit [Ping timeout: 265 seconds]
queip_ has joined #ruby
<sagax>
hi all!
queip_ is now known as queip
<sagax>
what we have log with ENV key before run script?
<sagax>
to log*
<havenwood>
sagax: Huh?!
fanta1 has quit [Quit: fanta1]
salinasc has joined #ruby
<havenwood>
Mrbuck: DHH says something like it "fits my brain." It's simple and expressive to get started with but aimed at experienced C programmers as an audience so it keep relevance as you level up.
<sagax>
havenwood: i found Logger, thanks
<Mrbuck>
havenwood: i can write a bit of python
<havenwood>
Mrbuck: That's a nice language too. Try a few and see what you like as you use them to solve various problems.
suukim has quit [Quit: Konversation terminated!]
salinasc has quit [Ping timeout: 268 seconds]
brandoncc has joined #ruby
<Mrbuck>
ah thanks havenwood
SneakyGrimlin has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has joined #ruby
booboy has joined #ruby
<sagax>
how to know where gem placed?
<sagax>
after gem has been install
bradleyprice has quit [Remote host closed the connection]
<adam12>
sagax: `gem which nameofgem` might get you whwat you want.
Mrbuck has quit [Remote host closed the connection]
<adam12>
sagax: `gem info nameofgem` is a bit more verbose but includes where it might be installed, depending on version.
AJA4350 has quit [Ping timeout: 240 seconds]
drincruz has joined #ruby
brool has joined #ruby
impermanence has joined #ruby
Mrbuck has joined #ruby
salinasc has joined #ruby
bradleyprice has joined #ruby
bradleyprice has quit [Ping timeout: 252 seconds]
drincruz has quit [Ping timeout: 264 seconds]
dbz_ has quit [Ping timeout: 250 seconds]
akemrir has quit [Quit: WeeChat 2.6]
wildtrees has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
Nicmavr has joined #ruby
jaequery has joined #ruby
Mrbuck has quit [Remote host closed the connection]
Swyper has quit [Remote host closed the connection]
bradleyprice has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Swyper has joined #ruby
bradleyprice has quit [Ping timeout: 245 seconds]
ogres has joined #ruby
JohanP has quit [Remote host closed the connection]
JohanP has joined #ruby
KeyJoo has quit [Read error: Connection reset by peer]
KeyJoo has joined #ruby
x0f has quit [Ping timeout: 245 seconds]
Swyper has quit [Remote host closed the connection]
x0f has joined #ruby
Swyper has joined #ruby
JohanP has quit [Remote host closed the connection]
JohanP has joined #ruby
akemrir has joined #ruby
bradleyprice has joined #ruby
al2o3-cr has quit [Read error: Connection reset by peer]
salinasc has quit [Read error: Connection reset by peer]
schne1der has quit [Remote host closed the connection]
JohanP has joined #ruby
queip_ has joined #ruby
queip has quit [Ping timeout: 240 seconds]
queip_ is now known as queip
x0f_ has joined #ruby
x0f has quit [Ping timeout: 264 seconds]
akemhp_ has joined #ruby
x0f_ has quit [Ping timeout: 240 seconds]
akem__ has quit [Ping timeout: 240 seconds]
x0f has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
troulouliou_div2 has joined #ruby
ExoUNX has joined #ruby
<ExoUNX>
greetings
bradleyprice has joined #ruby
<ExoUNX>
I'm getting this error - `<module:RbReadline>': HOME environment variable (or HOMEDRIVE and HOMEPATH) must be set and point to a directory (RuntimeError)
<ExoUNX>
when I run "set" HOME is set
<ExoUNX>
I've also temporarily added HOME under /etc/environment just so it's available to all users and I still get the error
Freshnuts has joined #ruby
<adam12>
ExoUNX: What's the output of `echo $HOME`
<adam12>
ExoUNX: (from the shell)
<ExoUNX>
"/root" as expected
<adam12>
ExoUNX: And the output of `stat $HOME`?
<adam12>
ExoUNX: Actually even better, `file $HOME`?
<ruby[bot]>
ExoUNX: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
<adam12>
ExoUNX: OK looks correct.
bradleyprice has quit [Ping timeout: 252 seconds]
<adam12>
ExoUNX: What are you running that's triggering the error?
<ExoUNX>
so I'm assuming the upgrade (auto-migration) script runs as a different user, but that's why I set /etc/environment
<phaul>
or ruby -e 'p ENV["HOME"]' from shell
<adam12>
ExoUNX: You're running that as root?
<ExoUNX>
adam12 the apt commands, yes
<ExoUNX>
gitlab itself runs under various gitlab users
<ExoUNX>
phaul "/root"
<adam12>
ExoUNX: Any reason why the second command uses `sudo`?
<adam12>
ExoUNX: I gotta run so I can't stick around and help. sudo is known to drop environment variables and I wonder if somehow `HOME` is being dropped somewhere.
<ExoUNX>
accidentally added, same problem persists without that sudo
JohanP has quit [Ping timeout: 268 seconds]
KeyJoo has quit [Quit: KeyJoo]
queip has quit [Ping timeout: 240 seconds]
queip has joined #ruby
Fernando-Basso has quit [Remote host closed the connection]
<phaul>
what I would try is to run it with pry-rescue. trigger pry prompt at exception and look at ENV at that point. and look at the code that causes the exception.
<phaul>
ExoUNX: are you familiar with pry/pry-rescue?
<ExoUNX>
phaul entirely unfamiliar
JohanP has joined #ruby
<ExoUNX>
however, I'm going to check out the .deb and see how it's running the script
<phaul>
ok, my idea might not be something that's feasible then
bradleyprice has joined #ruby
bradleyprice has quit [Ping timeout: 250 seconds]
<phaul>
btw what system is this? Linux? running natively or in a container?
akemrir has quit [Quit: WeeChat 2.6]
<ExoUNX>
.deb didn't show anything, I'm checking with the #gitlab channel
<ExoUNX>
running on Ubuntu 16.04 on a LXC container running kernel version 5.0.15-1
bradleyprice has joined #ruby
<phaul>
ExoUNX: good luck, I hope they point you to the right place on #gitlab. It's a rare occurance that ppl tell if they are asking cross channel, (as they should). Appreciated.
<ExoUNX>
thanks for the help
<Iambchop>
ExoUNX: gitlab deb is installed and you're upgrading to 10.8.1? try 10.8.2 in case it's just a 10.8.1 bug?
bradleyprice has quit [Ping timeout: 245 seconds]
<ExoUNX>
Iambchop well I don't think it's even a problem with the install because if I try to run gitlab-rake I get the same error
<Iambchop>
did it used to work? (I've never tried to install it under LXC)
<sagax>
and see change with `tail` in command line
<Frankenstein>
when you say block, do you mean a ruby block or a filesystem block? the code i gave you doesn't close the file until you call file.close. If you want it to close later just call it later
<Frankenstein>
oh, you mean write to it asynchronously?
<Frankenstein>
tailing it won't block from writing to it
<sagax>
uff,
<sagax>
`tail` don't block, i just want see all change with `tail -f file.name`
snickers has quit [Ping timeout: 265 seconds]
<sagax>
but File.open should be block file, and `tail` not see any change before file have open
hutch1 has joined #ruby
witlesswonder has quit [Remote host closed the connection]
witlesswonder has joined #ruby
jacksoow_ has quit [Read error: Connection reset by peer]
<Frankenstein>
oh, you can use File#flush to have it dump the buffer to the actual file
<Frankenstein>
e.g. file = File.open "file.txt", ?w; <start tailing> ... file.write "hi there\n"; file.flush; <see "hi there" in the tail> ... long time later ... file.close
<sagax>
hm, maybe
<sagax>
thanks
<sagax>
i will try this
<Frankenstein>
ok cool
jacksoow has joined #ruby
morozovm has joined #ruby
morozovm has quit [Client Quit]
brandoncc has quit [Ping timeout: 268 seconds]
hutch1 has quit [Ping timeout: 246 seconds]
edwardly has quit [Read error: Connection reset by peer]
edwardly has joined #ruby
edwardly has quit [Changing host]
edwardly has joined #ruby
fanta1 has quit [Quit: fanta1]
cyclonis has joined #ruby
bradleyprice has joined #ruby
banisterfiend has joined #ruby
<brool>
anyone know a good gem for parsing HTML in CLI?
bradleyprice has quit [Remote host closed the connection]
bradleyprice has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
JohanP has quit [Ping timeout: 250 seconds]
dionysus69 has joined #ruby
cthulchu_ has joined #ruby
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
CherryPy has joined #ruby
Xiti has quit [Quit: Xiti]
CherryPy is now known as SeeSeeRider
RiPuk_ has joined #ruby
RiPuk has quit [Ping timeout: 240 seconds]
r3m has quit [Quit: WeeChat 2.7-dev]
r3m has joined #ruby
<brool>
like i just want to curl and pipe html to a ruby script and get the contents of certain elements, and preferrably not rely on regex hackery
<brool>
but i guess i could
<baweaver>
brool: nokogiri, or oga if you want lighter weight
<brool>
ty
<baweaver>
XPaths can be interesting though
<Frankenstein>
I'm going to have to be using Nokogiri's html builder soon. took a peak at the api and it looks interesting
<baweaver>
Oga doesn't rely on C extensions so it may be faster.
JohanP has joined #ruby
cyclonis has quit [Ping timeout: 265 seconds]
cyclonis has joined #ruby
JohanP has quit [Ping timeout: 250 seconds]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cyclonis_ has joined #ruby
AJA4350 has joined #ruby
cyclonis has quit [Read error: Connection reset by peer]
cyclonis has joined #ruby
Xiti has joined #ruby
ravenousmoose has joined #ruby
banisterfiend has joined #ruby
cycloni43 has joined #ruby
cyclonis_ has quit [Read error: Connection reset by peer]
cyclonis has quit [Ping timeout: 276 seconds]
ravenousmoose has quit [Ping timeout: 264 seconds]
Esa_ has quit []
ravenousmoose has joined #ruby
dbugger has quit [Quit: Leaving]
SeeSeeRider has quit [Quit: Bye Bye]
ravenousmoose has quit [Ping timeout: 250 seconds]
bradleyprice has quit [Remote host closed the connection]
ravenousmoose has joined #ruby
drincruz has joined #ruby
cycloni43 has quit [Ping timeout: 240 seconds]
cyclonis has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
ravenousmoose has quit [Ping timeout: 245 seconds]