havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.7.0, 2.6.5, 2.5.7: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select Ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
_whitelogger has joined #ruby
pandakekok9 has quit [Ping timeout: 264 seconds]
cthulchu_ has quit [Ping timeout: 264 seconds]
ByronJohnson has quit [Ping timeout: 260 seconds]
iNs has quit [Remote host closed the connection]
iNs has joined #ruby
Translat-Embedde has joined #ruby
donofrio has joined #ruby
ByronJohnson has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fluxAeon has joined #ruby
fluxAeon has quit [Ping timeout: 256 seconds]
postmodern has quit [Read error: Connection reset by peer]
postmodern has joined #ruby
ritalinona has quit [Remote host closed the connection]
ritalinona has joined #ruby
jingjing1 has joined #ruby
cschneid_ has joined #ruby
cschneid has quit [Ping timeout: 240 seconds]
jingjinghack has quit [Ping timeout: 250 seconds]
ooheitooh11 has quit [Read error: Connection reset by peer]
ooheitooh11 has joined #ruby
markopasha has joined #ruby
markopasha has quit [Max SendQ exceeded]
markopasha has joined #ruby
william1_ has joined #ruby
cloaked1 has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
william1_ has quit [Ping timeout: 240 seconds]
alfiemax has quit [Remote host closed the connection]
lineus has quit [Remote host closed the connection]
lineus has joined #ruby
chalkmonster has joined #ruby
chalkmonster has quit [Client Quit]
_whitelogger has joined #ruby
chalkmonster has joined #ruby
jingjinghack has joined #ruby
jingjing1 has quit [Ping timeout: 240 seconds]
Technodrome has joined #ruby
sylario has quit [Quit: Connection closed for inactivity]
sdu has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
duderonomy has quit [Ping timeout: 264 seconds]
bvdw has joined #ruby
arekushi has quit [Ping timeout: 246 seconds]
stan has quit [Ping timeout: 260 seconds]
ur5us has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
stan has joined #ruby
crawler has joined #ruby
sdu has quit [Read error: Connection reset by peer]
sdu has joined #ruby
schne1der has joined #ruby
noboruma has quit [Remote host closed the connection]
baojg has joined #ruby
jingjing1 has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
jingjinghack has quit [Ping timeout: 250 seconds]
cschneid has joined #ruby
cschneid_ has quit [Ping timeout: 240 seconds]
baojg has quit [Remote host closed the connection]
code_zombie has quit [Quit: Leaving]
william1_ has joined #ruby
trautwein has joined #ruby
trautwein has quit [Client Quit]
baojg has joined #ruby
trautwein has joined #ruby
crawler has quit [Quit: Leaving]
william1_ has quit [Ping timeout: 240 seconds]
NODE has quit [Quit: changing servers]
NODE has joined #ruby
Translat-Embedde has quit []
william1_ has joined #ruby
ur5us has quit [Ping timeout: 246 seconds]
zxq2 has joined #ruby
dionysus69 has joined #ruby
kevinburke has quit [Quit: Connection closed for inactivity]
chalkmonster has quit [Remote host closed the connection]
cschneid has quit [Quit: ZNC 1.7.5 - https://znc.in]
nowhere_man has quit [Remote host closed the connection]
mist has joined #ruby
cschneid has joined #ruby
mist has quit [Client Quit]
zdm has joined #ruby
agit0 has joined #ruby
sergioro has quit [Quit: leaving]
vqrs has quit [Ping timeout: 240 seconds]
vqrs has joined #ruby
roadie has quit [Quit: ERC (IRC client for Emacs 25.3.50.1)]
chalkmonster has joined #ruby
conta has joined #ruby
ule has quit [Ping timeout: 272 seconds]
ellcs has joined #ruby
conta has quit [Quit: conta]
ellcs has quit [Ping timeout: 246 seconds]
chalkmonster has quit [Quit: WeeChat 2.7.1]
zdm has quit [Quit: WeeChat 2.7.1]
Ven`` has joined #ruby
jingjing1 has quit [Quit: WeeChat 2.1]
jingjinghack has joined #ruby
cschneid_ has joined #ruby
cschneid has quit [Ping timeout: 250 seconds]
chalkmonster has joined #ruby
leitz has joined #ruby
NODE has quit [Quit: changing servers]
NODE has joined #ruby
drincruz has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.7.1]
chalkmonster has joined #ruby
jingjinghack has quit [Quit: WeeChat 2.1]
cow[moo] has quit [Ping timeout: 264 seconds]
chalkmon1 has joined #ruby
william1_ has quit [Ping timeout: 256 seconds]
nowhere_man has joined #ruby
chalkmonster has quit [Ping timeout: 256 seconds]
william1_ has joined #ruby
shansen has quit [Remote host closed the connection]
nowhere_man has quit [Remote host closed the connection]
vondruch_ has joined #ruby
chalkmon1 has quit [Ping timeout: 264 seconds]
chalkmon1 has joined #ruby
nowhere_man has joined #ruby
vondruch has quit [Ping timeout: 264 seconds]
vondruch_ is now known as vondruch
banisterfiend has joined #ruby
shansen has joined #ruby
wymillerlinux has quit [Quit: wymillerlinux]
wymillerlinux has joined #ruby
chalkmonster has joined #ruby
chalkmon1 has quit [Ping timeout: 264 seconds]
alfiemax has joined #ruby
alfiemax has quit [Ping timeout: 250 seconds]
postmodern has quit [Quit: Leaving]
wymillerlinux has quit [Quit: wymillerlinux]
wymillerlinux has joined #ruby
chalkmon1 has joined #ruby
chalkmonster has quit [Ping timeout: 250 seconds]
wymillerlinux has quit [Quit: wymillerlinux]
william1_ has quit [Ping timeout: 250 seconds]
wymillerlinux has joined #ruby
ttoocs has quit [Quit: WeeChat 2.7]
william1_ has joined #ruby
chalkmonster has joined #ruby
<leitz> For a small Sinatra app, is there any reason not to look at AWS? Doing so would let me build some skills that are in the local market.
chalkmon1 has quit [Ping timeout: 240 seconds]
Fridtjof has quit [Read error: Connection reset by peer]
ttoocs has joined #ruby
<jhass> so a reason as in "it won't work because of..."? no
wymillerlinux has quit [Quit: wymillerlinux]
wymillerlinux has joined #ruby
wymillerlinux has quit [Remote host closed the connection]
wymillerlinux has joined #ruby
Fridtjof has joined #ruby
<nemesit|znc> is there a concise way to get a datetime object for the last time possible? e.g. for 16:00 it would be the previous day 16:00
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
Fridtjof has quit [Read error: Connection reset by peer]
<jhass> ruby or activesupport/rails?
<nemesit|znc> dunno
<nemesit|znc> any
<nemesit|znc> are people even using ruby without rails ;-p sry
<jhass> yes, lots :P
<jhass> plain ruby it'll won't get more concise than Time.now + Time.new and a tenerary
<nemesit|znc> hm
pupsikov has joined #ruby
cschneid has joined #ruby
<jhass> something like https://carc.in/#/r/8qo4
cschneid_ has quit [Ping timeout: 250 seconds]
chalkmonster has quit [Quit: WeeChat 2.7.1]
akem has quit [Ping timeout: 250 seconds]
duderonomy has joined #ruby
chalkmonster has joined #ruby
Technodrome has joined #ruby
chalkmonster has quit [Client Quit]
GodFather has joined #ruby
<leitz> jhass, thanks!
caterfxo has joined #ruby
galaxie has quit [Ping timeout: 240 seconds]
galaxie has joined #ruby
akem has joined #ruby
nofxx__ has quit [Ping timeout: 250 seconds]
<nemesit|znc> jhass: took the active_support route
<nemesit|znc> DateTime.now.change({ hour: 16, min: 0, sec: 0 }).try { |d| d.future? ? d - 1.day : d }
<jhass> huh, why the try? did you mean to use then?
baojg has quit [Remote host closed the connection]
<nemesit|znc> yeah maybe xD
baojg has joined #ruby
nofxx has joined #ruby
dionysus69 has quit [Quit: dionysus69]
rippa has joined #ruby
klaas has joined #ruby
conta1 has joined #ruby
TCZ has joined #ruby
troulouliou_div2 has joined #ruby
baojg has quit []
caterfxo has quit [Quit: leaving]
caterfxo has joined #ruby
kristian_on_linu has joined #ruby
conta1 has quit [Ping timeout: 250 seconds]
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
fluxAeon has joined #ruby
fluxAeon has quit [Ping timeout: 264 seconds]
fluxAeon has joined #ruby
fluxAeon has quit [Ping timeout: 250 seconds]
ooheitooh11 has quit [Ping timeout: 264 seconds]
schne1der has quit [Ping timeout: 250 seconds]
schne1der has joined #ruby
GodFather has quit [Ping timeout: 250 seconds]
wildtrees has joined #ruby
<xco> hi. i want to create a terminal app with Ruby without the user having to enter irb to execute commands
wildtrees has quit [Max SendQ exceeded]
<xco> what'll be the best way to approach something like this?
<adam12> xco: What kind of app?
<xco> ideally i want the user to be able to type something like "my_app do_this"
<adam12> xco: In reality, all you need to do is put a ruby shebang at the beginning of your file.
<adam12> #!/usr/bin/env ruby
<xco> oh
wildtrees has joined #ruby
<adam12> Then the rest of the file can be Ruby. You might need to chmod +x the file to make it executable.
<xco> what if i don't want to chmod the files
<xco> like when i install rails
<xco> i can just do
<xco> rails new bla
<xco> then it does it straging away
<xco> straight*
<adam12> xco: In that instance, rails is your "app"; and someone before you had chmod'd it.
<adam12> xco: The file that's unpacked in the gem (gem install rails) includes the rails script with executable mode set.
<xco> oh i see
<xco> perhaps you know how i can find that?
<adam12> xco: Which specifically?
<xco> the executable that will enable me to write my app in ruby, have the user install it as a gem and straigh to work
<phaul> also the do_this bit is a command line argument. You will need argument parsing as well. Just having a method in the file def do_this won't make it work that way
<xco> i want to have all those extra steps taken care off
<xco> phaul yeah that i know that was a quick example :)
<adam12> xco: bundler includes a comand that will "bootstrap" part of what you need.
<adam12> xco: But you'll have to write code eventually :) And these are the easy steps.
<xco> it's easy yet i don't know :D :D
TorpedoSkyline has joined #ruby
<xco> that's what i want to know
<adam12> xco: bundle gem your_app
<adam12> xco: I'd start small, and _learn_ the shebang + chmod.
<xco> right
<caterfxo> can rubygems install executables into /usr/bin and / or /usr/sbin ?
<adam12> xco: You can check out the `bundle gem` command to get you going if you want. I still recommend just starting piece by piece. New file with shebang. Chmod +x. Parse your arguments. You're half way there.
<adam12> caterfxo: It normally installs them where the ruby binary lives.
markopasha has quit [Read error: Connection reset by peer]
<xco> adam12 if i do the shebang plus the mod, how do i still get the install to install the CLI and do "my_app do_something --something"?
<xco> not sure if i'm making myself clear enough
<xco> :)
markopasha has joined #ruby
<adam12> xco: Write a gemspec file which packages the file up as an `exe` or `bin`. Build the gem. Install it.
<adam12> xco: Push it to rubygems, let other people install it.
<caterfxo> ok. so, because I'm slow, if the ruby binary lives in /usr/bin, then the gems would also be installed in /usr/bin, usually
<adam12> caterfxo: Yeah. Usually those are just binstubs which point to the real files somewhere else but you are right.
<caterfxo> sometimes the user can specify some / almost any other fs location, though
<adam12> caterfxo: I think this can be tweaked through rubygems but I don't remember the incarnation. If you look at `gem env` it will tell you the executable directory.
<caterfxo> ok. thanks! :-)
TCZ is now known as DontBelieveScien
<adam12> yw
<xco> adam12 thank you! :) found what i'm looking for with your help
<adam12> xco: cheers!
DontBelieveScien is now known as FkTheScience
cschneid_ has joined #ruby
cschneid has quit [Ping timeout: 240 seconds]
wildtrees has quit [Quit: Leaving]
wildtrees has joined #ruby
meowzus has quit [Ping timeout: 264 seconds]
code_zombie has joined #ruby
<phaul> xco: you might find the thor gem useful..
caterfxo has quit [Quit: leaving]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sdu has quit [Quit: leaving]
ChmEarl has joined #ruby
FkTheScience has quit [Quit: Leaving]
alfiemax has joined #ruby
tainer32 has joined #ruby
_phaul has joined #ruby
SeepingN has joined #ruby
phaul has quit [Ping timeout: 246 seconds]
trautwein has quit [Ping timeout: 250 seconds]
elcuervo has joined #ruby
Esa_ has joined #ruby
Ven`` has quit [Quit: Textual IRC Client: www.textualapp.com]
bodqhrohro_ has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
bodqhrohro has joined #ruby
TorpedoSkyline has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TorpedoSkyline has joined #ruby
alfiemax has quit [Remote host closed the connection]
ellcs has joined #ruby
ellcs has quit [Max SendQ exceeded]
ellcs has joined #ruby
ooheitooh11 has joined #ruby
ellcs has quit [Max SendQ exceeded]
ellcs has joined #ruby
sergioro has joined #ruby
Frobozz has joined #ruby
cthulchu_ has joined #ruby
TCZ has joined #ruby
drincruz has quit [Read error: Connection reset by peer]
drincruz has joined #ruby
Technodrome has joined #ruby
gix has joined #ruby
impermanence has joined #ruby
drincruz has quit [Ping timeout: 250 seconds]
<xco> _phaul yeap i'm already using thor :)
hiroaki has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TCZ has quit [Quit: Leaving]
phaul has joined #ruby
_phaul has quit [Ping timeout: 240 seconds]
schne1der has quit [Ping timeout: 250 seconds]
ellcs has quit [Ping timeout: 246 seconds]
sylario has joined #ruby
dviola has joined #ruby
meowzus has joined #ruby
drincruz has joined #ruby
dviola has quit [Quit: WeeChat 2.7.1]
<xco> i've successfully setup Thor in my gem
<xco> i do have one more question though
<xco> to chmod the executable i don't want the user to do it
<xco> i want this to be done automatically once the gem is installed
<xco> i'm thinking to put the chmod instruction in the setup executable
<xco> which contains
<xco> will it make sense this way?
caterfxo has joined #ruby
<xco> perhaps i shouldn't
<xco> since in the gemspec there's this line
<xco> spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
cschneid has joined #ruby
cschneid_ has quit [Ping timeout: 250 seconds]
cliluw has joined #ruby
_phaul has joined #ruby
phaul has quit [Ping timeout: 240 seconds]
cliluw has quit [Ping timeout: 250 seconds]
tainer32 has quit [Remote host closed the connection]
cliluw has joined #ruby
Esa_ has quit []
alfiemax has joined #ruby
<havenwood> xco: There are two conventions in play, RubbyGem's and Bundler's.
<xco> thanks :) figured my way out of this
<havenwood> xco: RubyGems uses the bin/ dir for your gem's executables. Incredibly annoyingly, Bundler decided to use bin/ for developer setup tools and use exe/ for executables. You'll see lots of both in the wild.
<xco> went for the exe options, works for me so far
<havenwood> xco: Rubyists know to `bundle` to install deps and `rake` to run tests.
<apotheon> hmm
<havenwood> xco: So I'd leave those steps at just that. Make sure those both work. Typically, just a `gemdeps` in you Gemfile and wire up your Rakefile.
<xco> yup
banisterfiend has quit [Quit: Textual IRC Client: www.textualapp.com]
<havenwood> xco: You should `chmod +x` your exectuables yourself. There are no further steps.
<apotheon> Okay, yeah, now that I think about it, that *is* how I've seen it in Rails jobs.
<apotheon> I never really thought about it that way, which is weird, because I tend to think about such things.
<leitz> Why would bundler use "exe"? That's a Microsoft-ism.
vondruch_ has joined #ruby
<havenwood> leitz: They wanted to accommodate devs adding ./bin to PATH, which I think is an anti-pattern and I regret they didn't follow RubyGems convention for the sake of consistency. I disagree with Bundler's decision on that one.
vondruch has quit [Ping timeout: 256 seconds]
vondruch_ is now known as vondruch
Esa_ has joined #ruby
<leitz> havenwood, I'm with you on this one. Of course, as I don't use bundler, I don't have much of a say. :)
sauvin has quit [Read error: Connection reset by peer]
Technodrome has joined #ruby
wymillerlinux has quit [Quit: wymillerlinux]
wymillerlinux has joined #ruby
davispuh has joined #ruby
GodFather has joined #ruby
alfiemax has quit [Remote host closed the connection]
BTRE has quit [Remote host closed the connection]
william1_ has quit [Ping timeout: 240 seconds]
BTRE has joined #ruby
sergioro has quit [Quit: leaving]
sergioro has joined #ruby
kevinburke has joined #ruby
Ai9zO5AP has joined #ruby
impermanence has quit [Ping timeout: 264 seconds]
<xco> if i fetch data from an api endpoint in JSON format, is there a way i can cache the data in a variable, so the the next request for the variable value doesn't go to the API endpoint again?
<xco> but instead fetches the result it cached locally?
<xco> so it's faster?
brool has joined #ruby
<havenwood> xco: Yup.
<xco> havenwood how? :D
<havenwood> xco: Many ways!
<xco> i want just 2
<xco> best 2
<havenwood> xco: The threshold question is what HTTP client are you using?
<xco> HTTParty
<xco> but i could change
<xco> i just started building my tool
<havenwood> xco: You must party hard!
<xco> i used to before Coronavirus came into the picture :D
<jhass> you can join the distributed party! unitedwestream.berlin
<havenwood> xco: HTTParty doesn't support response caching last I looked. I maintain this spreadsheet of Ruby HTTP clients, which will show you those that do: https://docs.google.com/spreadsheets/d/1vPlk6nMIFa3sI5ISl7zZ5r6lDNpVQX6Jxi3ksXCyVbs/edit#gid=1392844939
<havenwood> xco: I'd suggest using Typhoeus or http-async.
<havenwood> xco: Typhoeus is more stable and battle tested but http-async is also great.
<xco> awesome!
<xco> but i can't find the column containing infor on caching
<havenwood> xco: The "response caching" column almost to the far right.
<havenwood> xco: Scroll!
<havenwood> xco: It's wide...
<xco> oh right!
<xco> http-async changed their name to async-http or i'm tripping?
<havenwood> xco: Typhoeus would be a great option.
nowhere_man has quit [Ping timeout: 246 seconds]
nowhereman has joined #ruby
MadLamb has joined #ruby
GodFather has quit [Ping timeout: 250 seconds]
<havenwood> xco: I'd generally suggest Typhoeus over HTTParty.
<xco> havenwood i'm going for that
<xco> looks like i may have to parse my own JSON with it
<havenwood> xco: JSON.parse
<xco> yup
<xco> havenwood thanks a LOT!
<havenwood> xco: It's a good exercise to write your own wrapper around an HTTP client to add caching, but Typoeus' is a good idea. You're welcome.
<xco> looks like Typhoeus is what i want
nowhereman has quit [Ping timeout: 240 seconds]
nowhereman has joined #ruby
lineus has quit [Remote host closed the connection]
iNs has quit [Remote host closed the connection]
ritalinona has quit [Remote host closed the connection]
lineus has joined #ruby
iNs has joined #ruby
galaxie has quit [Remote host closed the connection]
ritalinona has joined #ruby
galaxie has joined #ruby
iNs has quit [Remote host closed the connection]
iNs has joined #ruby
<xco> havenwood do you happen to know when the cache for Typoeus expires?
<havenwood> xco: The default is no expiration. You can supply one if you'd like.
<xco> how would i do that though?
<xco> no info on that in the docs
<havenwood> xco: For example: Typhoeus::Config.cache = Typhoeus::Cache::Redis.new(redis, default_ttl: 60)
<xco> oh i'm using their inbuilt cache
<havenwood> xco: The time-time-to-live keyword is in seconds.
<xco> if i got that right
sergioro has quit [Quit: leaving]
<havenwood> xco: You can supply your own Cache class to Typhoeus or use the Dali, Redis, or Rails ones it ships.
<havenwood> xco: It's easy to write your own if you like.
cschneid_ has joined #ruby
<havenwood> xco: Where would you like to cache? In memory? To disk? Database?
<xco> in memory preferably
RiPuk has quit [Quit: ZNC 1.7.5 - https://znc.in]
RiPuk has joined #ruby
cschneid has quit [Ping timeout: 265 seconds]
<havenwood> xco: Then there are several options. A fun option that I've enjoyed doing is to use Rinda::TupleSpace from the stdlib. You could alternatively just write your own Reaper to clear the cache. I can show you how to do either.
<havenwood> xco: The example in the Typhoeus readme never expires.
<xco> so the idea is i want to use this in a gem
<xco> well a CLI actually
<xco> so a cache in memory is sufficient for this
Frobozz has quit [Quit: quit]
<havenwood> xco: I like to wrap Rinda::TupleSpace like this: https://github.com/stephaniewilkinson/yonderbook/blob/master/lib/tuple_space.rb
<xco> ok this looks nice, looks like i may have to write my own from scratch
<havenwood> xco: Sec, I'll show you how to do a simple one.
<xco> ok ;)
<havenwood> xco: Wait... why do I already have an example showing an automaton reaper with your name in it...?
<xco> :D
<havenwood> xco: This may be more complex than you need. It looks like I extracted relevant parts from Puma's ThreadPool reaper to show you this.
<xco> wait wait wait
<xco> yeah
<xco> :D
<xco> too complicated :D :P
<xco> ok since i have bookmarked some of your links
<xco> i'll do the first things first, finish the CLI without caching
<xco> then i can show you the code for review to see how best caching can be implemented if you wouldn't mind :)
<xco> perhaps it'll make more sense if you see what i'm buiding :D
<havenwood> xco: I'll show you a TupleSpace now. Also thread safe. :)
ooheitooh11 has quit [Read error: Connection reset by peer]
<havenwood> xco: How many seconds until expiration?
<xco> 10800
<al2o3-cr> xco: just pass cache_ttl: 10800 as a param to get
<xco> al2o3-cr which gem are you referring to?
<al2o3-cr> typhoeus
<xco> blimey!
<xco> it doesn't say that in the docs
<al2o3-cr> so, Typhoeus.get('www.whateverapi.com', cache_ttl: 10800)
<xco> havenwood i've forked this one
<havenwood> al2o3-cr: The Redis, Dali and Rails caches respect that, but the in-memory example in the README doesn't, right?
<havenwood> xco: Forked what?
<al2o3-cr> havenwood: sure it does.
<xco> the gist
<xco> havenwood thanks a lot got a few options now
<havenwood> al2o3-cr: To be clear, I'm talking this ad-hoc `Cache` class in the docs: https://github.com/typhoeus/typhoeus#caching
<al2o3-cr> havenwood: yup, it'll work with that Cache class.
<havenwood> al2o3-cr: ...how?
<havenwood> al2o3-cr: The regular Cache classes check it, but this code doesn't. Redis, for example: https://github.com/typhoeus/typhoeus/blob/master/lib/typhoeus/cache/redis.rb#L27
<havenwood> al2o3-cr: The in-memory example has no mechanism to clear cache keys.
<al2o3-cr> one sec.
<havenwood> al2o3-cr: Is there some secondary mechanism to clear keys? Yup, you're right, I just didn't know about it! I haven't read all of Typhoeus' code.
<al2o3-cr> Typhoeus::Request::Cacheable
<al2o3-cr> havenwood: yeah, np it's vast lib
william1_ has joined #ruby
nowhere_man has joined #ruby
nowhereman has quit [Read error: Connection reset by peer]
nowhere_man has quit [Ping timeout: 246 seconds]
nowhereman has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<havenwood> xco: Then that ^ arg is a great option. :)
<xco> yeah copy that :)
TorpedoSkyline has quit [Quit: Textual IRC Client: www.textualapp.com]
drincruz_ has joined #ruby
drincruz has quit [Read error: Connection reset by peer]
nowhere_man has joined #ruby
<MadLamb> can someone help me with sunspot? I'm getting "RSolr::Error::Http: RSolr::Error::Http - 404 Not Found", but I inspected the values of `Sunspot::Rails.configuration` and they seem to be correct. I can also curl the url and solr responds with `302 Found`
nowhereman has quit [Ping timeout: 240 seconds]
ExoUNX has joined #ruby
wymillerlinux has quit [Quit: wymillerlinux]
wymillerlinux_ has joined #ruby
troulouliou_div2 has quit [Quit: Leaving]
wymillerlinux_ has quit [Read error: Connection reset by peer]
jmcgnh has quit [Read error: Connection reset by peer]
jmcgnh has joined #ruby
GodFather has joined #ruby
NODE has quit [Quit: changing servers]
NODE has joined #ruby
<adam12> MadLamb: What happens if you tell curl to follow redirects? -L or --location
TCZ has joined #ruby
ur5us has joined #ruby
<MadLamb> adam12, 200 OK
CommunistWolf is now known as veggies
<MadLamb> adam12, and I can see the title "Solr Admin"
veggies is now known as CommunistWolf
<MadLamb> adam12, I was also able to run a filter query with curl
<MadLamb> adam12, <lst name="responseHeader"><int name="status">0</int><int name="QTime">5</int></lst><result name="response" numFound="0" start="0"></result>
jmcgnh has quit [Read error: Connection reset by peer]
<MadLamb> adam12, I have the feeling sunspot is messing up. Solr seems to be fine. I can authenticate to the admin, I can see the cores, I can make queries...
pupsikov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<MadLamb> adam12, The only 404 i get is if I go to the root (hostname:port/) instead of (hostname:port/solr).That page shows a "no context" message and shows the context "/solr -> .....war"
<MadLamb> and the status code is 404
william1_ has quit [Ping timeout: 264 seconds]
<MadLamb> the output of `rails runner 'p Sunspot::Rails.configuration'` is `...@user_configuration={"solr"=>{"log_level"=>"WARNING", "path"=>"/solr/default", "solr_home"=>"solr"}}...`
Esa_ has quit [Ping timeout: 264 seconds]
william1 has joined #ruby
<MadLamb> hmm think I got it
jmcgnh has joined #ruby
GodFather has quit [Ping timeout: 240 seconds]
<MadLamb> yay got it to work, the issue is no longer Solr
<MadLamb> it was the SOLR_URL that was wrong. I had to specify the code name, and I didn't
<MadLamb> core name*
<MadLamb> spend the whole day fighting with this
ur5us has quit [Quit: Leaving]
william1_ has joined #ruby
cschneid_ has quit [Ping timeout: 264 seconds]
cschneid has joined #ruby
gsingh93- has joined #ruby
gsingh93 has quit [Ping timeout: 272 seconds]
cd has joined #ruby
gsingh93- is now known as gsingh93
cliluw has quit [Ping timeout: 250 seconds]
cliluw has joined #ruby
pupsikov has joined #ruby
cliluw has quit [Ping timeout: 260 seconds]
cliluw has joined #ruby
<xco> i'm using URI::HTTP.build(host: 'www.example.com', path: '/foo/bar')
<xco> to build a uri
<xco> does how do it get the "www.example.com/foo/bar" from it?
<xco> docs don't mention anything
<havenwood> xco: to_s
<xco> nice thanks :D
ur5us has joined #ruby
nowhereman has joined #ruby
nowhere_man has quit [Ping timeout: 240 seconds]
Swyper has joined #ruby
GodFather has joined #ruby
Ai9zO5AP has quit [Quit: WeeChat 2.7.1]
TCZ has quit [Quit: Leaving]
markopasha has quit [Remote host closed the connection]
GodFather has quit [Ping timeout: 250 seconds]
william1 has quit [Ping timeout: 250 seconds]
oneeggeach has joined #ruby
brool has quit [Quit: WeeChat 2.7.1]
drincruz_ has quit [Ping timeout: 250 seconds]
sergioro has joined #ruby
oneeggeach has quit [Quit: Leaving...]
kristian_on_linu has quit [Remote host closed the connection]
mattwc has quit [Ping timeout: 246 seconds]
mattwc_ has joined #ruby
FluffyFoxeh has joined #ruby
xorl has quit [Ping timeout: 246 seconds]
r3my has quit [Ping timeout: 246 seconds]
Frogging101 has quit [Read error: Connection reset by peer]
SanguineAnomaly has quit [Ping timeout: 246 seconds]
nowhereman has quit [Ping timeout: 246 seconds]
pupsikov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mojca has quit [Ping timeout: 246 seconds]
nowhere_man has joined #ruby
timwis has quit [Ping timeout: 246 seconds]
FluffyFoxeh is now known as Frogging101
timwis has joined #ruby
SanguineAnomaly has joined #ruby
r3my has joined #ruby
mojca has joined #ruby
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ai9zO5AP has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
sylario_ has joined #ruby
kermit__ has joined #ruby
ryzokuken_ has joined #ruby
ryzokuken has quit [Ping timeout: 246 seconds]
ryzokuken_ is now known as ryzokuken
sylario has quit [Ping timeout: 246 seconds]
kermit has quit [Ping timeout: 246 seconds]
CrazyEddy has quit [Ping timeout: 246 seconds]
timwis has quit [Ping timeout: 246 seconds]
jetpack_joe has quit [Ping timeout: 246 seconds]
creat has quit [Ping timeout: 246 seconds]
sylario_ is now known as sylario
kermit__ is now known as kermit
creat_ has joined #ruby
SeepingN has joined #ruby
nowhere_man has quit [Ping timeout: 246 seconds]
ule has joined #ruby
nowhereman has joined #ruby
jetpack_joe has joined #ruby
timwis has joined #ruby
al2o3-cr has quit [Read error: Connection reset by peer]
al2o3-cr has joined #ruby