#ruby - 10 May 2017
« Back 1 day Forward 1 day »
[02:10:40] agent_white: Low five cause it's more like james bond. Secret handshake to unlock the hidden corridor behind thebar.
[05:21:44] Hanmac: apeiros: look i am in ruby changes again https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/58618 xD
[06:18:37] dminuoso: morfin: Or just search through ObjectSpace (dont do that in production code though)
[06:19:13] morfin: so i was thinking go trought controller which is dynamically created by AA(which i don't like but used)
[06:22:20] morfin: it's pretty weird situation because i have miniruby.exe/ruby.exe/rubyw.exe, all required libs etc but can't install(make install in build directory do nothing and return code is 0 like no error happened)
[08:38:31] pwnd_nsfw: For exercises like https://www.reddit.com/r/dailyprogrammer/comments/68oda5/20170501_challenge_313_easy_subset_sum/
[09:00:28] Mirozh_: Hi guys, i m looking for help with a script Ruby. This script use htmltoword library and it works when i execute it from a terminal. But it doesn't work when i try to exec it from a script php. It says that the library 'htmltoword' can not be load.
[09:01:16] Mirozh_: I have tried many solutions but still not working at all... try to reinstall htmltoword, try to change the locate path environment ( $: ), etc...
[09:01:35] manveru: Mirozh_: you probably don't have GEM_PATH set in php, and it might run as a different user
[09:17:51] Mirozh_: I m using the function exec() or system() in php to call my script. The user is different because i m using suexec with Apache2, but when i try to su with this user from a terminal, i can execute the script without error...
[10:08:52] adaedra: Those usually have wrapper scripts (rbenv shims, chruby-exec) that allow you to set the environment properly when running outside an interactive shell
[12:26:10] ikopico: Hiya, question regarding `bundler` and `gem build`, using the `bundle gem` templates I've built a gem, now when I'm running `bundle install && bundle exec rake build` I do get an error where my gem includes itself. When I'm running `bundle install` (and it's doing so according to the gemspec) I can see that it's using the local gem (i.e. source at '.'). This blocks me from generating a `.gem` file. Did anyeone
[12:44:32] ikopico: I guess it's done on purpose, http://bundler.io/v1.12/guides/creating_gem.html#testing-our-gem, I just don't know how to fix this problem
[13:04:11] ikopico: OK I managed to solve the problem, I was packing the gemspec, it might have been the cause?
[13:21:37] Mirozh_: Hello guys, im getting this error when try to execute ruby script: Ignoring nokogiri-1.7.2 because its extensions are not built. Try: gem pristine nokogiri --version 1.7.2
[14:21:54] mostlybadfly: Good morning, is anyone here familiar with RSpotify? Looking for some tips regarding testing it's use in Rails
[14:26:17] Mirozh_: Hello hello. I m trying but... i am still block with that library path ... When try to exec some ruby script with php exec(), i get some library problem path. I m sure it's about environment but i don't know what should i do
[14:29:45] matthewd: Mirozh_: Does the command work when you run it directly? You probably need to compare the environment variables for each invocation, and try to make them match up
[16:46:59] umdstu: i'm trying to connect to a host with RESTclient using TLSv1, but it keeps failing with: "...state=SSLv3 read finished A: sslv3 alert unexpected message>"
[16:47:20] umdstu: does that mean it's really not using TLS, or does it just use the same error messages
[16:50:52] jeffreylevesque: i was wondering if the 'question' portion is a valid way to concatenate a multiline command
[17:23:32] nofxx: Shouldnt bundler respect --user-install? Looks like its using `gem env` path order.
[17:24:04] nofxx: Strange that system is first on another PC, and home comes first on others... or maybe I got some GEM_ROOT HOME PATH whatever thing...
[18:07:27] ruby[bot]: -b+b *!~firstname.lastname@example.org *!~email@example.com$#ruby-banned
[20:52:10] guardian: hello, given def foo(x, &block) ... end -- what's the proper way to make #foo() call #bar() where bar is defined with def bar(x, &block) ... end
[21:18:40] d3lph1: hi there, i'm using that GEM https://rubygems.org/gems/logstash-input-jdbc/versions/4.2.0
[21:19:02] ruby[bot]: d3lph1: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/64b830f36acbc2200be317e0807e4478
[21:19:03] ruby[bot]: d3lph1: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[21:20:23] d3lph1: however, it returns in after some queries: "--- !ruby/object:BigDecimal '0:0.9397671E7'"
[21:25:21] baweaver: https://ruby-doc.org/stdlib-2.3.0/libdoc/bigdecimal/rdoc/BigDecimal.html#method-i-to_f
[21:45:06] d3lph1: my issue is...ruby is just "converting" that "bignumber" to "compact"...using math "e" expression...
[21:50:12] apeiros: if you do have bigdecimal values in your code, it might be a bad idea to convert it to float, though. floats are not arbitrarily precise. bigdecimal is.
[21:51:41] apeiros: don't confuse representation and value. the value doesn't change just because the representation changed.