kliq has quit [Read error: Connection reset by peer]
emilford has quit [Ping timeout: 268 seconds]
karapetyan has quit [Remote host closed the connection]
spencer has quit [Read error: Connection reset by peer]
spencer has joined #ruby
ur5us has joined #ruby
sameerynho has quit [Ping timeout: 255 seconds]
white_lilies has joined #ruby
ur5us has quit [Ping timeout: 245 seconds]
ramfjord has quit [Ping timeout: 248 seconds]
AJA4350 has quit [Quit: AJA4350]
white_lilies has quit [Ping timeout: 245 seconds]
omth has quit [Ping timeout: 245 seconds]
<yaiyaichu>
Hi all. I hope you guys don't mind if I bother you with a question :) . I'm trying to run my ruby program (a web scraper) as a cronjob with the whenever gem. My cron job command cds into the directory with the Gemfile and runs the script with bundle exec. When the scheduled job runs, bundler says it cannot find the gem ffi in any of the sources. Any thoughts on why that happens? - The cronjob is run with
<yaiyaichu>
my user. Also, I use rbenv.
<yaiyaichu>
Please let me know if you need any additional info, and I'll gladly provide it.
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
omth has joined #ruby
yaiyaichu has quit [Read error: Connection reset by peer]
yaiyaichu has joined #ruby
omth_ has joined #ruby
omth has quit [Ping timeout: 256 seconds]
<Zarthus>
yaiyaichu: Is it reproducable without cron?
<Zarthus>
cron intentionally has basically no environment, maybe you'd need set some environment variables yourself so that it's really in sync with your user.
edymonchi77 has quit [Quit: Now if you will excuse me, I have a giant ball of oil to throw out my window]
ur5us has quit [Ping timeout: 260 seconds]
apeiros has quit [Ping timeout: 260 seconds]
t0xik has joined #ruby
beefjoe has quit [Remote host closed the connection]
Jiao has joined #ruby
<Jiao>
Still learning here.......
<Jiao>
I'm stuck....
<Jiao>
.....so I'm suppose to create an instance of the following Person class, set its name attribute to any value you like, and use its instance variable to complete the greeting method.
<Jiao>
class Person
<Jiao>
attr_accessor :name
<Jiao>
def greeting
<Jiao>
# @name
<Jiao>
puts "hi, my name is #{??}"
<Jiao>
end
<Jiao>
end
<Jiao>
some_person = ??
<Jiao>
some_person.name = ??
<Jiao>
some_person.??
<Jiao>
....what am I suppose to do here...
<Jiao>
I'm guessing the first ?? is @name
<Jiao>
....but what about the some_person ??? Is that some_person = Person
<Jiao>
?
<Jiao>
.......and what's the some_person.name and some.person.??
cjohnson has joined #ruby
tdy1 has quit [Ping timeout: 240 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shinnya has joined #ruby
yaiyaichu has quit [Quit: leaving]
cadillac_ has quit [Quit: I quit]
cadillac_ has joined #ruby
<Jiao>
help?
<elomatreb>
attr_accessor implicitly defines methods for you, namely the getter `name` (some_person.name), and the setter `name=` (some_person.name = ...)
<Jiao>
Can I put something like some_person.name = "My_Name"
braincrash has quit [Quit: bye bye]
<elomatreb>
Yes. This will set the @name instance variable for you
<Jiao>
For 'some_person'....I made that equate to 'Person'
<Jiao>
.............I'm not really sure but my code isn't running
sytherax has joined #ruby
<Jiao>
...the last line...... some_person.??
<Jiao>
should that be... some_person.Person
<Jiao>
???
orbyt_ has joined #ruby
<Jiao>
???
braincrash has joined #ruby
sytherax has quit [Remote host closed the connection]
sytherax has joined #ruby
<elomatreb>
Oh, yeah. You
<elomatreb>
*You're never actually creating an instance in your code
<elomatreb>
`some_person = Person.new` will probably get you what you need
sytherax has quit [Remote host closed the connection]
karapetyan has joined #ruby
tdy1 has joined #ruby
sytherax has joined #ruby
RougeR has quit [Ping timeout: 245 seconds]
fraktor has joined #ruby
pskosinski has quit [Ping timeout: 265 seconds]
<fraktor>
I just set up a module using 'bundle install', but it gives me the error 'permission denied @ rb_sysopen' with a file that was installed earlier by rubygems. It looks like the permissions are out of whack. How can I fix this and make sure that it doesn't happen again?
karapetyan has quit [Ping timeout: 276 seconds]
<elomatreb>
Did you use sudo? That's generally the way to mess up permissions
jamesaxl has quit [Quit: WeeChat 2.1]
<fraktor>
I don't think so. If I did, how can I un-mess it up?
cyberg has quit [Remote host closed the connection]
<elomatreb>
It really depends on where your files ended up, if it's in a system directory such as /usr I'd probably delete them and reinstall with the proper arguments, if it's in your home directory something else has gone wrong
<elomatreb>
You can tell gem to install files for your current user only, with the --user-install argument
<fraktor>
That would be the issue. Thanks!
<elomatreb>
Alternatively the method concerning bundler that is most guaranteed to work is to vendor the gems into your local project (like e.g. npm does it), with the `--path=vendor` argument
pskosinski has joined #ruby
gix has joined #ruby
gix- has quit [Ping timeout: 256 seconds]
<Jiao>
Why is it some_person = Person.new ????
chamar has joined #ruby
fraktor has quit [Quit: WeeChat 2.0.1]
<elomatreb>
Person is a class, .new creates an instance of a class. Read up on the class-instance relationship, this is something basic you will need to understand to understand most other things
podlech has joined #ruby
sytherax has quit [Remote host closed the connection]
sytherax has joined #ruby
<Jiao>
Thanks :)
<Jiao>
that helps out alot
<Jiao>
I'm guessing I can find the class-instance relationship thing in the ruby guide?
<elomatreb>
It's not really specific to Ruby (although there are Ruby specifics), it's a core principle of the programming dogma that Ruby and many other languages subscribe to, Object-Oriented Programming
podlech has quit [Quit: WeeChat 2.1]
<Jiao>
I see..
apparition has joined #ruby
<Jiao>
any good resource for that?
akaiiro has quit [Ping timeout: 256 seconds]
<elomatreb>
There are some books linked in the topic, I think some of the ones in the first section go over this
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
headius has quit [Ping timeout: 268 seconds]
sytherax has quit [Remote host closed the connection]
sytherax has joined #ruby
akaiiro has joined #ruby
Danielss89 has quit [Quit: Bye]
sytherax has quit [Remote host closed the connection]
<ruby[bot]>
baweaver: # => "2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 ...check link for more (https://eval.in/1018248)
<baweaver>
hehehe
<elomatreb>
a VERY Major release
<elomatreb>
:)
<baweaver>
I wonder how that actually works
<baweaver>
asm>> [1, *([9]*100)].join('.').succ
<ruby[bot]>
baweaver: I have disassembled your code, the result is at https://eval.in/1018249
<baweaver>
Eh, I'll poke it later.
<elomatreb>
The examples in the docs are pretty wild too
sytherax has quit [Remote host closed the connection]
ta_ has joined #ruby
armyriad has joined #ruby
sytherax has joined #ruby
drigger has joined #ruby
blackmesa has joined #ruby
<drigger>
Apologies for being a bit OT but does anyone know how I could see the options that a Ruby installed via Rbenv was built with?
za1b1tsu has quit [Ping timeout: 255 seconds]
sytherax has quit [Remote host closed the connection]
sytherax has joined #ruby
<apeiros>
drigger: seems perfectly on-topic ;-) sadly I have no idea.
blackmesa has quit [Client Quit]
<drigger>
Well, that' something,
sytherax has quit [Remote host closed the connection]
darkhanb has joined #ruby
sytherax has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
mikecmpbll has quit [Quit: inabit. zz.]
ur5us has quit [Remote host closed the connection]
ta_ has quit [Quit: Leaving...]
sytherax has quit [Remote host closed the connection]
sytherax has joined #ruby
biberu has joined #ruby
TCZ has joined #ruby
TCZ has quit [Quit: Leaving]
conta has joined #ruby
psychicist__ has joined #ruby
__chamar__ has joined #ruby
chamar has quit [Ping timeout: 248 seconds]
sytherax has quit [Remote host closed the connection]
drigger has quit [Quit: Page closed]
sytherax has joined #ruby
sytherax has quit [Remote host closed the connection]
sytherax has joined #ruby
sytherax has quit [Remote host closed the connection]
<Radar>
drigg... and gone
AJA4350 has joined #ruby
sytherax has joined #ruby
sytherax has quit [Remote host closed the connection]
sepp2k has joined #ruby
sytherax has joined #ruby
sytherax has quit [Remote host closed the connection]
Shkiperman has joined #ruby
sytherax has joined #ruby
sytherax has quit [Remote host closed the connection]
mtkd has quit [Ping timeout: 260 seconds]
postmodern has quit [Quit: Leaving]
sytherax has joined #ruby
quobo has joined #ruby
conta has quit [Quit: conta]
pabs has quit [Ping timeout: 264 seconds]
pabs has joined #ruby
sytherax has quit [Remote host closed the connection]
desperek has joined #ruby
sytherax has joined #ruby
Zaab1t has joined #ruby
mtkd has joined #ruby
tty has quit [Quit: tty]
sameerynho has quit [Ping timeout: 245 seconds]
samosaphile has joined #ruby
sytherax has quit [Remote host closed the connection]
redlegion has quit [Remote host closed the connection]
redlegion has joined #ruby
cyberg has joined #ruby
shinnya has quit [Ping timeout: 245 seconds]
ciscam has quit [Ping timeout: 240 seconds]
mostlybadfly has joined #ruby
ciscam has joined #ruby
amatas has joined #ruby
sytherax has joined #ruby
sytherax has quit [Remote host closed the connection]
amatas has quit [Ping timeout: 264 seconds]
snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
karapetyan has joined #ruby
ramfjord has joined #ruby
karapetyan has quit [Ping timeout: 260 seconds]
ramfjord has quit [Ping timeout: 264 seconds]
arand has quit [Ping timeout: 264 seconds]
_whitelogger has joined #ruby
sytherax has joined #ruby
herbmillerjr has joined #ruby
arand has joined #ruby
sytherax has quit [Remote host closed the connection]
sytherax has joined #ruby
sytherax has quit [Remote host closed the connection]
Mia has quit [Read error: Connection reset by peer]
sytherax has joined #ruby
karapetyan has joined #ruby
sytherax has quit [Remote host closed the connection]
jamesaxl has joined #ruby
amatas has joined #ruby
ramfjord has joined #ruby
sytherax has joined #ruby
ramfjord has quit [Ping timeout: 264 seconds]
mtkd has quit []
conta has joined #ruby
amatas has quit [Quit: amatas]
conta has quit [Client Quit]
conta has joined #ruby
sytherax has quit [Remote host closed the connection]
BTRE has quit [Read error: Connection reset by peer]
ciscam has quit [Ping timeout: 264 seconds]
ciscam has joined #ruby
sytherax has joined #ruby
emilford has joined #ruby
RougeR has quit [Ping timeout: 245 seconds]
quobo has quit [Quit: Connection closed for inactivity]
schneider has joined #ruby
amar has quit [Remote host closed the connection]
amar has joined #ruby
conta has quit [Quit: conta]
sytherax has quit [Remote host closed the connection]
__chamar__ has quit [Ping timeout: 268 seconds]
sytherax has joined #ruby
_chamar_ has joined #ruby
amar has quit [Ping timeout: 256 seconds]
zapata_ has joined #ruby
zapata has quit [Ping timeout: 256 seconds]
snickers has joined #ruby
plexigras has joined #ruby
Shkiperman has quit [Quit: Page closed]
mtkd has joined #ruby
jxweng has joined #ruby
sytherax has quit [Remote host closed the connection]
sytherax has joined #ruby
aceruser has joined #ruby
jxweng has quit [Client Quit]
DLSteve has joined #ruby
mroutis has joined #ruby
<mroutis>
hi, rubyist, I'm trying to solve a codechef problem with ruby, it works but hits the time limit, anyone willing to help improving the performance of the code?