ur5us has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
zacts_pi has quit [Quit: WeeChat 2.4]
za1b1tsu has quit [Remote host closed the connection]
exmortus has quit [Ping timeout: 272 seconds]
exmortus has joined #ruby
conta has quit [Remote host closed the connection]
ur5us has quit [Remote host closed the connection]
conta has joined #ruby
DTZUZO has quit [Ping timeout: 244 seconds]
Tempesta has joined #ruby
brool has quit [Ping timeout: 264 seconds]
sarink has joined #ruby
zacts_pi has joined #ruby
akem-lnvo has joined #ruby
schne1der has joined #ruby
podlech has joined #ruby
molly has joined #ruby
molly is now known as Guest42592
Guest30473 has quit [Read error: Connection reset by peer]
sandstrom has quit [Quit: My computer has gone to sleep.]
sandstrom has joined #ruby
emptyfl4sk has joined #ruby
sandstrom has quit [Client Quit]
jud^ has joined #ruby
vethis has joined #ruby
jud has quit [Ping timeout: 245 seconds]
<vethis>
everyone asleep? lol
<havenwood>
vethis: just waiting for Ruby questions!
<vethis>
awesome. well i think i'm having more of a git-bash problem than a ruby one, but i am using ruby so here i am.
sarink has quit [Ping timeout: 246 seconds]
<vethis>
i'm using git-bash for windows to learn with. all i'm trying to do is print a prompt for input, get input, and print the input result. easy! this works in every other terminal i use except git-bash. with git-bash it actually waits for input first before printing the rest. it's giving me a headache lol any insight as to why this is?
<vethis>
i could give up and use another terminal, sure lol but i'm trying to use git-bash as an alternative as i'm having a different problem with another terminal >_>
<havenwood>
vethis: you're trying to echo in bash or a bash function or your Ruby script doesn't work from git-bash?
<havenwood>
vethis: So on git-bash you don't see "Gimme something: " until after you hit Enger?
<havenwood>
Enter*
<vethis>
yea or entering a string
kyrylo has joined #ruby
<havenwood>
vethis: Same result if you change `puts` to `STDOUT.puts` and change `gets` to `STDIN.gets`?
jud has quit [Ping timeout: 245 seconds]
podlech has quit [Quit: WeeChat 2.5-dev]
<vethis>
yep same results
schne1der has quit [Ping timeout: 248 seconds]
sarink has quit [Ping timeout: 272 seconds]
<havenwood>
vethis: Try a STDOUT.flush after the first STOUT.puts?
<havenwood>
vethis: Or: STDOUT.sync = true
<vethis>
alright, flushing worked
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood>
vethis: Ah, so git-bash if buffering the output for some reason.
<vethis>
well that's no fun
<havenwood>
vethis: It should fix it if you up top once do a: STDOUT.sync = true
sarink has joined #ruby
<vethis>
that's nifty. well that works fine! thank you havenwood
<havenwood>
vethis: you're welcome
<havenwood>
happy coding!
<vethis>
are you familiar with the Cmder terminal for windows? :P
<havenwood>
nope, I'm not familiar with Cmder.
<vethis>
well that's unfortunate. my other issue, which made me switch to git-bash, was for some reason Cmder doesn't want to output bright colors anymore lol. i've been using the Colorize gem for weeks now and all of a sudden my bright colors just quit rendering in Cmder. another headache
<vethis>
i'll have to deal with remembering STDOUT.sync until i can find a solution to Cmder's random quirk. thanks again i appreciate it!
<havenwood>
vethis: Are you on Windows 10? You might try WSL or even WSL 2.
<vethis>
ah yes i am. i want to try WSL but i goofed and removed the Store app with a powershell decrappifier script haha. i hardly use microsoft stuff but once i found out about WSL i already screwed myself.
<vethis>
can't re-enable the Store app to save my life. nothing works
<vethis>
i hadn't needed it before though. the colorize gem uses the win32console(?) gem to enable colored output for windows. like i said it was working fine, even earlier today. then it just decided to stop. normal colors work fine but String.light_(color) just reverts to gray
<havenwood>
I'm not sure what does or doesn't use the Store.
<vethis>
ah! yeah i do have it installed then. i was thinking of the Debian package to use with WSL. this was a couple months ago when i was looking into it
<vethis>
yeah Cmder gives me this error when trying to open with WSL
<vethis>
note: bash.exe output: Windows Subsystem for Linux has no installed distributions.
emptyfl4sk has quit [Ping timeout: 245 seconds]
<vethis>
then gives me a link to get distributions, which only opens with the Store app apparently
<havenwood>
vethis: lxrun /install
<vethis>
well i'll be
<havenwood>
vethis: or check? wslconfig /l
<havenwood>
if the latter shows a distro, you can just use that
sarink_ has joined #ruby
queip has quit [Ping timeout: 258 seconds]
<havenwood>
wsl -l
sphenxes has joined #ruby
<havenwood>
wsl --setdefault ...
<vethis>
yep, no distros. getting ubuntu now hopefully that's a smooth process
<havenwood>
vethis: good luck!
<vethis>
thanks again :P
<havenwood>
you're welcome
jud has joined #ruby
akem-lnvo has quit [Quit: Leaving]
sarink has quit [Ping timeout: 244 seconds]
akem-lnvo has joined #ruby
schne1der has joined #ruby
akem-lnvo has quit [Client Quit]
jhass has quit [Ping timeout: 264 seconds]
queip has joined #ruby
DTZUZO has joined #ruby
TomyWork has joined #ruby
TimApple has joined #ruby
jud^ has joined #ruby
jud has quit [Ping timeout: 245 seconds]
jhass has joined #ruby
aupadhye has joined #ruby
ur5us has joined #ruby
reber has joined #ruby
emptyfl4sk has joined #ruby
andikr has joined #ruby
fphilipe_ has quit [Ping timeout: 246 seconds]
emptyfl4sk has quit [Ping timeout: 244 seconds]
deepredsky has quit [Ping timeout: 272 seconds]
jhass|off has joined #ruby
jhass has quit [Ping timeout: 264 seconds]
jhass|off is now known as jhass
sandstrom has joined #ruby
planigan has quit [Ping timeout: 272 seconds]
fphilipe_ has joined #ruby
lepepe has joined #ruby
planigan has joined #ruby
megamos has joined #ruby
lepepe has quit [Ping timeout: 246 seconds]
chalkmon1 has joined #ruby
chalkmonster has quit [Ping timeout: 245 seconds]
hutch has quit [Ping timeout: 248 seconds]
pwnd_nsfw has quit [Ping timeout: 268 seconds]
chalkmonster has joined #ruby
Tuor has joined #ruby
chalkmon1 has quit [Ping timeout: 246 seconds]
deepredsky has joined #ruby
DaRock has joined #ruby
jhass has quit [Ping timeout: 248 seconds]
megamos has quit [Ping timeout: 245 seconds]
chalkmon1 has joined #ruby
akem-lnvo has joined #ruby
zacts_pi has quit [Quit: WeeChat 2.4]
chalkmonster has quit [Ping timeout: 246 seconds]
akem-lnvo has quit [Remote host closed the connection]
vondruch_ has joined #ruby
sarink_ has quit [Remote host closed the connection]
queip has quit [Ping timeout: 272 seconds]
vondruch has quit [Ping timeout: 272 seconds]
vondruch_ is now known as vondruch
m27frogy has quit [Read error: Connection reset by peer]
m27frogy has joined #ruby
chalkmon1 has quit [Quit: WeeChat 2.5]
queip has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
sarink has joined #ruby
lxsameer has joined #ruby
sarink has quit [Remote host closed the connection]
<leitz>
so that when I run the first command and go to "localhost:4567/crew" it should recognize the route.
<leitz>
instead, I'm getting the "Sinatra doesn't know this ditty", so my guess is that I'm not creating the application object correctly.
<leitz>
What am I missing?
lepepe has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
grenierm_ has joined #ruby
lepepe has quit [Ping timeout: 258 seconds]
evdubs has quit [Remote host closed the connection]
Swyper has quit [Remote host closed the connection]
evdubs has joined #ruby
<leftylink>
IIRC, and from what I see on http://sinatrarb.com/ , require 'sinatra' runs a sinatra app w/ any `get` (and others) that are called on the top level. there are zero such calls, therefore the sinatra app knows no routes and therefore "doesn't know this ditty". it is true that there is an application `crew` that got created, but that `crew` isn't doing anything. that CrewGen is a
Azure has quit [Read error: Connection reset by peer]
jtperreault has joined #ruby
Azure has joined #ruby
queip has quit [Ping timeout: 246 seconds]
Azure has quit [Ping timeout: 246 seconds]
sarink_ has joined #ruby
tf2ftw has joined #ruby
Azure has joined #ruby
queip has joined #ruby
<tf2ftw>
I haven't found a way to do this so I assume it doesn't exist but I figured I'd ask here as a last resort. Is it possible to add a gem to a gemspec via Bundler? I'm looking for the same type of functionality `bundle add` provides but instead of modifying the Gemfile it updates gemspec.
sarink has quit [Ping timeout: 272 seconds]
schne1der has quit [Ping timeout: 244 seconds]
lucasb has joined #ruby
DaRock has quit [Ping timeout: 245 seconds]
involans_ has joined #ruby
Esa_ has joined #ruby
involans has quit [Ping timeout: 245 seconds]
deepredsky has quit [Ping timeout: 244 seconds]
fphilipe has quit [Ping timeout: 272 seconds]
codefriar has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rippa has joined #ruby
fphilipe has joined #ruby
Tuor has quit [Quit: Konversation terminated!]
DTZUZO has quit [Ping timeout: 245 seconds]
deepredsky has joined #ruby
lepepe_ has quit [Ping timeout: 245 seconds]
brool has joined #ruby
deepredsky has quit [Ping timeout: 248 seconds]
Snowy has quit [Quit: ragequit]
lepepe has joined #ruby
TomyWork has quit [Remote host closed the connection]
lepepe_ has joined #ruby
involans_ has quit [Quit: involans_]
emptyfl4sk has joined #ruby
lepepe has quit [Ping timeout: 244 seconds]
emptyfl4sk has quit [Ping timeout: 258 seconds]
Guest51410 has quit [Quit: Lost terminal]
deepredsky has joined #ruby
sarink_ has quit [Remote host closed the connection]
codefriar has quit [Read error: Connection reset by peer]
codefriar has joined #ruby
codefriar has quit [Client Quit]
fphilipe has quit [Read error: Connection reset by peer]
<ytti>
jesus h christ, imgur as pastebin, well at least the bot doesn't complain
<going_insane_fas>
ye well
<ytti>
maybe there is bundle file there locking that file
fphilipe has joined #ruby
schne1der has joined #ruby
<going_insane_fas>
I don't know how bundle locks work... when you mean there, do you mean the current directory ?
zacts has joined #ruby
DTZUZO has joined #ruby
<ytti>
yeah i'm not too familiar either,and i think i'd just strace it to see what happens when i call the bundler
<ytti>
but that may be the lazy man's approach, smarter man probably would try to understand instead of brute force
chamunks has quit [Quit: Don't worry I'm not gone yet.]
<going_insane_fas>
I've literally never used the gem ecosystem before... so I don't really know where to sink my teeth in this.
<going_insane_fas>
strace sounds like a good idea
zacts has quit [Client Quit]
Snowy has joined #ruby
emptyfl4sk has joined #ruby
sandstrom has joined #ruby
<phaul>
I would check the PATH to make sure bundle is the bundle that was last installed. the command "which bundle" might help
<phaul>
outher thing that you could try is updating the locate db, run slocate bundle and try each with --version and full path to see which one you want
fphilipe has quit [Ping timeout: 246 seconds]
codefriar has joined #ruby
<going_insane_fas>
thanks for the tip.
involans has joined #ruby
gbristol_ is now known as gbristol
deepreds1 has joined #ruby
deepredsky has quit [Ping timeout: 246 seconds]
orbyt_ has joined #ruby
Dr_MDMA_MD has joined #ruby
orbyt_ has quit [Remote host closed the connection]
Scriptonaut has joined #ruby
<Scriptonaut>
hey all, I wrote a small script to run a command if my site doesn't respond with a "200" 3 times in a row. It was working fine where I wrote it (ruby 2.5 something), but when I put it on a production server running ruby 1.8.7, it just hangs on the "http.request(request)" on line 16.
<bjpenn>
hey guys, im trying to find an alternative way to write this code to pass rubocop exception: curl_options = '-sX POST -w "%{http_code}"'
<bjpenn>
it violates this rubocop error: Style/FormatStringToken: Prefer annotated tokens (like %<foo>s) over template tokens (like %{foo}).
<bjpenn>
any ideas? :)
tw1sted has joined #ruby
<havenwood>
bjpenn: Normally you'd write: "-sX POST -w \"#{http_code}\""
<havenwood>
bjpenn: You might consider not shelling out to curl, if that's an option.
Snowy has joined #ruby
<havenwood>
bjpenn: There are solid gems with bindings to libcurl, Net::HTTP or other gems.
haxx0r has quit [Ping timeout: 244 seconds]
jaequery has joined #ruby
jaequery has quit [Client Quit]
codefriar has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jaequery has joined #ruby
codefriar has joined #ruby
zacts has quit [Quit: WeeChat 2.4]
<bjpenn>
havenwood: oh really? i mainly wanted to write something that could be a wrapper to curl, that can take in shell parameters like -X POST, -X GET, -v
tf2ftw has quit [Quit: This computer has gone to sleep]
<bjpenn>
essentially, it parses the CLI for parameters to the script, and takes those parameters, and runs `curl #{params}"`
<bjpenn>
otherwise i'd have to implement separate functionality for every parameter that curl provides
<bjpenn>
to cover all cases
Inline has quit [Quit: Leaving]
<bjpenn>
for example, if someone wanted to curl <microserviceA> with /foo/bar/ using POST, and wanted verbose output, they can just ./curl-script microserviceA /foo/bar/ -X POST -v
<bjpenn>
it'd know how to find the url for microserviceA, along with its credentials, etc
tdy2 has joined #ruby
<bjpenn>
havenwood: but yeah, ideally, for making a specific call, i'd love to just use net/http