JonathanD | Morning. | 08:22 |
---|---|---|
rmg51 | Morning | 09:17 |
jackson_ | morn | 09:40 |
teddy-dbear | Morning peoples, critters and everything else | 12:11 |
JonathanD | Morning v2 | 12:11 |
teddy-dbear | o/ | 12:12 |
TengokuNoIsan | \o/ | 12:24 |
JonathanD | hey hey hey (come to FOSSCON) | 12:27 |
lazyPower | I signed up! | 12:43 |
ChinnoDog | Why are there so many ways to install Ruby? | 22:22 |
lazyPower | ChinnoDog: ah! | 22:48 |
lazyPower | arey ou still around? | 22:48 |
lazyPower | for a change i'm not 100% focused on work and can actually lend a hand. | 22:48 |
ChinnoDog | I'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 |
ChinnoDog | I'm going to try taking the advice I found here: https://medium.com/@rdsubhas/ruby-in-production-lessons-learned-36d7ab726d99 | 22:56 |
lazyPower | brightbox works | 23:04 |
lazyPower | but i still prefer to use rbenv + binstubs to do my deployments | 23:04 |
lazyPower | it tends to make them a little more bulletproof | 23:04 |
lazyPower | i know several people who shun having build tools on prod servers though, so ymmv | 23:05 |
lazyPower | and the bright box ppa is of high quality, and stays reasonably up to date | 23:05 |
ChinnoDog | I tried installing ruby 2.0 and 2.2 and my ruby script in weechat is still broken. Maybe it is the script. | 23:09 |
lazyPower | I dont recall the trace you were seeing, but i also dont know what the script is doing | 23:10 |
ChinnoDog | The script file starts with a few requires. Do I have to build those? | 23:10 |
lazyPower | if they are in the stdlib no - if they are gems you should probably gem install bundler, and bundle install the gems. | 23:11 |
lazyPower | ruby gems are a lot like python modules, isolation is the best bet when workign with them. | 23:11 |
ChinnoDog | lazyPower: Here you go. http://pastebin.com/SVRNu858 | 23:12 |
lazyPower | ok so for context, this is with relation to the irc => slack gateway? | 23:13 |
ChinnoDog | Yes. I'm trying to load a weechat script that preloads history when I connect to the gateway. | 23:14 |
lazyPower | ok, do you have a .bundle directory there somewhere? | 23:14 |
ChinnoDog | I pulled the script from https://github.com/thoughtbot/weechat-slacklog | 23:15 |
ChinnoDog | Where do I look for that? Home directory? | 23:15 |
lazyPower | in the directory your weechat plugins are located | 23:15 |
lazyPower | i want to ensure there's not some bundler config override happening | 23:15 |
ChinnoDog | There aren't any other folders in the plugin directory with that ruby file | 23:16 |
lazyPower | ok, and when you run ruby -v what do you see? | 23:16 |
ChinnoDog | Sorry, 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 |
ChinnoDog | Now that I've upgraded from BrightBox I get: https://github.com/thoughtbot/weechat-slacklog | 23:17 |
ChinnoDog | oops | 23:17 |
ChinnoDog | ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux-gnu] | 23:17 |
ChinnoDog | that | 23:17 |
lazyPower | ok so far so good | 23:18 |
ChinnoDog | I just did "sudo gem install bundler" since you thought I should have it. | 23:18 |
lazyPower | can you run `irb` in the directory containing that script, then execute `require file` | 23:19 |
lazyPower | looking over the header, this is all stdlib | 23:19 |
lazyPower | we're goign to try to piss off ruby, and see if we cant dump some environment and figure out where its looking for gems | 23:19 |
lazyPower | i imagine this is related to a malformed, or improper GEM_HOME | 23:19 |
ChinnoDog | using "require file" in irb throws an error. | 23:20 |
lazyPower | well `require file` - should be require weechat-slack | 23:20 |
lazyPower | with quotes around weechat-slack | 23:20 |
lazyPower | require "weechat-slack" | 23:20 |
ChinnoDog | irb(main):006:0> require "./slacklog.rb" | 23:21 |
ChinnoDog | => true | 23:21 |
ChinnoDog | That? | 23:21 |
lazyPower | ok, so slacklog isnt' throwing an error on load | 23:21 |
lazyPower | s = SlackAPI(token=''foobazbar") | 23:22 |
ChinnoDog | Where are you suggesting I type that? | 23:23 |
lazyPower | in the irb console | 23:23 |
lazyPower | if you have your token, use the actual token | 23:23 |
ChinnoDog | I used the actual token and it doesn't do anything | 23:25 |
lazyPower | still good | 23:25 |
lazyPower | s is now an API object, we''re going to initate an HTTP request, 1 sec | 23:25 |
ChinnoDog | It changed the last character of the irb prompt to a quotation mark. | 23:26 |
lazyPower | ah that means you didn't close the quotes properly | 23:26 |
lazyPower | perhaps a mismatch in quote type? or missing quote? | 23:26 |
ChinnoDog | You used two single quotes to open the string and one double quote to close it. Which should it be? | 23:26 |
lazyPower | use double quotes | 23:27 |
lazyPower | my b | 23:27 |
lazyPower | its late on a friday is my poor excuse :) | 23:27 |
ChinnoDog | Now I get: NoMethodError: undefined method `SlackAPI' for main:Object | 23:27 |
lazyPower | schenanigans | 23:28 |
lazyPower | hang on | 23:28 |
lazyPower | ok i've been in python too long | 23:29 |
lazyPower | irb(main):006:0> s = SlackAPI.new(token='foobar') | 23:29 |
lazyPower | you initialize classes in ruby with .new(**params) | 23:29 |
lazyPower | with your module initialized, try fetching 2 messages from teh backlog | 23:30 |
lazyPower | s.backlog('#dev', count=2) | 23:30 |
lazyPower | i'm using #dev as an e xample, replace with a room that exists in your slack instance | 23:30 |
ChinnoDog | It returned a message that I assume means it is successful since it is not an error. | 23:31 |
ChinnoDog | will try backlog function now | 23:31 |
ChinnoDog | It worked. It returned two lines from my #training channel | 23:32 |
lazyPower | ok, try fetching a large amount and lets see if its the data thats coming back causing the error. | 23:32 |
lazyPower | like if someone has a unicode character in their handle for example | 23:32 |
lazyPower | like: Athénaïs | 23:33 |
ChinnoDog | I just returned 50 lines and that was fine. | 23:34 |
ChinnoDog | I am joined to a number of channels. It would take me awhile to test them all. | 23:34 |
lazyPower | theres a way to do it programmatically - but theres 1 of 2 things going on | 23:35 |
lazyPower | data coming back over the wire is causing this, or there's something in teh weechat init that is pointing to an older version of ruby | 23:35 |
lazyPower | or an improper gem location or some such | 23:35 |
lazyPower | its one of those two things, we've established the plugin loads and functions under normal circumstances | 23:35 |
ChinnoDog | I looked back at the errors. It says it can't load net/https | 23:36 |
lazyPower | and net/https is whats wraising the encoding error | 23:36 |
ChinnoDog | But 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 |
lazyPower | yep | 23:37 |
ChinnoDog | hmm | 23:37 |
ChinnoDog | I'm going to restart weechat. One second. | 23:38 |
ChinnoDog | Well, I created a new problem. lol | 23:41 |
lazyPower | wooo | 23:41 |
ChinnoDog | My /script command appears to be MIA | 23:41 |
lazyPower | progress, different errors | 23:41 |
lazyPower | ok - but | 23:41 |
lazyPower | does the slack-backlog work? | 23:41 |
lazyPower | or is that a prerequisit? | 23:41 |
ChinnoDog | I don't know how to test it without /script! | 23:42 |
lazyPower | are you running whats in archive or upstream ChinnoDog? | 23:43 |
ChinnoDog | I just did an apt-get autoremove and it removed Ruby 1.9. idk if that will make a difference. | 23:43 |
ChinnoDog | Of weechat? I'm using 1.3-dev from the PPA | 23:43 |
lazyPower | that should keep you from having two rubies on your system. which is a good th ing | 23:43 |
ChinnoDog | I'm going to try quitting weechat entirely instead of using the in place upgrade. brb | 23:43 |
lazyPower | when you installed brigtbox it should have updated-defaults to the 2.x | 23:43 |
lazyPower | right | 23:44 |
lazyPower | ... | 23:44 |
lazyPower | wait | 23:44 |
lazyPower | you had not nuked the weechat instance since we started this? | 23:44 |
lazyPower | that very well could be the issue. Stale environment surrounding weechat | 23:44 |
lazyPower | which would make sense that net::http was failing to load encoding | 23:44 |
ChinnoDog | The issue came up right after restarting weechat so I assumed that was nto the issue | 23:44 |
lazyPower | hmm ok | 23:45 |
ChinnoDog | I did an in place /upgrade a few minutes ago in case I accidentally downloaded a newer weechat binary since I did that. | 23:45 |
ChinnoDog | I still have no /script command. lol | 23:46 |
ChinnoDog | Clearly something has gone horribly wrong. | 23:46 |
lazyPower | join me #weechat | 23:46 |
lazyPower | lets ask upstream if they know why the missing /script | 23:47 |
* lazyPower twiddles thumbs - and now we wait. | 23:50 | |
pleia2 | I didn't break openstack today \o/ | 23:51 |
JonathanD | \o/ | 23:51 |
JonathanD | Howdy pleia2 | 23:51 |
pleia2 | o/ JonathanD | 23:52 |
lazyPower | congrats pleia2! | 23:52 |
lazyPower | ChinnoDog: looking over the docs, i wonder if it didn't brick your session files... i have no way of knowing | 23:52 |
lazyPower | but sounds plausible | 23:52 |
lazyPower | https://weechat.org/files/doc/stable/weechat_user.en.html <-- in here, looking for /upgrade | 23:52 |
lazyPower | or maybe you need to run with the --upgrade flag? | 23:53 |
ChinnoDog | ooh | 23:54 |
ChinnoDog | I'll try that | 23:54 |
ChinnoDog | didn't help | 23:54 |
lazyPower | drat | 23:54 |
ChinnoDog | You know what would be nice? Error messages. | 23:55 |
lazyPower | ^ | 23:55 |
ChinnoDog | I'm going to have to come back to this later. | 23:56 |
lazyPower | allright, sorry this wasn't a simple fix ChinnoDog | 23:57 |
ChinnoDog | 'sokay. I'll have to unbreak my weechat before any more "fixing" occurs. | 23:57 |
lazyPower | well, at least we compound fractured it | 23:57 |
* lazyPower hands you the duct tape | 23:57 | |
ChinnoDog | I 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!