havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.4.1, 2.3.4 & 2.2.7: https://www.ruby-lang.org || Paste >3 lines of text to: https://gist.github.com || Rails questions? Ask in: #RubyOnRails || Logs: https://irclog.whitequark.org/ruby || Books: https://goo.gl/wpGhoQ
Cohedrin_ has joined #ruby
Rodya_ has joined #ruby
amclain has quit [Quit: Leaving]
dasher00 has quit [Ping timeout: 268 seconds]
ledestin has joined #ruby
raspado has quit [Remote host closed the connection]
raspado has joined #ruby
Cohedrin_ has quit [Max SendQ exceeded]
dasher00 has joined #ruby
tuelz has joined #ruby
brent__ has joined #ruby
raspado has quit [Ping timeout: 240 seconds]
Cohedrin_ has joined #ruby
tuelz has quit [Client Quit]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
brent__ has quit [Ping timeout: 276 seconds]
jphase_ has quit [Remote host closed the connection]
DLSteve has quit [Ping timeout: 246 seconds]
charliesome has joined #ruby
t-recx has quit [Quit: t-recx]
jphase has joined #ruby
patarr has quit [Ping timeout: 260 seconds]
hahuang65 has joined #ruby
jameser has joined #ruby
jphase has quit [Ping timeout: 246 seconds]
jameser has quit [Client Quit]
patarr has joined #ruby
Patadas has joined #ruby
Patadas has quit [Max SendQ exceeded]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Patadas has joined #ruby
Patadas has quit [Max SendQ exceeded]
mwlang has quit [Ping timeout: 276 seconds]
Patadas has joined #ruby
zacts has quit [Ping timeout: 246 seconds]
Patadas has quit [Max SendQ exceeded]
Patadas has joined #ruby
Patadas has quit [Max SendQ exceeded]
Rodya_ has quit [Remote host closed the connection]
Patadas has joined #ruby
patarr has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
zacts has joined #ruby
mostlybadfly has joined #ruby
marr has quit [Ping timeout: 255 seconds]
Xiti has quit [Read error: Connection reset by peer]
hopland has joined #ruby
Xiti has joined #ruby
<hopland> Hey, all :) Trying to build ruby within a flatpak - but I've got some problems on the initial build
<hopland> How do I specify a costum dir/url to config.guess?
mim1k has joined #ruby
Rodya_ has joined #ruby
graft has quit [Ping timeout: 268 seconds]
railswebdev has joined #ruby
justbleed has joined #ruby
graft has joined #ruby
mim1k has quit [Ping timeout: 276 seconds]
cdg has joined #ruby
Guest2429 has left #ruby [#ruby]
JustTheDoctor has quit [Quit: Connection closed for inactivity]
nacsurte has quit [Quit: Lost terminal]
cdg_ has quit [Ping timeout: 276 seconds]
SteenJobs has joined #ruby
cdg has quit [Ping timeout: 240 seconds]
catphish has quit [Quit: Leaving]
Pepu has joined #ruby
Cohedrin_ has quit [Read error: Connection reset by peer]
Patadas has quit [Ping timeout: 260 seconds]
Cohedrin_ has joined #ruby
elsevero has joined #ruby
meshsmith has quit [Remote host closed the connection]
patarr has joined #ruby
snowcrshd has quit []
SteenJobs has quit [Quit: SteenJobs]
Cohedrin_ has quit [Max SendQ exceeded]
chrisgopher has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 260 seconds]
t-recx has joined #ruby
Mia has quit [Ping timeout: 260 seconds]
hutch34 has quit [Ping timeout: 240 seconds]
patarr has quit [Ping timeout: 260 seconds]
Cohedrin_ has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cyphase has quit [Ping timeout: 268 seconds]
Dimik has joined #ruby
charliesome has joined #ruby
umaaji has joined #ruby
PresidentBiscuit has joined #ruby
gusrub_ has quit [Ping timeout: 260 seconds]
cyphase has joined #ruby
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jameser has joined #ruby
railswebdev has joined #ruby
workmad3 has joined #ruby
Cohedrin_ has quit [Read error: Connection reset by peer]
Cohedrin_ has joined #ruby
Cohedrin_ has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 255 seconds]
Cohedrin_ has joined #ruby
millerti has joined #ruby
BSaboia has quit [Read error: Connection reset by peer]
uZiel has joined #ruby
Phanes- has quit [Quit: ...shout as you did in rome...]
Phanes has joined #ruby
Phanes has quit [Changing host]
Phanes has joined #ruby
r3vDev has joined #ruby
patarr has joined #ruby
cam27 has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Cohedrin_ has quit [Read error: Connection reset by peer]
d^sh has joined #ruby
charliesome has joined #ruby
Cohedrin_ has joined #ruby
patarr has quit [Ping timeout: 240 seconds]
d^sh_ has quit [Ping timeout: 268 seconds]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
uZiel has quit [Ping timeout: 248 seconds]
im314ous has joined #ruby
gizmore|2 has joined #ruby
uZiel has joined #ruby
gizmore has quit [Ping timeout: 268 seconds]
railswebdev has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
tau has quit [Remote host closed the connection]
tau has joined #ruby
PresidentBiscuit has quit []
tau has quit [Remote host closed the connection]
justbleed has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jackjackdripper has joined #ruby
hahuang65 has joined #ruby
__Yiota has joined #ruby
__Yiota has quit [Client Quit]
hahuang65 has quit [Ping timeout: 240 seconds]
Silthias has quit [Ping timeout: 260 seconds]
Svetlana has joined #ruby
Svetlana has quit [Max SendQ exceeded]
Svetlana has joined #ruby
Svetlana has quit [Max SendQ exceeded]
Pepu has quit [Remote host closed the connection]
Patadas has joined #ruby
im0nde has quit [Ping timeout: 240 seconds]
Patadas has quit [Max SendQ exceeded]
jenrzzz has quit [Ping timeout: 240 seconds]
Patadas has joined #ruby
GinoMan has quit [Ping timeout: 240 seconds]
uZiel has quit [Remote host closed the connection]
uZiel_ has joined #ruby
nicesignal has quit [Remote host closed the connection]
yehowyada has quit [Quit: Textual IRC Client: www.textualapp.com]
nicesignal has joined #ruby
ericx2x has quit [Remote host closed the connection]
cdg has joined #ruby
elsevero has quit [Quit: elsevero]
br0d1n has quit [Quit: Leaving]
hahuang65 has joined #ruby
justbleed has joined #ruby
uZiel_ has quit [Quit: Reconnecting]
uZiel has joined #ruby
harfangk has joined #ruby
hahuang65 has quit [Ping timeout: 276 seconds]
Rodya_ has quit [Remote host closed the connection]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jackjackdripper has quit [Quit: Leaving.]
gf3 has quit [Ping timeout: 260 seconds]
bogdanteleaga has quit [Ping timeout: 255 seconds]
duracrisis has quit [Ping timeout: 246 seconds]
millerti has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest85780 has quit [Ping timeout: 260 seconds]
bazzy has quit [Ping timeout: 255 seconds]
z64 has quit [Ping timeout: 240 seconds]
D9 has quit [Ping timeout: 240 seconds]
tsul has quit [Ping timeout: 240 seconds]
biox has quit [Ping timeout: 260 seconds]
chrisarcand has quit [Ping timeout: 240 seconds]
bogdanteleaga has joined #ruby
pawandubey has joined #ruby
D9 has joined #ruby
biox has joined #ruby
gf3 has joined #ruby
dyyylan has quit [Quit: ZNC 1.6.3+deb1 - http://znc.in]
gsingh93 has joined #ruby
dyyylan has joined #ruby
duracrisis has joined #ruby
tsul has joined #ruby
uZiel has quit [Ping timeout: 248 seconds]
patr0clus has joined #ruby
chrisarcand has joined #ruby
z64 has joined #ruby
mim1k has joined #ruby
bazzy has joined #ruby
railswebdev has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
Silthias has joined #ruby
patr0clus is now known as s3nd1v0g1us
asdfasdf has joined #ruby
pawandubey has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<asdfasdf> Hello, I am having trouble with the Ruby net/https library. For some reason I get a SocketError from my code, seen here: https://pastebin.com/zccLMppV .
<ruby[bot]> asdfasdf: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/d18beb547630864bb709b71d148236a4
<ruby[bot]> asdfasdf: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
im314ous has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mim1k has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
<elomatreb> asdfasdf: The net/http constructor wants a pure domain (no protocol) I think, try leaving the http:// part off
<havenwood> asdfasdf: If you just want the response it's less code to use OpenURI from the stdlib: require 'open-uri'; response = open 'http://www.wikipedia.org', &:read
FastJack has quit [Ping timeout: 258 seconds]
bed7 has joined #ruby
<asdfasdf> elmatreb, havenwood: I still get the same result
<havenwood> asdfasdf: You should get a redirect after elomatreb's fix or the response body with OpenURI.
<havenwood> asdfasdf: Double check you're running the suggested code?
<havenwood> asdfasdf: Try from your console:
<havenwood> ruby -ropen-uri -e "puts open 'http://www.wikipedia.org', &:read"
<asdfasdf> havenwood: Okay, so I get this now: https://gist.github.com/anonymous/c035b0de4834ce23b6eff3ff25c0a687
<havenwood> asdfasdf: That's odd. What Ruby version?
<havenwood> asdfasdf: Try?:
<havenwood> equire 'open-uri'; response = URI('http://www.wikipedia.org').read
<havenwood> require*
<asdfasdf> havenwood: I also get this when I run the command: https://gist.github.com/anonymous/be69e4a39f195915211f832e8294b727
<havenwood> works on my machine ¯\_(ツ)_/¯
<havenwood> Okay, doesn't work pre 2.4
<asdfasdf> Okay
<havenwood> redirection
<asdfasdf> Should I install rvm?
<asdfasdf> Because I just used default ruby in my distros repo
<havenwood> I forgot it was in 2.4 that open-uri got redirection automagical support.
<havenwood> asdfasdf: What distor?
<havenwood> asdfasdf: Excuse me, I mean what distro?
<asdfasdf> havenwood: Ubuntu
<havenwood> Brightbox maintains up-to-date Ruby package for Ubuntu, including Ruby 2.4: https://www.brightbox.com/docs/ruby/ubuntu/
<asdfasdf> Okay, I'll try it thanks.
<havenwood> asdfasdf: Or if it's dev and you'd like more versions of Ruby, ruby-install + chruby is simple and effective: http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you
<havenwood> There's an Ubuntu walkthrough for Ruby 2.4 ^ on Ubuntu with ruby-install/chruby.
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood> asdfasdf: You can handle the redirect yourself with net/http or open-uri but I think you're right to just bump to 2.4.1 if that's an option!
<havenwood> asdfasdf: There are also many high quality HTTP gems. Some wrap net/http, some wrap libcurl and some are pure Ruby.
arescorpio has quit [Quit: Leaving.]
<havenwood> asdfasdf: Here's one good option, http.rb: https://github.com/httprb/http#readme
<asdfasdf> I was trying to use Nokogiri
<havenwood> asdfasdf: For your immediate issue I think Ruby 2.4 and OpenURI is a nice solution.
<havenwood> asdfasdf: HTTP.rb + Nokogiri is great as well.
<havenwood> asdfasdf: Nokogiri::HTML HTTP.follow.get 'http://www.wikipedia.org'
<asdfasdf> May I ask how long you have been using Ruby for?
<asdfasdf> I think Nokogiri uses the Net/http library because I was getting the same errors
<havenwood> asdfasdf: Nokogiri is an XML/HTML parser.
<havenwood> You'd need the body result before it comes into play.
FastJack has joined #ruby
<havenwood> asdfasdf: About six years.
<havenwood> Almost six.
<havenwood> asdfasdf: Actually checking it'd be: Nokogiri::HTML HTTP.follow.get('http://www.wikipedia.org').to_s
mydog2 has quit [Ping timeout: 240 seconds]
mydog2 has joined #ruby
<havenwood> asdfasdf: Confirmed working in Ruby 2.4: Nokogiri::HTML URI('http://www.wikipedia.org').read
<asdfasdf> havenwood: does chruby allow you to switch between ruby versions?
<havenwood> asdfasdf: yes
<asdfasdf> Why not use RVM?
<havenwood> asdfasdf: For example `chruby 2.4` or `chruby 2.3.4`.
<havenwood> asdfasdf: chruby is about a hundred lines of shell, then another fifty if you want to autoswitch with .ruby-version files
mydog2 has quit [Max SendQ exceeded]
<havenwood> asdfasdf: RVM is tens of thousands of lines of shell and handles both installing, switching, and more
roamingdog has joined #ruby
<havenwood> asdfasdf: they're different categories
mydog2 has joined #ruby
<havenwood> asdfasdf: if you want exotic system support or patches for very old Rubies or are just used to it you might prefer RVM
<havenwood> asdfasdf: chruby is quite simple and fast and just works
<havenwood> asdfasdf: i've got to run, happy coding!
itsautomatisch has joined #ruby
railswebdev has joined #ruby
gix has quit [Ping timeout: 240 seconds]
mistym has joined #ruby
montanonic has joined #ruby
<asdfasdf> havenwood: Okay, thankls
hahuang65 has joined #ruby
t-recx has quit [Quit: t-recx]
gix has joined #ruby
hutch34 has joined #ruby
hahuang65 has quit [Ping timeout: 260 seconds]
<asdfasdf> havenwood: Sorry, but I'm still getting the same error: https://gist.github.com/anonymous/86d939b6f92c19f790d3d35263591884
kies has quit [Ping timeout: 246 seconds]
Coldblackice_ has quit [Ping timeout: 240 seconds]
<asdfasdf> havenwood: nevermind, I got it
hutch34 has quit [Ping timeout: 276 seconds]
jackjackdripper has joined #ruby
Coldblackice has joined #ruby
mydog2 has quit [Ping timeout: 260 seconds]
mydog2 has joined #ruby
r3vDev has quit [Quit: Leaving.]
xzhao_ has joined #ruby
astrobunny has joined #ruby
mydog2 has quit [Ping timeout: 268 seconds]
SteenJobs has joined #ruby
mydog2 has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
astrobunny has quit [Read error: Connection reset by peer]
rohitpaulk has joined #ruby
skweek has quit [Ping timeout: 276 seconds]
justbleed has quit [Quit: Textual IRC Client: www.textualapp.com]
TheBloke has quit [Ping timeout: 240 seconds]
BackEndCoder has quit [Excess Flood]
BackEndCoder has joined #ruby
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
elsevero has joined #ruby
wimplash has joined #ruby
Kug3lis is now known as Kug3lis_off
Kug3lis_off is now known as Kug3lis
Kug3lis is now known as Kug3lis_off
mydog2 has quit [Ping timeout: 260 seconds]
wimplash has quit [Client Quit]
mydog2 has joined #ruby
KeyJoo has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
minimalism has joined #ruby
hopland has quit [Remote host closed the connection]
konsolebox has quit [Ping timeout: 276 seconds]
SteenJobs has quit [Quit: SteenJobs]
JustTheDoctor has joined #ruby
cyphase has quit [Ping timeout: 260 seconds]
SteenJobs has joined #ruby
konsolebox has joined #ruby
xzhao_ has quit [Remote host closed the connection]
govg has quit [Ping timeout: 240 seconds]
mahlon has quit [Ping timeout: 268 seconds]
govg has joined #ruby
minimalism has quit [Quit: minimalism]
nofxxxx has joined #ruby
Wsewolod has quit [Ping timeout: 268 seconds]
jackjackdripper has joined #ruby
s3nd1v0g1us has quit [Ping timeout: 276 seconds]
PorcoRex has joined #ruby
PatrikasZvaigzde has quit [Ping timeout: 260 seconds]
nofxxx has quit [Ping timeout: 260 seconds]
rgr has joined #ruby
SteenJobs has quit [Quit: peaceee]
cadillac__ has joined #ruby
Trynemjoel2 has quit [Ping timeout: 264 seconds]
mim1k has joined #ruby
PatrikasZvaigzde has joined #ruby
bed7 has quit [Quit: Leaving]
cadillac_ has quit [Ping timeout: 240 seconds]
cadillac__ is now known as cadillac_
mim1k has quit [Ping timeout: 260 seconds]
rohitpaulk has quit [Ping timeout: 240 seconds]
tfitts has quit [Quit: Connection closed for inactivity]
cyphase has joined #ruby
pawandubey has joined #ruby
mahlon has joined #ruby
pawandubey has quit [Client Quit]
cdg_ has joined #ruby
minimalism has joined #ruby
cdg has quit [Ping timeout: 258 seconds]
Trynemjoel has joined #ruby
wimplash has joined #ruby
r3vDev has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wimplash has quit [Ping timeout: 255 seconds]
Ropeney has joined #ruby
enterprisey has joined #ruby
cdg_ has quit [Remote host closed the connection]
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
ringrong has joined #ruby
itsautomatisch has quit [Ping timeout: 260 seconds]
ringrong has quit [Max SendQ exceeded]
ringrong has joined #ruby
mydog2 has quit [Ping timeout: 260 seconds]
mydog2 has joined #ruby
ringrong has quit [Client Quit]
apofis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
govg has quit [Ping timeout: 276 seconds]
govg has joined #ruby
conta has joined #ruby
anisha has joined #ruby
apofis has joined #ruby
hahuang65 has joined #ruby
govg has quit [Ping timeout: 240 seconds]
Mortomes|Train has joined #ruby
nunchuck has quit [Ping timeout: 246 seconds]
conta has quit [Quit: conta]
Cohedrin_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rohitpaulk has joined #ruby
biberu has joined #ruby
hutch34 has joined #ruby
hahuang65 has quit [Ping timeout: 260 seconds]
hutch34 has quit [Ping timeout: 240 seconds]
runescape07rsps has joined #ruby
biberu has quit []
rgr_ has joined #ruby
astrobunny has joined #ruby
rgr has quit [Ping timeout: 255 seconds]
aupadhye has joined #ruby
biberu has joined #ruby
jackjackdripper has joined #ruby
uZiel has joined #ruby
TomyLobo has joined #ruby
oleo has quit [Quit: irc client terminated!]
mostlybadfly has quit [Quit: Connection closed for inactivity]
aufi has joined #ruby
muelleme_ has joined #ruby
blackwind_123 has quit [Ping timeout: 240 seconds]
rippa has joined #ruby
gj_ has joined #ruby
cyphase has quit [Ping timeout: 255 seconds]
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
grymmjack has quit [Ping timeout: 240 seconds]
gj_ is now known as grymmjack
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
rohitpaulk has quit [Ping timeout: 240 seconds]
roamingdog has quit [Remote host closed the connection]
runescape07rsps has quit [Ping timeout: 260 seconds]
roamingdog has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
Mortomes|Train has quit [Ping timeout: 260 seconds]
roamingdog has quit [Remote host closed the connection]
charliesome has joined #ruby
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
comet23 has quit [Quit: Always try to be modest, and be proud about it!]
rohitpaulk has joined #ruby
lightstalker has quit [Ping timeout: 240 seconds]
ta_ has quit [Remote host closed the connection]
alex`` has joined #ruby
hopland has joined #ruby
dionysus69 has joined #ruby
rohitpaulk has quit [Ping timeout: 260 seconds]
mcfiredr1ll is now known as freedrull
andikr has joined #ruby
enterprisey has quit [Remote host closed the connection]
rohitpaulk has joined #ruby
Azure has quit [Read error: Connection reset by peer]
Azure has joined #ruby
conta has joined #ruby
TomyLobo has quit [Ping timeout: 255 seconds]
alamar_ has quit [Ping timeout: 246 seconds]
alamar has joined #ruby
elsevero has quit [Quit: elsevero]
alamar is now known as Guest85030
muelleme_ has quit [Ping timeout: 260 seconds]
cyphase has joined #ruby
roshanavand has joined #ruby
Antiarc_ has quit [Read error: Connection reset by peer]
Antiarc has joined #ruby
mathys has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Mortomes|Work has joined #ruby
jameser has joined #ruby
Ropeney has quit [Ping timeout: 260 seconds]
jameser has quit [Client Quit]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
ta_ has joined #ruby
cyphase has quit [Ping timeout: 258 seconds]
roamingdog has joined #ruby
kies has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
cyphase has joined #ruby
roamingdog has quit [Ping timeout: 240 seconds]
elsevero has joined #ruby
TomyWork has joined #ruby
PorcoRex has quit [Quit: Leaving]
elsevero_ has joined #ruby
Madmanden has joined #ruby
elsevero has quit [Ping timeout: 255 seconds]
elsevero_ is now known as elsevero
jameser has joined #ruby
jameser has quit [Client Quit]
judofyr has joined #ruby
Madmanden has left #ruby [#ruby]
jameser has joined #ruby
sysvalve has joined #ruby
patarr has joined #ruby
ddddddd has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Dimik has quit [Ping timeout: 255 seconds]
nunchuck has joined #ruby
ferr has joined #ruby
hahuang65 has joined #ruby
patarr has quit [Ping timeout: 260 seconds]
latemus has quit [Ping timeout: 240 seconds]
hahuang65 has quit [Ping timeout: 260 seconds]
hutch34 has joined #ruby
DoubleMalt has joined #ruby
hutch34 has quit [Ping timeout: 276 seconds]
nobitanobi has joined #ruby
xychix has left #ruby [#ruby]
jackjackdripper has quit [Quit: Leaving.]
PatrikasZvaigzde has quit [Read error: Connection reset by peer]
latemus has joined #ruby
Patadas has quit [Ping timeout: 240 seconds]
PatrikasZvaigzde has joined #ruby
apofis has quit [Ping timeout: 240 seconds]
Patadas has joined #ruby
mikecmpbll has joined #ruby
blackwind_123 has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
romank has joined #ruby
jaruga________ has joined #ruby
axsuul has quit [Ping timeout: 246 seconds]
asdfasdf has quit [Quit: Leaving]
axsuul has joined #ruby
simmaniac has joined #ruby
sysvalve has quit [Disconnected by services]
simmaniac is now known as sysvalve
Burgestrand has joined #ruby
rohitpaulk has quit [Ping timeout: 240 seconds]
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
rohitpaulk has joined #ruby
Ishido has joined #ruby
montanonic has quit [Ping timeout: 276 seconds]
yeticry has joined #ruby
Silthias1 has joined #ruby
yeticry_ has quit [Ping timeout: 255 seconds]
Silthias has quit [Ping timeout: 260 seconds]
rohitpaulk has quit [Ping timeout: 260 seconds]
Silthias1 has left #ruby [#ruby]
lxsameer has joined #ruby
_moep_ has joined #ruby
contradictioned has quit [Ping timeout: 240 seconds]
kruppm has joined #ruby
Silthias has joined #ruby
romank has quit [Quit: Textual IRC Client: www.textualapp.com]
romank has joined #ruby
Patadas has quit [Remote host closed the connection]
romank is now known as romankapitonov
Patadas has joined #ruby
<_moep_> hello! I have a problem: I try to install unicorn via bundle exec gem install unicorn, but I get this error: https://paste.debian.net/hidden/4485ab46/ which tells me the correct gem in ~/.rbenv
hopland has quit [Ping timeout: 276 seconds]
rohitpaulk has joined #ruby
marr has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
al2o3-cr has quit [Ping timeout: 276 seconds]
jameser has joined #ruby
r3vDev has quit [Quit: Leaving.]
mim1k has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
cam27 has quit [Quit: cam27]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
agent_white has quit [Quit: bai]
im0nde has joined #ruby
dhollinger has quit [Ping timeout: 268 seconds]
postmodern has quit [Quit: Leaving]
pandaant has joined #ruby
axsuul has quit [Ping timeout: 260 seconds]
Coldblackice_ has joined #ruby
axsuul has joined #ruby
djbjd has joined #ruby
KeyJoo has quit [Ping timeout: 260 seconds]
Coldblackice has quit [Ping timeout: 268 seconds]
Coldblackice has joined #ruby
contradictioned has joined #ruby
_Coldblackice has joined #ruby
_Coldblackice has joined #ruby
_Coldblackice has quit [Remote host closed the connection]
alex`` has quit [Quit: WeeChat 1.8]
_Coldblackice has joined #ruby
_Coldblackice has quit [Remote host closed the connection]
Coldblackice_ has quit [Ping timeout: 268 seconds]
_Coldblackice has joined #ruby
_Coldblackice has quit [Read error: Connection reset by peer]
Coldblackice has quit [K-Lined]
Fraeon has quit [Ping timeout: 240 seconds]
_Coldblackice has joined #ruby
_Coldblackice has quit [Read error: Connection reset by peer]
_Coldblackice has joined #ruby
_Coldblackice has quit [Read error: Connection reset by peer]
<dminuoso> _moep_: Im wondering if this is a psych related bug that was fixed in a newer version.
Coldblackice has joined #ruby
<dminuoso> _moep_: Can you try upgrading to 2.3.4?
graingert is now known as pqnst
pqnst is now known as graingert
nofxxxx has quit [Remote host closed the connection]
flips has quit [Quit: bbl ...]
flips has joined #ruby
Coldblackice_ has joined #ruby
Coldblackice_ has quit [K-Lined]
Coldblackice has quit [K-Lined]
Coldblackice_ has joined #ruby
Coldblackice_ has quit [K-Lined]
Coldblackice_ has joined #ruby
runescape07rsps has joined #ruby
govg has joined #ruby
patarr has joined #ruby
Fernando-Basso has joined #ruby
Coldblackice has joined #ruby
_Coldblackice has joined #ruby
dhollinger has joined #ruby
Coldblackice has quit [K-Lined]
_Coldblackice has quit [K-Lined]
Coldblackice_ has quit [K-Lined]
_Coldblackice has joined #ruby
hahuang65 has joined #ruby
_Coldblackice has quit [K-Lined]
patarr has quit [Ping timeout: 240 seconds]
pale3x has left #ruby ["WeeChat 1.8"]
Esf has joined #ruby
Esf has quit [Client Quit]
hahuang65 has quit [Ping timeout: 240 seconds]
hutch34 has joined #ruby
astrobunny has quit [Remote host closed the connection]
astrobunny has joined #ruby
astrobunny has quit [Remote host closed the connection]
psychicist__ has joined #ruby
hutch34 has quit [Ping timeout: 276 seconds]
ltem has joined #ruby
judofyr has quit [Read error: Connection reset by peer]
judofyr_ has joined #ruby
Coldblackice has joined #ruby
Coldblackice is now known as Guest14371
minimalism has quit [Quit: minimalism]
Guest14371 has quit [Ping timeout: 260 seconds]
Serpent7776 has joined #ruby
psychicist__ has quit [Quit: leaving]
psychicist__ has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
im0nde has quit [Ping timeout: 276 seconds]
djbjd has quit [Quit: djbjd]
r3vDev has joined #ruby
Fysicus has joined #ruby
Fraeon has joined #ruby
djbjd has joined #ruby
sami has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 268 seconds]
GodFather has joined #ruby
pandaant has quit [Remote host closed the connection]
sami has joined #ruby
r3vDev has quit [Quit: Leaving.]
anisha has quit [Ping timeout: 240 seconds]
alex`` has joined #ruby
r3vDev has joined #ruby
tvw has joined #ruby
nowhere_man has quit [Ping timeout: 276 seconds]
anisha has joined #ruby
<_moep_> dminuoso: ok, I'll try
DoubleMalt has quit [Ping timeout: 276 seconds]
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
runescape07rsps has quit [Ping timeout: 260 seconds]
psychicist__ has quit [Quit: leaving]
psychicist__ has joined #ruby
ledestin has joined #ruby
ur5us has joined #ruby
ledestin has quit [Ping timeout: 276 seconds]
roamingdog has joined #ruby
bkxd has joined #ruby
bkxd_ has joined #ruby
GodFather has quit [Ping timeout: 260 seconds]
roamingdog has quit [Ping timeout: 276 seconds]
bkxd_ has quit [Ping timeout: 255 seconds]
bkxd has quit [Ping timeout: 255 seconds]
bkxd has joined #ruby
nowhere_man has joined #ruby
ur5us has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
bkxd has quit [Ping timeout: 255 seconds]
stamina has joined #ruby
ur5us has quit [Ping timeout: 276 seconds]
DoubleMalt has joined #ruby
zacts has quit [Ping timeout: 276 seconds]
Mia has quit [Ping timeout: 240 seconds]
zacts has joined #ruby
mydog2 has quit [Ping timeout: 255 seconds]
TomyWork has quit [Ping timeout: 240 seconds]
mydog2 has joined #ruby
patarr has joined #ruby
<kspencer> How can I add my ~/.gem/... path to the ruby load path? As I'm looking and only seeing how to add 'lib' directories, not user gem directories
bkxd has joined #ruby
cschneid has quit [Ping timeout: 258 seconds]
hahuang65 has joined #ruby
bkxd_ has joined #ruby
patarr has quit [Ping timeout: 276 seconds]
hahuang65 has quit [Ping timeout: 260 seconds]
hutch34 has joined #ruby
blackwind_123 has quit [Ping timeout: 276 seconds]
hutch34 has quit [Ping timeout: 255 seconds]
uZiel has quit [Ping timeout: 248 seconds]
IRC-Manager has joined #ruby
<IRC-Manager> hi
ldnunes has joined #ruby
WhereIsMySpoon has joined #ruby
<WhereIsMySpoon> Hey, I’m trying to install json 1.7.7 and I’m getting a crapton of compile errors when trying to install
<WhereIsMySpoon> when its trying to run make
jameser has joined #ruby
mim1k has quit [Ping timeout: 260 seconds]
tonini__ has quit [Quit: Connection closed for inactivity]
djbjd has quit [Quit: djbjd]
roshanavand has quit [Quit: roshanavand]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sepp2k has joined #ruby
im0nde has joined #ruby
blackwind_123 has joined #ruby
chimkan has joined #ruby
Mortomes|Work has quit [Ping timeout: 260 seconds]
synthroid has joined #ruby
minimalism has joined #ruby
chimkan has quit [Client Quit]
graft has quit [Ping timeout: 268 seconds]
chimkan has joined #ruby
chimkan has quit [Client Quit]
<_moep_> dminuoso: it doesnt work: https://paste.debian.net/hidden/816b0529/
<_moep_> :/
cschneid has joined #ruby
Guest43218 is now known as rprimus
minimalism has quit [Quit: minimalism]
chimkan has joined #ruby
minimalism has joined #ruby
chimkan has quit [Client Quit]
chimkan has joined #ruby
<chimkan> good morning
<chimkan> I have a question
<chimkan> I’m using whenever gem to cron my ruby scripts
<chimkan> but when it runs, it runs in a the cron bin directory instead of the app’s folder
<chimkan> then the app just doesn’t run because I cannot set the directory path
<chimkan> currently, I’m setting by using a constant and I name the directory’s path
minimalism has quit [Client Quit]
<chimkan> isn’t there any other way to do it dynamically?
<dminuoso> _moep_: It does.
minimalism has joined #ruby
<dminuoso> _moep_: It's an entirely different error.
ldnunes has quit [Ping timeout: 258 seconds]
<_moep_> dminuoso: hmmm my problem is, that I cant access to the unicorn
<dminuoso> _moep_: Im not convinced that "bundle exec gem install" is such a wise idea.
<dminuoso> What are you trying to do?
<_moep_> try to run a rails app
<dminuoso> _moep_: The rails app should specify all its dependencies in the Gemfile.
WhereIsMySpoon has quit [Quit: WhereIsMySpoon]
<dminuoso> _moep_: Which means a plain "bundle install" will install all necessary external dependencies.
djbjd has joined #ruby
<_moep_> yes I know and i did it
<_moep_> I unicorn is running, but I cant see it
r3vDev has quit [Quit: Leaving.]
millerti has joined #ruby
dropsh0t has joined #ruby
ldnunes has joined #ruby
FastJack has quit [Read error: Connection reset by peer]
mim1k has joined #ruby
graft has joined #ruby
graft has joined #ruby
graft has quit [Changing host]
GinoMan has joined #ruby
FastJack has joined #ruby
JustTheDoctor has quit [Quit: Connection closed for inactivity]
cdg has joined #ruby
Mortomes|Work has joined #ruby
jameser has joined #ruby
IRC-Manager has quit [Quit: Page closed]
minimalism has quit [Quit: minimalism]
r3vDev has joined #ruby
mim1k has quit [Read error: Connection reset by peer]
jphase has joined #ruby
synthroi_ has joined #ruby
Rodya_ has joined #ruby
synthroid has quit [Ping timeout: 260 seconds]
Patadas has quit [Ping timeout: 260 seconds]
patarr has joined #ruby
mim1k has joined #ruby
andikr has quit [Remote host closed the connection]
minimalism has joined #ruby
rohitpaulk has quit [Ping timeout: 240 seconds]
DoubleMalt has quit [Quit: Leaving]
bed7 has joined #ruby
rohitpaulk has joined #ruby
patarr has quit [Ping timeout: 276 seconds]
WhereIsMySpoon has joined #ruby
WhereIsMySpoon has joined #ruby
WhereIsMySpoon has quit [Changing host]
TheBloke has joined #ruby
r3vDev has quit [Quit: Leaving.]
nowhere_man has quit [Ping timeout: 240 seconds]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
simmaniac has joined #ruby
jameser has joined #ruby
sysvalve has quit [Ping timeout: 260 seconds]
runescape07rsps has joined #ruby
synthroi_ has quit [Remote host closed the connection]
minimalism has quit [Quit: minimalism]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chimkan has quit [Quit: chimkan]
WhereIsMySpoon has quit [Quit: WhereIsMySpoon]
jameser has joined #ruby
millerti has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
synthroid has joined #ruby
phikes has joined #ruby
nowhere_man has joined #ruby
Burgestrand has quit [Quit: Closing time!]
Burgestrand has joined #ruby
WhereIsMySpoon has joined #ruby
gnufied has joined #ruby
rohitpaulk has quit [Ping timeout: 276 seconds]
DLSteve has joined #ruby
hahuang65 has joined #ruby
centrx has joined #ruby
gregf_ has joined #ruby
Mortomes|Work has quit [Ping timeout: 260 seconds]
hahuang65 has quit [Ping timeout: 258 seconds]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Burgestrand has quit [Quit: Closing time!]
r3vDev has joined #ruby
hutch34 has joined #ruby
fuzzyhorns1 has joined #ruby
ta_ has quit [Remote host closed the connection]
jameser has joined #ruby
fuzzyhorns1 has quit [Client Quit]
psychicist__ has quit [Quit: leaving]
roamingdog has joined #ruby
psychicist__ has joined #ruby
hutch34 has quit [Ping timeout: 255 seconds]
oleo has joined #ruby
gheegh has joined #ruby
pier has joined #ruby
WhereIsMySpoon has quit [Quit: WhereIsMySpoon]
rohitpaulk has joined #ruby
__Yiota has joined #ruby
Burgestrand has joined #ruby
roamingdog has quit [Ping timeout: 258 seconds]
<ljarvis> that's because they're not real
jordanm has quit [Ping timeout: 260 seconds]
jordanm has joined #ruby
chouhoulis has joined #ruby
itsautomatisch has joined #ruby
runescape07rsps has quit [Ping timeout: 260 seconds]
millerti has joined #ruby
railswebdev has joined #ruby
WhereIsMySpoon has joined #ruby
<cttttt> Just wondering. Is it possible to perform an early return from a block in Ruby? I'm noticing that if I use `return` from a block is jumps out of the containing method instead of the block. I guess if returns aren't possible, the alternative would be to just fully describe the logic in blocks and make sure the result is evaluated last on all codepaths...right?
troys has joined #ruby
WhereIsMySpoon has left #ruby [#ruby]
Wsewolod has joined #ruby
chimkan has joined #ruby
<ljarvis> >> def foo; yield; end; foo { next 1; 2 }
<ruby[bot]> ljarvis: # => 1 (https://eval.in/823749)
aupadhye has quit [Ping timeout: 260 seconds]
stamina has quit [Quit: WeeChat 1.9]
<ljarvis> but yeah, you shouldn't really be doing too much complex stuff in blocks
<ytti_> break?
<ljarvis> whoops i meant to use break not next
<ljarvis> next works in this case.. for reasons, but break is more correct
chimkan has quit [Client Quit]
<cttttt> ljarvis: True. Are early `return` 's just seldom used in Ruby because of the last-statement-is-the-return-value behavior?
charliesome has joined #ruby
<ljarvis> pretty much yeah. They're used, but not too often
umaaji has quit [Quit: Leaving...]
chimkan has joined #ruby
<cttttt> ljarvis: Cool. I think Javascript scrambled my brain. It's actually easier to reason with when branches fully describe control flow. But in Javascript, early return is life.
dangerousdave has joined #ruby
mathys has quit [Quit: Leaving]
ferr has quit [Quit: WeeChat 1.8]
dropsh0t has quit [Quit: Leaving]
<elomatreb> cttttt: They're used in Ruby like guard frequently too, like guard statements. Catching the simple case/errors in the beginning of methods, usually in the form `return a if/unless b` or `raise A if/unless b`
dropsh0t has joined #ruby
<elomatreb> eh, garbled sentence
bkxd has quit [Read error: Connection reset by peer]
bkxd_ has quit [Read error: Connection reset by peer]
tau has joined #ruby
<cttttt> elomatreb: Yeah...this is a thing in JS as well. But it's more because in earlier iterations of the language, folks couldn't decide how to handle background tasks, so some slow operations take a callback which is called with an optional error argument. So, first thing u do is inspect the error, and return immediately if something's wrong...then process the result of the slow operation.
<cttttt> elomatreb: Since this happens *a lot* folks just do an early return, and avoid the indenting.
bkxd has joined #ruby
bkxd_ has joined #ruby
<cttttt> elomatreb: And, not garbled enough to be unreadable :) thx for the insights.
chimkan has quit [Quit: chimkan]
<cttttt> So, `next` in blocks (but avoid early return) and `return` in actual functions. I guess blocks !== functions in Ruby, eh?
<elomatreb> You'll find that Ruby code often doesn't use the explicit return keyword anywhere except in these statements
<ljarvis> cttttt: ruby doesn't really have functions
<ljarvis> cttttt: also, break not next
<elomatreb> Prefer break over next, and yes, blocks are not functions/methods
<elomatreb> They're just a bit of code associated with a method call
<dropsh0t> Early return is generally considered cleaner in ruby as well https://github.com/airbnb/ruby#no-nested-conditionals
mydog2 has quit [Ping timeout: 276 seconds]
<ljarvis> i mean, both of those examples are horrible
<ljarvis> *shrug*
<ruby[bot]> cttttt: we in #ruby do not like irccloud.com, I reposted your paste to gist for you: https://gist.github.com/e2121670ab33c74acc192ebc00a4005e
<ruby[bot]> cttttt: irccloud.com has no syntax highlighting, distracting formatting and loads slowly for most.
mydog2 has joined #ruby
<elomatreb> When you `yield` to a block it doesn't call a method (as in, put something on the stack until it returns), it's usually like a jump
<ljarvis> cttttt: you don't want map there, you want select :)
<cttttt> ljarvis: Re: Early return, was just thinking about literally returning early from a call to a block.
<ljarvis> >> (1..5).select(&:odd?)
<ruby[bot]> ljarvis: # => [1, 3, 5] (https://eval.in/823755)
<cttttt> ljarvis: Completely academic example...was literally expecting the events to be turned to `nil` here.
<cttttt> events --> evens
<elomatreb> cttttt: ljarvis solution is idiomatic, alternatively you could utilize that a non-branching if returns nil already, so `d if d.even?` has the same effect
<ljarvis> cttttt: sure, you just very hardly have to do that. If you do, maybe the code is bad. Using your example, you would indeed just write if d.even?; return; else; d; end
<cttttt> ljarvis: Just popped into a blank file to figure out why return was weird. Makes sense though...these aren't really first class functions being passed around.
<ljarvis> yeah, elomatreb's example would be how it's done in the wild. Implicit nil value from the conditional
Ropeney has joined #ruby
<cttttt> ljarvis: Yup. Makes senses. I'll try to reprogram myself to embrace the branch in Ruby :)
chimkan has joined #ruby
<ljarvis> >> (1..5).select { |d| d unless d.even? }
<ruby[bot]> ljarvis: # => [1, 3, 5] (https://eval.in/823756)
<cttttt> elomatreb: Just reading ur responses. So, yield is like calling a subroutine in some languages. Yikes. So, blocks are in no way functions at all. Interesting.
elsevero has quit [Ping timeout: 240 seconds]
<ljarvis> nothing is a function in Ruby, btw
<cttttt> ljarvis: Interesting. So, not even lamdas?
<ljarvis> They're lambdas :)
<cttttt> ljarvis: touche
<elomatreb> You can mutate state in lambdas, so they're not functions either
graft has quit [Ping timeout: 276 seconds]
<cttttt> Okay. I guess under the strict definition, yeah...ur right...
<ljarvis> it'll all start making sense pretty quickly
<elomatreb> In Ruby they're called methods for that reason
Rodya_ has quit [Remote host closed the connection]
Yzguy has joined #ruby
<cttttt> elomatreb: Makes sense. Because they can mutate data outside of converting args to a result.
oblique has quit [Quit: WeeChat 1.7.1]
Burgestrand has quit [Quit: Closing time!]
<elomatreb> Wrt blocks from earlier: You can get a Proc object (basically a wrapper for a block) to pass them around like you would in Javascript
<ljarvis> you can also unbind and rebind ruby methods
<ljarvis> because why not
kruppm has quit [Ping timeout: 276 seconds]
haylon has joined #ruby
vondruch has quit [Ping timeout: 255 seconds]
<Ropeney> elomatreb, can you reference something that a function must not change the state of anything?
<cttttt> ropeney: It's a thing in pure functional programming circles. Technically, they're right that the term is misused in a lot of cases.
<elomatreb> I'm thinking of functions from math, where calling a function with the same arguments must always produce the same result
kruppm has joined #ruby
<Ropeney> I don't see how changing the state on something is any different to that?
<cttttt> ropeney: From a computer science/math standpoint, ...a function produces the same result from the same inputs. So, mutating those inputs or anything else could break that contract.
<elomatreb> It's a fairly dumb technicality, you're right
<Ropeney> I don't think it is a technicality
<Ropeney> So a function in a "functional" language, couldn't write to a database during a function call?
<elomatreb> Look at how you have to jump through hoops in e.g. Haskell with the IO monad to achieve that
<elomatreb> You're right in essence, yes
<cttttt> ropeney: Whatever calls out to the db wouldn't be a function.
mim1k has quit [Read error: Connection reset by peer]
<elomatreb> In functional languages there is often one special "function" that's allowed to break this rule
<cttttt> ropeney: If you talk to a hardcore functional programmer, you'll notice anger if you say that a routine the mutates data is a function.
<Ropeney> It'd be "changing state" of something, indirectly or not.
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Kug3lis_off is now known as Kug3lis
<elomatreb> As I said, look at how e.g. IO works in Haskell, it demonstrates all this
<Ropeney> I can't find anything backing this up, do you mind sharing any article?
theunraveler has joined #ruby
oblique has joined #ruby
<elomatreb> https://en.wikipedia.org/wiki/Functional_programming#Pure_functions -- Changing state is a side effect
<elomatreb> But this is getting OT
<Ropeney> "In computer programming, a function may be considered a pure function if both of the following statements about the function hold:", so I'
<Ropeney> m still confused if "function" is incorrect here.
conta has quit [Ping timeout: 240 seconds]
<dminuoso> ropeney: it is incorrect.
<dminuoso> ropeney: They ought to say "routine"
<dminuoso> ropeney: "pure function" is the desperate attempt for "function" to regain its original meaning
<dminuoso> "function" is suddenly used synonmously with routine, so the old meaning of function suddenly becomes pure function.
<dminuoso> ljarvis | you can also unbind and rebind ruby methods
<elomatreb> How this came to be has to do with the evolution of programming languages from the basic form of a list of instructions
<dminuoso> ropeney: Essentially a pure function is a function that behaves in a mathematical sense.
itsech0 has joined #ruby
<ljarvis> pure like dminuoso
conta has joined #ruby
roamingdog has joined #ruby
<ljarvis> many routine, such mathmatics
<Ropeney> I think in maths, the purity comes natural though? This doesn't defy the standard definition of function in CS though.
t-recx has joined #ruby
<dropsh0t> take it over to #haskell
* elomatreb mumbles something about monads and burritos
<ljarvis> #ruby-offtopic is fine
<Ropeney> np :)
<ljarvis> nobody needs to be sent to haskell
<dminuoso> elomatreb: Maybe.
judofyr_ has quit []
<dminuoso> ljarvis: None needs to be send to Haskell even.
<ljarvis> har
<ljarvis> that was average at best for you
<dminuoso> ljarvis: Im Just trying to be like baweaver
<dminuoso> There's Nothing wrong with that.
<ljarvis> Maybe you should stop
<ljarvis> ^ see, subtle
<ljarvis> oh you did Maybe already
<ljarvis> DAMMIT
<ljarvis> ok everyone go to #ruby-offtopic
<dminuoso> ljarvis: You should Read what I say.
workmad3 has joined #ruby
troys is now known as troys_
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
ALVAN has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
Ropeney has quit [Remote host closed the connection]
mim1k has joined #ruby
roamingdog has quit [Remote host closed the connection]
<ALVAN> hello, in bash i can specify multiple hosts using box0[1-9].dev.foo, can i use same aproach to define an attribute like hosts='box0[1-9].dev.foo' as a list ?
roamingdog has joined #ruby
<ALVAN> so i wont need to enter all the 9 hosts
roamingdog has quit [Remote host closed the connection]
<elomatreb> >> (1..9).map {|i| "host#{i}.dev" }
<ruby[bot]> elomatreb: # => ["host1.dev", "host2.dev", "host3.dev", "host4.dev", "host5.dev", "host6.dev", "host7.dev", "host8.d ...check link for more (https://eval.in/823769)
graft has joined #ruby
graft has joined #ruby
graft has quit [Changing host]
<dminuoso> There must be a shorter way to do that.
phikes has quit [Remote host closed the connection]
dionysus70 has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
dionysus70 is now known as dionysus69
bkxd__ has joined #ruby
bkxd___ has joined #ruby
runescape07rsps has joined #ruby
<ALVAN> thanks elomatreb i will try it
workmad3 has quit [Ping timeout: 276 seconds]
<elomatreb> I agree with dminuoso though, this does not feel like a satisfyingly Ruby-obscure solution
bkxd_ has quit [Ping timeout: 276 seconds]
bkxd has quit [Ping timeout: 276 seconds]
enterprisey has joined #ruby
runescape07rsps has quit [Client Quit]
cam27 has joined #ruby
runescape07rsps has joined #ruby
nchambers is now known as god
<dminuoso> asm>> (1..9).map {|i| "host#{i}.dev" }
<ruby[bot]> dminuoso: I have disassembled your code, the result is at https://eval.in/823771
workmad3 has joined #ruby
<dminuoso> elomatreb: I do not think it is doable any shorter than that. But perhaps we can find a solution that uses less vm opcodes.
god is now known as nchambers
uZiel has joined #ruby
<dminuoso> Wow!
<dminuoso> 1..9 is a primitive?
Yzguy has quit [Quit: Zzz...]
<dminuoso> What the!
<dminuoso> That seals the deal. That _is_ the shortest way.
patarr has joined #ruby
im0nde has quit [Ping timeout: 276 seconds]
t-recx has quit [Quit: t-recx]
im0nde has joined #ruby
d10n-work has joined #ruby
Rodya_ has joined #ruby
hutch34 has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
andrzejku has joined #ruby
cdg has quit [Remote host closed the connection]
andrzejku has quit [Client Quit]
<balo> szerintem erdemes
<balo> wrong window sry
tvw has quit []
workmad3 has quit [Ping timeout: 260 seconds]
rickumali has joined #ruby
r3vDev has quit [Quit: Leaving.]
nowhere_man has quit [Ping timeout: 240 seconds]
shinnya has quit [Ping timeout: 260 seconds]
dionysus69 has quit [Ping timeout: 260 seconds]
tau has quit [Remote host closed the connection]
tau has joined #ruby
tau has quit [Remote host closed the connection]
davidmichaelkarr has joined #ruby
hahuang65 has joined #ruby
tau has joined #ruby
tau has quit [Remote host closed the connection]
brent__ has joined #ruby
tau has joined #ruby
nb_bez___ has joined #ruby
pier has quit [Quit: pier]
workmad3 has joined #ruby
justbleed has joined #ruby
hahuang65 has quit [Ping timeout: 260 seconds]
rohitpaulk has quit [Ping timeout: 255 seconds]
__Yiota has joined #ruby
pawandubey has joined #ruby
conta has quit [Ping timeout: 260 seconds]
tau has quit [Remote host closed the connection]
skweek has joined #ruby
tau has joined #ruby
hutch34 has quit [Quit: WeeChat 1.5]
xzhao has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawelbx has joined #ruby
<pawelbx> is there a way to check if a range is unbounded?
xzhao has joined #ruby
<dminuoso> &ri Range#exclude_end? pawelbx
<dminuoso> Unbounded kind of means something else.
<dminuoso> Ranges are by definition bounded.
Rodya_ has quit [Remote host closed the connection]
roshanavand has joined #ruby
Rodya_ has joined #ruby
<pawelbx> i meant if a range goes from -infinity to infinity
Rodya_ has quit [Remote host closed the connection]
<Papierkorb> pawelbx: That's not possible, even if you use Float::INFINITY, it has no special meaning for ruby
Yzguy has joined #ruby
<Papierkorb> As far ruby is concerned, 0..Float::INFINITY is still bounded
[Butch] has joined #ruby
cschneid_ has joined #ruby
xzhao has quit [Client Quit]
<dminuoso> But if you have some custom range with some Infinity object at the end, just test for range.end == YourInfinityObject
workmad3 has quit [Ping timeout: 246 seconds]
<eam> I mean, Float::INFINITY is actually a discrete value
xzhao has joined #ruby
montanonic has joined #ruby
<pawelbx> hmm ok so if i want to see if range is -infinity..infinity i should just check start/end values
<dminuoso> pawelbx: Yeah.
Rodya_ has joined #ruby
<pawelbx> ok thanks
gusrub has joined #ruby
gusrub has quit [Client Quit]
r3vDev has joined #ruby
gnufied has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby
tatey has quit [Quit: ZNC - http://znc.in]
gusrub has joined #ruby
Rodya_ has quit [Remote host closed the connection]
tatey has joined #ruby
rohitpaulk has joined #ruby
rubylegend2092 has joined #ruby
<rubylegend2092> Hi guys
<rubylegend2092> Can you please help with a problem that I'm having.
DaniG2k has joined #ruby
skweek has quit [Ping timeout: 276 seconds]
amclain has joined #ruby
wlanboy has quit [Ping timeout: 268 seconds]
<rubylegend2092> I'm trying to build an activerecord relationship between 3 models. I have a user model and a business user model. I would like to give the user the ability to leave a review on the ReviewModel linked to the business user. What kind of relationship would you establish for that?
<ljarvis> ?rails rubylegend2092
<ruby[bot]> rubylegend2092: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
Serpent7776 has quit [Quit: Leaving]
workmad3 has quit [Ping timeout: 260 seconds]
Wsewolod has quit [Ping timeout: 260 seconds]
<rubylegend2092> #RubyOnRails
rubylegend2092 has quit [Remote host closed the connection]
rohitpaulk has quit [Ping timeout: 276 seconds]
rubylegend2092 has joined #ruby
Rodya_ has joined #ruby
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
gheegh has quit [Ping timeout: 255 seconds]
gnufied has joined #ruby
anjen has joined #ruby
<rubylegend2092> hello
<havenwood> >> (-Float::INFINITY..Float::INFINITY).mixmax
<ruby[bot]> havenwood: # => undefined method `mixmax' for -Infinity..Infinity:Range ...check link for more (https://eval.in/823814)
<havenwood> Strange: Did you mean? minmax
<havenwood> rubylegend2092: Hi.
<havenwood> rubylegend2092: If you register and identify your nick you can join #RubyOnRails for Rails-specific questions.
<rubylegend2092> How do I register?
<havenwood> ?register rubylegend2092
<ruby[bot]> rubylegend2092: you need to be identified with NickServ, see /msg NickServ HELP
<rubylegend2092> register rubylegend2092
<rubylegend2092> ok
anjen has quit [Client Quit]
mim1k has quit [Ping timeout: 255 seconds]
gusrub has quit [Remote host closed the connection]
gusrub has joined #ruby
bkxd__ has quit [Read error: Connection reset by peer]
bkxd___ has quit [Read error: Connection reset by peer]
bkxd has joined #ruby
djbjd has quit [Quit: djbjd]
montanonic has quit [Ping timeout: 260 seconds]
Kug3lis is now known as Kug3lis_off
bkxd_ has joined #ruby
ddddddd has quit [Ping timeout: 260 seconds]
hutch34 has joined #ruby
djbjd has joined #ruby
<rubylegend2092> Alright, I managed to get registered to the IRC.
<Zarthus> excellent job
conta has joined #ruby
<mikecmpbll> that is a fine choice of alias, sir.
karlding_ is now known as karlding
muelleme_ has joined #ruby
<rubylegend2092> What I'm having an issue with, is how I should set a relationship up between 3 models. I have a BusinessUser model, a User model and a BusinessReview model. How can I allow the user to create/update/delete/read business reviews on the BusinessReview model. But still have a reference to the BusinessUser Model (for tracking purposes) ActiveRecord
cdg has joined #ruby
<rubylegend2092> If you have a better approach. Please let me know.
cam27 has quit [Quit: cam27]
jaruga_________ has joined #ruby
cdg has quit [Read error: Connection reset by peer]
r3vDev has quit [Quit: Leaving.]
cdg has joined #ruby
JustTheDoctor has joined #ruby
jaruga________ has quit [Ping timeout: 240 seconds]
valentin has joined #ruby
vali has quit [Read error: Connection reset by peer]
cdg has quit [Read error: Connection reset by peer]
cdg has joined #ruby
DaniG2k has quit [Quit: leaving]
mim1k has joined #ruby
ddddddd has joined #ruby
mikecmpbll has quit [Ping timeout: 240 seconds]
jaruga_________ has quit [Client Quit]
muelleme_ has quit [Ping timeout: 255 seconds]
Wsewolod has joined #ruby
kies has quit [Ping timeout: 240 seconds]
im0nde has quit [Ping timeout: 268 seconds]
cadillac__ has joined #ruby
lxsameer has quit [Quit: WeeChat 1.7]
meshsmith has joined #ruby
mim1k has quit [Ping timeout: 260 seconds]
cadillac_ has quit [Ping timeout: 260 seconds]
cadillac__ is now known as cadillac_
ltem has quit [Quit: Leaving]
tgragnato has joined #ruby
balazs has joined #ruby
pawandubey has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aufi has quit [Quit: Leaving]
isBEKaml has joined #ruby
rohitpaulk has joined #ruby
djbjd has quit [Quit: djbjd]
dionysus69 has joined #ruby
Cohedrin_ has joined #ruby
ujjain has quit [Quit: ZNC - 1.6.0 - http://znc.in]
GinoMan2440 has joined #ruby
nowhere_man has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ujjain has joined #ruby
ujjain has joined #ruby
ujjain has quit [Changing host]
cgfbee has quit [Ping timeout: 240 seconds]
gusrub has quit [Remote host closed the connection]
skweek has joined #ruby
gusrub has joined #ruby
GinoMan has quit [Ping timeout: 240 seconds]
pawandubey has joined #ruby
tau has quit [Remote host closed the connection]
gusrub has quit [Ping timeout: 276 seconds]
tau has joined #ruby
GinoMan2440 has quit [Ping timeout: 260 seconds]
cgfbee has joined #ruby
<ljarvis> rubylegend2092: you need to join #rubyonrails -- type /join #rubyonrails depending on your irc client
TomyLobo has joined #ruby
troys_ is now known as troys
<baweaver> ljarvis bit slow there
<baweaver> they're already there :)
hahuang65 has joined #ruby
<ljarvis> heh
kies has joined #ruby
GinoMan2440 has joined #ruby
nobitanobi has quit [Remote host closed the connection]
gusrub has joined #ruby
workmad3 has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
muelleme_ has joined #ruby
<dminuoso> baweaver, what are you doing in here?
romankapitonov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
synthroid has quit [Remote host closed the connection]
shinnya has joined #ruby
<baweaver> dminuoso hm?
conta has quit [Ping timeout: 276 seconds]
ltem has joined #ruby
nobitanobi has joined #ruby
synthroid has joined #ruby
xzhao_ has joined #ruby
xzhao_ has quit [Client Quit]
xzhao_ has joined #ruby
Yzguy has quit [Quit: Bye]
xzhao_ has quit [Client Quit]
nuk9 has joined #ruby
nuk9 has quit [Client Quit]
nuk9 has joined #ruby
nuk9 is now known as xzhao_
graft has quit [Ping timeout: 260 seconds]
xzhao_ is now known as nuk9
nuk9 is now known as xzhao_
Kug3lis_off is now known as Kug3lis
nobitanobi has quit [Remote host closed the connection]
perniciouscaffei has joined #ruby
alex`` has quit [Quit: WeeChat 1.8]
zululee has quit [Ping timeout: 255 seconds]
Kug3lis has quit [Quit: Textual IRC Client: www.textualapp.com]
xzhao_ has left #ruby ["http://quassel-irc.org - Chat comfortably. Anywhere."]
zululee has joined #ruby
bodgix_ has quit [Quit: ZNC 1.6.5 - http://znc.in]
bodgix has joined #ruby
skweek has quit [Ping timeout: 268 seconds]
kolgomorov has joined #ruby
bodgix has left #ruby [#ruby]
nb_bez___ has quit [Quit: Connection closed for inactivity]
tgragnato has quit [Ping timeout: 240 seconds]
__Yiota has joined #ruby
sebd has quit [Ping timeout: 260 seconds]
khaki has joined #ruby
thatsnotjack has joined #ruby
montanonic has joined #ruby
jottr has joined #ruby
simmaniac has quit [Quit: Leaving]
sebd has joined #ruby
synthroi_ has joined #ruby
haylon has quit [Ping timeout: 260 seconds]
ta_ has joined #ruby
synthroid has quit [Ping timeout: 260 seconds]
lxsameer has joined #ruby
GinoMan1423 has joined #ruby
ALVAN has left #ruby [#ruby]
oncall-pokemon has joined #ruby
<uZiel> can I iterate over array elements with each, but after skipping first n elements?
GinoMan2440 has quit [Ping timeout: 255 seconds]
<rickumali> you can try passing in the slice before your call to each
<rickumali> a[5..a.length].each { |n| puts n }
<apeiros> a[5..-1]
<apeiros> or a.skip(n).each
<apeiros> oh, wait
<apeiros> not skip… but there was a method…
andrzejku has joined #ruby
<apeiros> ah, right, drop
<apeiros> ary.drop(n).each …
<rickumali> nice
<uZiel> I was thinking of implementing something like a Fibonacci seq, in one line in ruby if possible
conta has joined #ruby
theunraveler has quit [Remote host closed the connection]
<uZiel> so i have a=[1,1,0,0,0,0,0,0,0,0...]; after the operation I want to update each element inplace with previous two sums
theunraveler has joined #ruby
rohitpaulk has quit [Ping timeout: 268 seconds]
<uZiel> (2..a.size-1).each {|i| a[i] = a[i-1] + a[i-2]}
<uZiel> ^ will this do it?
<uZiel> or is there a better way?
haylon has joined #ruby
shinnya has quit [Ping timeout: 258 seconds]
<baweaver> So Fibs?
rohitpaulk has joined #ruby
agent_white has joined #ruby
<baweaver> If it _is_ fibonacci, you don't even need a loop or recursion.
<uZiel> then how?
tau has quit [Remote host closed the connection]
tau has joined #ruby
<baweaver> Integer(φ^n + τ)
<baweaver> You'd use Phi and Tau.
agent_white has quit [Client Quit]
jphase has quit [Read error: Connection reset by peer]
jottr has quit [Ping timeout: 240 seconds]
jphase has joined #ruby
<uZiel> nah man, I am _not_ using fibonacci exactly but doing some other opration on the previous two elements
dmtd has joined #ruby
mydog2 has quit [Ping timeout: 260 seconds]
mydog2 has joined #ruby
<baweaver> each_with_index
<baweaver> last(n - offset)
Cohedrin_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Bock has quit [Ping timeout: 276 seconds]
rohitpaulk has quit [Ping timeout: 260 seconds]
<havenwood> my fav fib in Ruby: require 'matrix'; def fib n; (Matrix[[0, 1], [1, 1]] ** n.pred)[1, 1].to_i end
millerti has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rohitpaulk has joined #ruby
<havenwood> >> require 'matrix'; def fib n; (Matrix[[0, 1], [1, 1]] ** n.pred)[1, 1].to_i end; fib 10
<ruby[bot]> havenwood: # => 55 (https://eval.in/823927)
cam27 has joined #ruby
KeyJoo has joined #ruby
cdg has quit [Remote host closed the connection]
Ilie[] has joined #ruby
Cohedrin_ has joined #ruby
marxarelli|afk has quit [Quit: Textual IRC Client: www.textualapp.com]
marxarelli has joined #ruby
jottr has joined #ruby
urux has joined #ruby
khaki has quit [Quit: WeeChat 1.9]
jackjackdripper has joined #ruby
t-recx has joined #ruby
roamingdog has joined #ruby
rohitpaulk has quit [Ping timeout: 260 seconds]
cdg has joined #ruby
roamingdog has quit [Ping timeout: 260 seconds]
conta has quit [Ping timeout: 260 seconds]
dionysus70 has joined #ruby
dionysus69 has quit [Ping timeout: 268 seconds]
dionysus70 is now known as dionysus69
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ahrs has quit [Remote host closed the connection]
ahrs has joined #ruby
Rodya_ has quit [Remote host closed the connection]
urux has quit [Quit: urux]
tonini has joined #ruby
__Yiota has joined #ruby
jottr has quit [Ping timeout: 260 seconds]
jottr has joined #ruby
pawandubey has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
elsevero has joined #ruby
__Yiota has quit [Client Quit]
pawelbx has quit [Ping timeout: 255 seconds]
__Yiota has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
millerti has joined #ruby
konsolebox has quit [Quit: .]
dionysus69 has quit [Quit: dionysus69]
pawandubey has joined #ruby
gusrub has quit [Remote host closed the connection]
SeepingN has joined #ruby
FastJack has quit [Read error: Connection reset by peer]
FastJack has joined #ruby
gusrub has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
__Yiota has joined #ruby
__Yiota has quit [Client Quit]
yehowyada has joined #ruby
benlieb has joined #ruby
Rodya_ has joined #ruby
dare-to-recurse[ has left #ruby ["User left"]
uZiel has quit [Ping timeout: 248 seconds]
alex`` has joined #ruby
flak has joined #ruby
rippa has quit [Ping timeout: 255 seconds]
HoierM has joined #ruby
nobitanobi has joined #ruby
govg has quit [Quit: leaving]
flak has quit [Ping timeout: 276 seconds]
Dimik has joined #ruby
cam27 has quit [Quit: cam27]
nobitanobi has quit [Ping timeout: 255 seconds]
Ilie[] has quit []
pawandubey has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
govg has joined #ruby
wilbert has joined #ruby
bed7 has quit [Quit: Leaving]
kruppm has quit [Ping timeout: 260 seconds]
pohvak has joined #ruby
pawandubey has joined #ruby
centrx has quit []
Silthias has quit [Read error: Connection reset by peer]
MrBusiness has quit [Ping timeout: 246 seconds]
pawandubey has quit [Ping timeout: 276 seconds]
MrBusiness has joined #ruby
roamingdog has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
patarr_ has joined #ruby
jphase has quit [Remote host closed the connection]
jackjackdripper has quit [Quit: Leaving.]
chouhoul_ has joined #ruby
jphase has joined #ruby
roamingdog has quit [Remote host closed the connection]
rohitpaulk has joined #ruby
alex`` has quit [Quit: WeeChat 1.8]
roamingdog has joined #ruby
chouhou__ has joined #ruby
patarr has quit [Ping timeout: 276 seconds]
jackjackdripper has joined #ruby
roamingdog has quit [Read error: Connection reset by peer]
roamingdog has joined #ruby
chouhoulis has quit [Ping timeout: 276 seconds]
jphase has quit [Ping timeout: 240 seconds]
chouhoul_ has quit [Ping timeout: 240 seconds]
sepp2k has quit [Quit: Leaving.]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
rickumali has left #ruby ["peace!"]
benlieb has quit [Quit: benlieb]
troys is now known as troys_
muelleme_ has quit [Ping timeout: 240 seconds]
mim1k has joined #ruby
benlieb has joined #ruby
R11 has joined #ruby
mim1k has quit [Ping timeout: 260 seconds]
brent__ has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 276 seconds]
rohitpaulk has quit [Ping timeout: 240 seconds]
chouhou__ has quit [Remote host closed the connection]
chouhoulis has joined #ruby
cschneid_ has quit [Remote host closed the connection]
cschneid_ has joined #ruby
shinnya has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
cschneid_ has quit [Ping timeout: 240 seconds]
hutch34 has joined #ruby
patarr_ has quit [Ping timeout: 260 seconds]
jackjackdripper has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
enterprisey has quit [Read error: Connection reset by peer]
anjen has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
patarr has joined #ruby
brent__ has joined #ruby
theunraveler has quit [Read error: Connection reset by peer]
theunraveler has joined #ruby
dropsh0t has quit [Quit: Leaving]
Bock has joined #ruby
patarr has quit [Ping timeout: 276 seconds]
mikecmpbll has joined #ruby
workmad3 has joined #ruby
johnny56 has quit [Remote host closed the connection]
synthroi_ has quit []
Zinefer has quit [Quit: Page closed]
shinnya has quit [Ping timeout: 240 seconds]
GinoMan2440 has joined #ruby
Axy has joined #ruby
haylon has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 240 seconds]
patarr has joined #ruby
nobitanobi has joined #ruby
GinoMan1423 has quit [Ping timeout: 240 seconds]
Mia has quit [Ping timeout: 255 seconds]
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
patarr has quit [Ping timeout: 240 seconds]
GinoMan2440 has quit [Ping timeout: 240 seconds]
mim1k has joined #ruby
cschneid_ has joined #ruby
Axy has quit [Ping timeout: 260 seconds]
nobitanobi has quit [Remote host closed the connection]
dviola has joined #ruby
milardovich has joined #ruby
andrzejku has quit [Quit: Textual IRC Client: www.textualapp.com]
milardovich has quit [Remote host closed the connection]
Ishido has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 276 seconds]
mim1k has quit [Ping timeout: 260 seconds]
ldnunes has quit [Quit: Leaving]
patarr has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
benlieb has quit [Quit: benlieb]
ur5us has joined #ruby
Pisuke has quit [Quit: WeeChat 1.6-dev]
Wsewolod has quit [Ping timeout: 260 seconds]
millerti has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
troys_ is now known as troys
troys is now known as troys_
TessierAshpool has joined #ruby
troys_ is now known as troys
anjen has quit [Quit: anjen]
mostlybadfly has joined #ruby
zacts has quit [Ping timeout: 246 seconds]
tonini has quit [Quit: Connection closed for inactivity]
biberu has quit []
mydog2 has quit [Ping timeout: 276 seconds]
nofxx has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
Fysicus has quit [Quit: The Truth Is Just An Excuse For A Lack Of Imagination]
mydog2 has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
ltem has quit [Quit: Leaving]
ttilley has joined #ruby
enterprisey has joined #ruby
ttilley has quit [Changing host]
ttilley has joined #ruby
tau has quit [Remote host closed the connection]
tau has joined #ruby
agent_white has joined #ruby
roamingdog has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 240 seconds]
BSaboia has joined #ruby
postmodern has joined #ruby
dionysus69 has joined #ruby
TomyLobo has quit [Ping timeout: 255 seconds]
gix has quit [Ping timeout: 260 seconds]
fusta has joined #ruby
[Butch] has quit [Quit: I'm out . . .]
Patadas has joined #ruby
cam27 has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
jak has joined #ruby
gix has joined #ruby
yehowyada has quit [Quit: Textual IRC Client: www.textualapp.com]
chimkan has quit [Quit: chimkan]
HoierM has quit [Ping timeout: 260 seconds]
amperry has joined #ruby
theunraveler has quit []
R11 has quit [Ping timeout: 260 seconds]
ddddddd has quit [Ping timeout: 260 seconds]
PaulCapestany has quit [Quit: .]
jinie has quit [Quit: ZNC 1.6.1 - http://znc.in]
cam27 has quit [Quit: cam27]
jinie has joined #ruby
jinie has quit [Remote host closed the connection]
jinie has joined #ruby
meshsmith has quit [Remote host closed the connection]
ResidentBiscuit has quit [Quit: Critical Miss]
PaulCapestany has joined #ruby
Cohedrin_ has quit [Read error: Connection reset by peer]
jottr has quit [Ping timeout: 240 seconds]
Cohedrin_ has joined #ruby
<amperry> hi folks, I'm trying to connect to a postgresql db using the PG gem, but I need to be able to create a schema (in the postgresql sense of the word) and set my search_path to it.
<amperry> I'm reading a file of psql commands into an array, the first of which are 'create schema if not exists #{legacydb};' and 'set search_path to #{legacydb};' I've already created one schema manually, so the 'if not exists' should guard against creating it.
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
<amperry> As for the second command, my script seems to execute it, but when I go to execute other commands (e.g. 'insert into "TABLE NAME" ...'), I get the error 'relation "TABLE NAME" does not exist', even though it does, in the #{legacydb} schema.
<amperry> I'm guessing, therefore, that I'm not really altering my search_path, or at least, the change doesn't persist between commands.
<amperry> sooo... I guess the question is, is there something that needs to be done to persist the search_path in the same connection, but between commands?
jackjackdripper has joined #ruby
justbleed has quit [Ping timeout: 246 seconds]
__Yiota has joined #ruby
rgr_ has quit [Ping timeout: 276 seconds]
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
jak has quit [Remote host closed the connection]
tau has quit [Remote host closed the connection]
jak has joined #ruby
tau has joined #ruby
jak has quit [Client Quit]
jak has joined #ruby
dh64 has quit [Quit: Konversation terminated!]
roamingdog has joined #ruby
bkxd has quit [Read error: Connection reset by peer]
bkxd_ has quit [Read error: Connection reset by peer]
im0nde has joined #ruby
justbleed has joined #ruby
chouhoulis has quit [Remote host closed the connection]
workmad3 has joined #ruby
troys is now known as troys_
troys_ is now known as troys
cam27 has joined #ruby
bkxd has joined #ruby
dionysus69 has quit [Ping timeout: 268 seconds]
knight33 has joined #ruby
workmad3 has quit [Quit: Lost terminal]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bkxd_ has joined #ruby
Dimik has quit [Ping timeout: 260 seconds]
BSaboia has quit [Read error: Connection reset by peer]
meshsmith has joined #ruby
TessierAshpool has quit [Quit: leaving]
nb_bez____ has joined #ruby
hutch34 has quit [Quit: WeeChat 1.5]
Fernando-Basso has quit [Quit: WeeChat 1.9]
ahrs has quit [Remote host closed the connection]
ahrs has joined #ruby
wilbert has quit [Ping timeout: 260 seconds]
agent_white has quit [Quit: brbsec]
agent_white has joined #ruby
amperry has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
patarr has quit [Ping timeout: 276 seconds]
hahuang65 has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
<clemens3> first time i learn about search_path, seems to be a feature better living without
<clemens3> never needed it, and if you need it, i don-t know, maybe ur not clear about what you really need / but that-s me..
psychicist__ has quit [Ping timeout: 260 seconds]
ur5us has quit [Ping timeout: 240 seconds]
roamingdog has quit [Remote host closed the connection]
fusta has quit [Quit: Leaving]
hkdsun has quit [Read error: Connection reset by peer]
zacts has joined #ruby
millerti has joined #ruby
hkdsun has joined #ruby
nobitanobi has joined #ruby
pwnd_nsfw has quit [Ping timeout: 276 seconds]
cdg has quit [Remote host closed the connection]
eljimmy has joined #ruby
ozcanesen has joined #ruby
marxarelli is now known as marxarelli|afk
nobitanobi has quit [Ping timeout: 260 seconds]
jameser has joined #ruby
pwnd_nsfw has joined #ruby
Guest93253 is now known as graft
ozcanesen has quit [Quit: Textual IRC Client: www.textualapp.com]
mim1k has joined #ruby
jottr has joined #ruby
justbleed has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
justbleed has joined #ruby
mim1k has quit [Ping timeout: 255 seconds]
knight33 has quit [Quit: Textual IRC Client: www.textualapp.com]
jottr has quit [Ping timeout: 260 seconds]
justbleed has quit [Ping timeout: 255 seconds]
amperry has joined #ruby
<amperry> hi folks, I'm trying to use the 'pg' gem to read and execute a bunch of sql (postrgresql) commands from one or more files. I've determined that when I make the connection I am the right user with the right password, and I've also confirmed that I'm in the right schema. But, no matter what table I try to insert data into, I get the error 'relation "TABLE" not found'. Even though I can confirm its existence in the psql client. Any ideas
<amperry> why this might happen?
<amperry> correction, the error is 'relation "TABLE" does not exist'
<pabs> i'm guessing you've got the table name quoted in your query, a double-quoted identifier in postgres is case-sensitive
<pabs> so if your table is literally named table (lower case), and you're trying to query "TABLE", it won't find it
<amperry> they're uppercase, which is why I have the double quotes
<amperry> it happens regardless of the actual table name, too (although I haven't tried it on a lowercase table... let me check that).
<pabs> remove the double quotes from the name, that's what i'm trying to tell you
<pabs> or fix the case
<pabs> look:
<pabs> > create table asdf as select generate_series as a from generate_series(1, 5); select count(*) from "ASDF"; select count(*) from asdf;
<pabs> SELECT 5
<pabs> ERROR: relation "ASDF" does not exist
<pabs> LINE 1: select count(*) from "ASDF";
<pabs> ^
<pabs> count
jak has quit [Remote host closed the connection]
<pabs> -------
<pabs> 5
<pabs> (1 row)
jak has joined #ruby
<pabs> notice how the first query (the one with the double quoted relation name) fails with the exact same error you're seeing?
<amperry> the table names are given, and I've tried with and without quotes
Pepu has joined #ruby
rgs_ is now known as rgs
chimkan has joined #ruby
thatsnotjack has quit [Quit: WeeChat 1.7]
<pabs> amperry: the only things i can think of are your search path might be different, and/or the account your code is connecting as doesn't have the proper permissions to see the table
<pabs> amperry: but i suspect it's the double quotes
<amperry> is there no way to make the pg gem work with a table name that's all uppercase?
Patadas has quit [Ping timeout: 240 seconds]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<amperry> yeah, I've verified the user has permissions and I'm in the correct schema; I can query the tables from within a psql terminal client.
<pabs> amperry: it's the double quotes around the table name in the query itself, not the pg gem
Azure|dc has joined #ruby
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<amperry> how do you get postgresql to recognize an all-capital table name without quoting it? The tables pre-exist so I can't rename them.
<pabs> identifiers are case-insensitive in postgres unless they are double-quoted in the query string, so you need to remove the double quotes in the query string itself
Azure has quit [Ping timeout: 246 seconds]
<pabs> if you've got 'select count(*) from "TABLE"', it should be changed to 'select count(*) from table'
<amperry> same error, only now in lowercase; the table in question is OCCUPANTS, so (without the double quotes), I get 'ERROR: relation "occupants" does not exist'.
railswebdev has joined #ruby
<amperry> with them, I get 'ERROR: relation "OCCUPANTS" does not exist'
<pabs> if that's the case then it could be a search path issue
<amperry> possible, but by everything I can check, it's the right search_path, the right user credentials, and the right permissions.
<pabs> it would help if you could paste the actual query and/or the code that you're using (as a gist or whatever)
<amperry> sure, it'll take a moment...
<pabs> ok