/srv/irclogs.ubuntu.com/2015/07/10/#ubuntu-us-pa.txt

JonathanDMorning.08:22
rmg51Morning09:17
jackson_morn09:40
teddy-dbearMorning peoples, critters and everything else12:11
JonathanDMorning v212:11
teddy-dbearo/12:12
TengokuNoIsan\o/12:24
JonathanDhey hey hey (come to FOSSCON)12:27
lazyPowerI signed up!12:43
ChinnoDogWhy are there so many ways to install Ruby?22:22
lazyPowerChinnoDog: ah!22:48
lazyPowerarey ou still around?22:48
lazyPowerfor a change i'm not 100% focused on work and can actually lend a hand.22:48
ChinnoDogI'm about to attempt to fix the ruby problem on my server right now. It actually came up again because I was using a different piece of software.22:56
ChinnoDogI'm going to try taking the advice I found here: https://medium.com/@rdsubhas/ruby-in-production-lessons-learned-36d7ab726d9922:56
lazyPowerbrightbox works23:04
lazyPowerbut i still prefer to use rbenv + binstubs to do my deployments23:04
lazyPowerit tends to make them a little more bulletproof23:04
lazyPoweri know several people who shun having build tools on prod servers though, so ymmv23:05
lazyPowerand the bright box ppa is of high quality, and stays reasonably up to date23:05
ChinnoDogI tried installing ruby 2.0 and 2.2 and my ruby script in weechat is still broken. Maybe it is the script.23:09
lazyPowerI dont recall the trace you were seeing, but i also dont know what the script is doing23:10
ChinnoDogThe script file starts with a few requires. Do I have to build those?23:10
lazyPowerif they are in the stdlib no - if they are gems you should probably gem install bundler, and bundle install the gems.23:11
lazyPowerruby gems are a lot like python modules, isolation is the best bet when workign with them.23:11
ChinnoDoglazyPower: Here you go. http://pastebin.com/SVRNu85823:12
lazyPowerok so for context, this is with relation to the irc => slack gateway?23:13
ChinnoDogYes. I'm trying to load a weechat script that preloads history when I connect to the gateway.23:14
lazyPowerok, do you have a .bundle directory there somewhere?23:14
ChinnoDogI pulled the script from https://github.com/thoughtbot/weechat-slacklog23:15
ChinnoDogWhere do I look for that? Home directory?23:15
lazyPowerin the directory your weechat plugins are located23:15
lazyPoweri want to ensure there's not some bundler config override happening23:15
ChinnoDogThere aren't any other folders in the plugin directory with that ruby file23:16
lazyPowerok, and when you run ruby -v what do you see?23:16
ChinnoDogSorry, there is one folder that is called "autoload" that contains a link back to the ruby file. It is only intended to cause weechat to load it at startup.23:17
ChinnoDogNow that I've upgraded from BrightBox I get: https://github.com/thoughtbot/weechat-slacklog23:17
ChinnoDogoops23:17
ChinnoDogruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux-gnu]23:17
ChinnoDogthat23:17
lazyPowerok so far so good23:18
ChinnoDogI just did "sudo gem install bundler" since you thought I should have it.23:18
lazyPowercan you run `irb` in the directory containing that script, then execute `require file`23:19
lazyPowerlooking over the header, this is all stdlib23:19
lazyPowerwe're goign to try to piss off ruby, and see if we cant dump some environment and figure out where its looking for gems23:19
lazyPoweri imagine this is related to a malformed, or improper GEM_HOME23:19
ChinnoDogusing "require file" in irb throws an error.23:20
lazyPowerwell `require file` - should be require weechat-slack23:20
lazyPowerwith quotes around weechat-slack23:20
lazyPowerrequire "weechat-slack"23:20
ChinnoDogirb(main):006:0> require "./slacklog.rb"23:21
ChinnoDog=> true23:21
ChinnoDogThat?23:21
lazyPowerok, so slacklog isnt' throwing an error on load23:21
lazyPowers = SlackAPI(token=''foobazbar")23:22
ChinnoDogWhere are you suggesting I type that?23:23
lazyPowerin the irb console23:23
lazyPowerif you have your token, use the actual token23:23
ChinnoDogI used the actual token and it doesn't do anything23:25
lazyPowerstill good23:25
lazyPowers is now an API object, we''re going to initate an HTTP request, 1 sec23:25
ChinnoDogIt changed the last character of the irb prompt to a quotation mark.23:26
lazyPowerah that means you didn't close the quotes properly23:26
lazyPowerperhaps a mismatch in quote type? or missing quote?23:26
ChinnoDogYou used two single quotes to open the string and one double quote to close it. Which should it be?23:26
lazyPoweruse double quotes23:27
lazyPowermy b23:27
lazyPowerits late on a friday is my poor excuse :)23:27
ChinnoDogNow I get: NoMethodError: undefined method `SlackAPI' for main:Object23:27
lazyPowerschenanigans23:28
lazyPowerhang on23:28
lazyPowerok i've been in python too long23:29
lazyPowerirb(main):006:0> s = SlackAPI.new(token='foobar')23:29
lazyPoweryou initialize classes in ruby with .new(**params)23:29
lazyPowerwith your module initialized, try fetching 2 messages from teh backlog23:30
lazyPowers.backlog('#dev', count=2)23:30
lazyPoweri'm using #dev as an e xample, replace with a room that exists in your slack instance23:30
ChinnoDogIt returned a message that I assume means it is successful since it is not an error.23:31
ChinnoDogwill try backlog function now23:31
ChinnoDogIt worked. It returned two lines from my #training channel23:32
lazyPowerok, try fetching a large amount and lets see if its the data thats coming back causing the error.23:32
lazyPowerlike if someone has a unicode character in their handle for example23:32
lazyPowerlike: Athénaïs23:33
ChinnoDogI just returned 50 lines and that was fine.23:34
ChinnoDogI am joined to a number of channels. It would take me awhile to test them all.23:34
lazyPowertheres a way to do it programmatically - but theres 1 of 2 things going on23:35
lazyPowerdata coming back over the wire is causing this, or there's something in teh weechat init that is pointing to an older version of ruby23:35
lazyPoweror an improper gem location or some such23:35
lazyPowerits one of those two things, we've established the plugin loads and functions under normal circumstances23:35
ChinnoDogI looked back at the errors. It says it can't load net/https23:36
lazyPowerand net/https is whats wraising the encoding error23:36
ChinnoDogBut I don't know how that can be since I just returned files from Slack using irb. Wouldn't irb load the dependencies when it created the object?23:36
lazyPoweryep23:37
ChinnoDoghmm23:37
ChinnoDogI'm going to restart weechat. One second.23:38
ChinnoDogWell, I created a new problem. lol23:41
lazyPowerwooo23:41
ChinnoDogMy /script command appears to be MIA23:41
lazyPowerprogress, different errors23:41
lazyPowerok - but23:41
lazyPowerdoes the slack-backlog work?23:41
lazyPoweror is that a prerequisit?23:41
ChinnoDogI don't know how to test it without /script!23:42
lazyPowerare you running whats in archive or upstream ChinnoDog?23:43
ChinnoDogI just did an apt-get autoremove and it removed Ruby 1.9. idk if that will make a difference.23:43
ChinnoDogOf weechat? I'm using 1.3-dev from the PPA23:43
lazyPowerthat should keep you from having two rubies on your system. which is a good th ing23:43
ChinnoDogI'm going to try quitting weechat entirely instead of using the in place upgrade. brb23:43
lazyPowerwhen you installed brigtbox it should have updated-defaults to the 2.x23:43
lazyPowerright23:44
lazyPower...23:44
lazyPowerwait23:44
lazyPoweryou had not nuked the weechat instance since we started this?23:44
lazyPowerthat very well could be the issue. Stale environment surrounding weechat23:44
lazyPowerwhich would make sense that net::http was failing to load encoding23:44
ChinnoDogThe issue came up right after restarting weechat so I assumed that was nto the issue23:44
lazyPowerhmm ok23:45
ChinnoDogI did an in place /upgrade a few minutes ago in case I accidentally downloaded a newer weechat binary since I did that.23:45
ChinnoDogI still have no /script command. lol23:46
ChinnoDogClearly something has gone horribly wrong.23:46
lazyPowerjoin me #weechat23:46
lazyPowerlets ask upstream if they know why the missing /script23:47
* lazyPower twiddles thumbs - and now we wait.23:50
pleia2I didn't break openstack today \o/23:51
JonathanD\o/23:51
JonathanDHowdy pleia223:51
pleia2o/ JonathanD23:52
lazyPowercongrats pleia2!23:52
lazyPowerChinnoDog: looking over the docs, i wonder if it didn't brick your session files... i have no way of knowing23:52
lazyPowerbut sounds plausible23:52
lazyPowerhttps://weechat.org/files/doc/stable/weechat_user.en.html <-- in here, looking for /upgrade23:52
lazyPoweror maybe you need to run with the --upgrade flag?23:53
ChinnoDogooh23:54
ChinnoDogI'll try that23:54
ChinnoDogdidn't help23:54
lazyPowerdrat23:54
ChinnoDogYou know what would be nice? Error messages.23:55
lazyPower^23:55
ChinnoDogI'm going to have to come back to this later.23:56
lazyPowerallright, sorry this wasn't a simple fix ChinnoDog23:57
ChinnoDog'sokay. I'll have to unbreak my weechat before any more "fixing" occurs.23:57
lazyPowerwell, at least we compound fractured it23:57
* lazyPower hands you the duct tape23:57
ChinnoDogI need to do a quick investigation without any channel buffers.23:58

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!