<Caspy>
bash: /usr/local/bin/ruby: No such file or directory
<Caspy>
copied ruby to that folder.. isn`t working eighter
<adam12>
How did you install Ruby?
<Caspy>
apt-get install ruby-dev
<adam12>
Caspy: And you compiled iroffer before or after this?
<Caspy>
yes, ./Configure -ruby
<Caspy>
it found ruby, said it`s ok..
<adam12>
Caspy: Why did you copy ruby to that folder? where was it originally?
<Caspy>
before..
<Caspy>
it was on /usr/local/ruby
<Caspy>
i tought iroffer was trying to run ruby with : /usr/local/bin/ruby
<Caspy>
but.. i copyed ruby in the folder.. and same error
<Caspy>
but i think .. iroffer trying to run ruby correctly.. coz ruby give`s an error right?
<Caspy>
so isn`t that the problem..
<adam12>
Caspy: Last I looked at iroffer, it links to libruby.a, so path to Ruby binary shouldn't matter. And I think this is a Ruby error
<adam12>
But a stack trace or device name is probably needed to track this down.
<Caspy>
can u teach me how to do that?
<adam12>
You could try running strace on this and paste teh output somewhere. `strace ruby -w httpd.rb` or something.
<Caspy>
ok
<Caspy>
sec
<Caspy>
gonna try
<adam12>
Maybe it will tell us the device.
BSaboia has quit [Quit: This computer has gone to sleep]
<Caspy>
a big error...
<Caspy>
like
<Caspy>
openat(AT_FDCWD, "/usr/local/lib/site_ruby/2.5.0/rubygems/exceptions.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
<Caspy>
openat(AT_FDCWD, "/usr/local/lib/site_ruby/rubygems/exceptions.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
<Caspy>
openat(AT_FDCWD, "/usr/lib/ruby/vendor_ruby/2.5.0/rubygems/exceptions.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
<Caspy>
openat(AT_FDCWD, "/usr/local/lib/x86_64-linux-gnu/site_ruby/rubygems/exceptions.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
<Caspy>
openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/ruby/vendor_ruby/2.5.0/rubygems/exceptions.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
<Caspy>
openat(AT_FDCWD, "/usr/lib/ruby/vendor_ruby/rubygems/exceptions.rb", O_RDONLY|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
<ruby[bot]>
Caspy: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
postmodern has joined #ruby
<Caspy>
ah sorry
<Caspy>
want me to use dpaste adam12 ?
<adam12>
Caspy: No.
<Caspy>
looks like alot of no such file or directory
<Caspy>
ruby isn`t installed well?
_whitelogger_ has joined #ruby
_whitelogger has quit [Ping timeout: 260 seconds]
russt_ has quit [Ping timeout: 260 seconds]
kent\n has quit [Ping timeout: 260 seconds]
maxmanders has quit [Ping timeout: 260 seconds]
kentnl has joined #ruby
<leftylink>
if it is working on one server but not the other, would it not be wise to determine what are the differences between the working one and the non-working one?
d0liver has joined #ruby
sorah has joined #ruby
maxmanders has joined #ruby
russt has joined #ruby
JayDoubleu has joined #ruby
peteretep has joined #ruby
graphicsv has joined #ruby
<Caspy>
brianc@vmi395245:/etc/systemd/.systemd/.data$ cd /usr/local/lib/site_ruby/
<Caspy>
bash: cd: /usr/local/lib/site_ruby/: No such file or directory
<Caspy>
doh
<Caspy>
removed ruby and ruby-dev
<Caspy>
installed back
<Caspy>
but still no folder..
<Caspy>
nu ruby in /usr/local/lib
<adam12>
It's OK. I was trying to figure out why it was looking there; but $LOAD_PATH in Ruby includes it by default it seems (at least on Debian).
<adam12>
Caspy: After you run your command `ruby -w httpd.rb`, what's the value of `echo $?`
<adam12>
Caspy: And how do you know this script doesn't work? What are you basing it on?
<Caspy>
man thanks alot for helping.. but this making me crazy :) and i don`t know much this thing..
<Caspy>
x86_64
<Caspy>
maybe coz is 32bit one ?
powerhouse has quit [Read error: Connection reset by peer]
<adam12>
Caspy: tbh, there's no error there. exit code 0 means it was fine. I think you're looking in the wrong place.
<adam12>
Caspy: I'm not familiar with iroffer tho, and this doesnt' seem like a Ruby problem. Maybe I'm wrong.
<Caspy>
i understand
<Caspy>
so must be iroffer?
<adam12>
Caspy: I'm thinking it is.
<Caspy>
not sure why :) that in other server is working hehe
<Caspy>
kinda crazy
<Caspy>
thx adam12 ! appriciate.. !
<Caspy>
will try to get in touch with iroffer owners
<adam12>
Caspy: Good luck.
<Caspy>
thx alot
TomyWork has quit [Remote host closed the connection]
BSaboia has joined #ruby
powerhouse has joined #ruby
TomyLobo has joined #ruby
mmance has joined #ruby
mmance has left #ruby ["Konversation terminated!"]
<Caspy>
heh adam12, tryed in another debian 10 works
mmance has joined #ruby
<Caspy>
so not sure what is wrong
<mmance>
I have a docker container for diapora, but I don't know how to run the bundle exec rake commands on it
<adam12>
mmance: You need to exec into the container and run them. Run `docker ps`, get the id of the container, then `docker exec -it <container id> bash`. That might get you what you want.
<mmance>
I need to read up on some rails stuff, it is always like a black box to me
<mmance>
I did get the command to run, albeit fail
woodruffw has quit [Ping timeout: 256 seconds]
phage has quit [Ping timeout: 272 seconds]
woodruffw has joined #ruby
woodruffw has joined #ruby
_ule is now known as ule
ule has quit [Changing host]
ule has joined #ruby
robotmay has quit [Ping timeout: 268 seconds]
Illianthe has joined #ruby
woodruffw has quit [Ping timeout: 264 seconds]
robotmay has joined #ruby
ian| has quit [Quit: Exiting]
ian| has joined #ruby
vondruch has joined #ruby
ian| has quit [Remote host closed the connection]
SeepingN has joined #ruby
ian| has joined #ruby
woodruffw has joined #ruby
woodruffw has joined #ruby
<leah2>
is deleting the current index safe within Array#each?
<leah2>
nvm
BSaboia has quit [Ping timeout: 260 seconds]
BSaboia has joined #ruby
storm__ has joined #ruby
storm__ has quit [Remote host closed the connection]
storm_ has quit [Ping timeout: 272 seconds]
coniptor has quit [Ping timeout: 246 seconds]
coniptor has joined #ruby
foxxx0 has quit [Quit: foxxx0]
foxxx0 has joined #ruby
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SeepingN has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 272 seconds]
schne1der has quit [Quit: schne1der]
postmodern has quit [Quit: Leaving]
SeepingN has quit [Read error: Connection reset by peer]
dhollinger has quit [Quit: WeeChat 2.3]
SeepingN has joined #ruby
mattrose has quit [Read error: Connection reset by peer]
<leftylink>
"and this is not deserving of wat; this is actually a result of how awesome Ruby is. But if you ever *actually* do this, *then* wat."
cd has joined #ruby
naftilos76 has joined #ruby
<naftilos76>
I have just installed version 3.0.0 with rvm and i am getting an error complaining about a custom class' initialize method params. I have **params as parameters in the initialize method of that class (which works fine in ruby 2.5.0) but now suddenly i get this error: `initialize': wrong number of arguments (given 1, expected 0) (ArgumentError)
<naftilos76>
has anything changed in 3.0.0 or any version after 2.5.0?
<naftilos76>
i mean as far as init methods in a ruby class are implemented
<adam12>
naftilos76: Yes. Ruby 2.7 started warning on keyword args and Ruby 3 removed the warning.
schaerli_ has quit [Read error: Connection reset by peer]
<naftilos76>
hi adam12, you are refering to a warning, however what i get stops the execution
<naftilos76>
ok thanks
coniptor has quit [Ping timeout: 256 seconds]
schaerli_ has joined #ruby
lxsameer has quit [Quit: WeeChat 2.9]
<naftilos76>
adam12: i am not sure i understand the -w
<naftilos76>
i run my script like this:
<naftilos76>
ruby myscript.rb run
<adam12>
naftilos76: It enables warnings. Ruby 2.7.1 had warnings enabled by default but a lot of people thought they were noisey. 2.7.2 still warns but hid the warnings. So if you install 2.7.2, use `ruby -w`.
<naftilos76>
because i am using daemons gem so i u se run to tun it in the terminal
schaerli_ has quit [Ping timeout: 260 seconds]
<naftilos76>
ok thanks - never used it before - i run => ruby -w ....
<naftilos76>
i get the warnings and the script runs fine
coniptor has joined #ruby
teardown_ has quit [Ping timeout: 240 seconds]
roshanavand has joined #ruby
BSaboia has quit [Quit: This computer has gone to sleep]
Seich has quit [Quit: Gone fishing.]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Seich has joined #ruby
roshanavand1 has joined #ruby
roshanavand has quit [Ping timeout: 264 seconds]
roshanavand1 is now known as roshanavand
vondruch has quit [Read error: Connection reset by peer]
sol1d_ is now known as sol1d
howdoi has joined #ruby
<naftilos76>
ruby 2.7.2 gives me this error => warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call . This warning is related to the params of a custom class params where i have used ** to indicate a hash formatted set of params or empty hash if not params are passed. I am not sure i understand the warning. Can anyone help?
<naftilos76>
What exactly is deprecated?
<adam12>
naftilos76: It depends. Ruby 2 through 2.7 can treat a Hash as keyword arguments, depending on the call syntax. They weren't proper keyword arguments.
<adam12>
naftilos76: So this requires that either you adjust the caller or callee, but it depends on the error. It's not immediately obvious.
<adam12>
naftilos76: My suggestion is install the warning gem and configure it to show a backtrace for all those errors. It will help narrow down what/why.
<naftilos76>
adam12: on the caller i pass a hash as Myclass.new({one: 1, two: 2, ...}) Is there anything specific i should do here?
<adam12>
Something like `Warning.process(//, keyword_separation: :backtrace)`
<adam12>
naftilos76: What does initialize() in Myclass look like?
<adam12>
(the method signature not the body)
<naftilos76>
adam12: It is like this: def initialize(**params); bla bla bla end
<adam12>
naftilos76: Myclass.new(one: 1, two: 2)
<adam12>
(pass kwargs and not a Hash)
<naftilos76>
should i be ommitting the { } ?
<adam12>
In this scenario, yes. Your method asks for kwargs only, but you're giving it new(Hash).
<adam12>
Ruby 2.7 converts it for you, but that's where the problem lies.
<naftilos76>
ok thanks let me try that - is that described in the ruby 3.0.0 hash class?
<naftilos76>
i will have a look
mmance has left #ruby ["Konversation terminated!"]
Mia has quit [Read error: Connection reset by peer]
maryo87 has joined #ruby
<naftilos76>
adam12: thanks the {} were the culprit
<adam12>
naftilos76: Great!
maryo_87 has quit [Ping timeout: 272 seconds]
si18_ has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
Core6396 has joined #ruby
si18_ has quit [Ping timeout: 246 seconds]
woodruffw has quit [Ping timeout: 256 seconds]
woodruffw has joined #ruby
woodruffw has joined #ruby
woodruffw has quit [Changing host]
lexg has joined #ruby
cornfeedhobo has left #ruby ["when i leave, come together like butt cheeks"]
coniptor has quit [Ping timeout: 246 seconds]
elcuervo has joined #ruby
cuerbot has quit [Ping timeout: 246 seconds]
coniptor has joined #ruby
<leah2>
anyone familiar with writing fiber based code? i have to fibers that want to do the same thing, so i kinda need a lock and the other fiber has to yield back as long as the lock is held. is there anything made for this (i mean, i can realized it with a few instance variables easily, but maybe i'm missing something)
<naftilos76>
I am trying to use mysql2 in my ruby script but i get an error : Specified 'mysql2' for database adapter, but the gem is not loaded. Add `gem 'mysql2'` to your Gemfile... I do not have a Gemfile since i am not using rails in this case. I have already specified mysql2 when using .establish_connection method. Can anyone suggest any solution?
<havenwood>
leah2: It implements its own Fiber-based Mutex/Barrier etc.
<havenwood>
leah2: I'm not sure for your case, but ioquatix has used Async for a ton of gems. In another era it'd been added to stdlib in 3.0.
<havenwood>
naftilos76: Typically a Rails app has a Gemfile.
<havenwood>
naftilos76: Ah, NOT using Rails.
<naftilos76>
yep
<havenwood>
naftilos76: Have you done a?: gem install mysql2
<havenwood>
naftilos76: Maybe create a Gemfile?
<naftilos76>
yes it is already installed
si18_ has joined #ruby
<havenwood>
naftilos76: How are you running the app?
<naftilos76>
ruby myscript.rb run because i am using daemons
<havenwood>
naftilos76: Does it work to just put `gem 'mysql2'` at the top of myscript.rb?
<naftilos76>
let me try that
<naftilos76>
i thought that was irrelevant
<havenwood>
naftilos76: Normally you require a gem and leave it at that, indeed.
<havenwood>
naftilos76: Occasionally, for various reasons, you also can use a gem directive. Usually it's not needed.
<havenwood>
naftilos76: I was just curious if that fixed the issue to go from there.
<naftilos76>
i did that
<naftilos76>
using a gem 'mysql2' in the script
<naftilos76>
right after all requires
<naftilos76>
let me do that again
<leah2>
havenwood: quite simple code tho. that will be a good inspiration, thanks
<naftilos76>
no, it does not want to work
Core6396 has quit [Ping timeout: 260 seconds]
<havenwood>
naftilos76: Same error?
<naftilos76>
maybe it has got to do with the activerecord version? I am trying ruby 2.5.0 and installed activerecord 4.2.4 ?
<naftilos76>
yes same error
<naftilos76>
i was using mysql gem in ruby 2.2.0 and then i tried installing mysql gem in ruby 2.5.0 but it would not install no matter what that is why i tried to used mysql2 with activerecord
<naftilos76>
if i could install mysql gem in ruby 2.5.0 it would probably work
<havenwood>
naftilos76: Ah, yeah - gotta install on the Ruby where you need the gem.
cliluw has quit [Ping timeout: 246 seconds]
<naftilos76>
Not sure i understand you
<naftilos76>
What do you mean?
fercell has quit [Quit: WeeChat 2.9]
<havenwood>
naftilos76: I think I misunderstood what you were saying. Multitasking here and missed the mysql/mysql2 distinction.