cosmicfires

Activity Graph

Page 1 of 1

2019-07-25

[16:43:14] cosmicfires: Remote host closed the connection

2019-07-24

[00:38:17] cosmicfires: has joined #RubyOnRails
[11:59:50] cosmicfires: Ping timeout: 268 seconds

2018-09-07

[05:08:56] cosmicfires: has left #RubyOnRails: ("Leaving")

2018-09-06

[20:59:22] cosmicfires: has joined #RubyOnRails
[21:00:05] cosmicfires: I get this error when I start apache /usr/local/rvm/gems/ruby-2.3.3/gems/passenger-5.3.4 is not secure: it can be modified by user david

2016-06-03

[22:38:28] cosmicfires: Quit: Leaving

2016-06-01

[00:31:59] cosmicfires: has joined #ruby
[00:33:18] cosmicfires: does ruby have a traceroute gem? (/usr/sbin/traceroute, not rails routes)
[00:36:39] cosmicfires: thanks Arcaire
[00:37:08] cosmicfires: thanks havenwood
[00:37:36] cosmicfires: I want to find the router dropping packets when my net connection goes down
[00:38:00] cosmicfires: so I can pester comcast to fix their stuff instead of tell me how great they are
[00:38:27] cosmicfires: I wrote a program to ping ever 4 seconds and keep a record
[00:41:17] cosmicfires: good idea baweaver, I'll try that

2016-05-20

[02:45:29] cosmicfires: has joined #ruby
[02:45:54] cosmicfires: Hi is it better to use a timer or sleep in ruby?
[02:57:26] cosmicfires: I want to ping periodically to check for network outages
[02:58:25] cosmicfires: is there a difference in performance?
[02:59:01] cosmicfires: when would it be good to use the timers gem?
[03:01:01] cosmicfires: thank you ramfjord_
[03:02:43] cosmicfires: I've been working with a system where sleep paraylizes most of it you have to use timers
[05:26:06] cosmicfires: Ping timeout: 276 seconds
[05:39:36] cosmicfires: has joined #ruby
[06:54:04] cosmicfires: Ping timeout: 240 seconds
[07:07:10] cosmicfires: has joined #ruby
[08:05:32] cosmicfires: Ping timeout: 276 seconds
[08:16:52] cosmicfires: has joined #ruby
[08:50:12] cosmicfires: Ping timeout: 276 seconds
[09:03:46] cosmicfires: has joined #ruby
[13:03:57] cosmicfires: Ping timeout: 260 seconds
[13:15:36] cosmicfires: has joined #ruby
[13:40:42] cosmicfires: Ping timeout: 260 seconds
[13:52:08] cosmicfires: has joined #ruby
[14:01:07] cosmicfires: Ping timeout: 260 seconds
[14:12:09] cosmicfires: has joined #ruby
[14:16:52] cosmicfires: Ping timeout: 260 seconds

2016-04-23

2016-04-18

[11:06:31] cosmicfires: Ping timeout: 260 seconds

2016-04-12

[17:39:50] cosmicfires: does ruby use short circuit evaluation of boolean expressions?
[17:48:17] cosmicfires: thanks smathy

2016-04-08

[19:40:40] cosmicfires: has joined #RubyOnRails
[19:41:46] cosmicfires: Hi, If I rolled back a migration and I don't want it anymore can I delete the migration file in /db/migrate?

2015-12-02

[04:33:04] cosmicfires: Ping timeout: 245 seconds

2015-11-30

[00:09:12] cosmicfires: has joined #ruby
[00:33:04] cosmicfires: Ping timeout: 245 seconds
[00:43:12] cosmicfires: has joined #ruby

2015-11-29

[23:38:02] cosmicfires: Ping timeout: 260 seconds

2015-07-31

2015-07-30

[00:36:04] cosmicfires: has joined #RubyOnRails
[00:36:27] cosmicfires: does rails make app that work on smart phones?
[00:39:02] cosmicfires: it's a rush job

2015-06-17

2015-06-13

[01:50:59] cosmicfires: has joined #ruby
[01:51:41] cosmicfires: I'm trying to use tee with a ruby program that writes with puts; it doesn't work. what do I need to do to make it work?
[01:53:45] cosmicfires: that appears to be the problem
[01:57:12] cosmicfires: $stdout.puts doesn't work either, other ideas?
[01:58:39] cosmicfires: I can redirect the output with >
[02:01:32] cosmicfires: ls | tee net.status.log
[02:02:01] cosmicfires: you want the whole program?
[02:06:21] cosmicfires: https://gist.github.com/anonymous/7f6876230f5bbf65eca3#file-tee-problem
[02:06:29] cosmicfires: there's the program that doesn't work
[02:07:50] cosmicfires: I changed it from puts to see if that would make it work
[02:07:57] cosmicfires: $ ./net_status.rb > net.status.log
[02:08:30] cosmicfires: this doesn't work
[02:08:33] cosmicfires: $ ./net_status.rb | tee net.status.log
[02:08:54] cosmicfires: nothing in net.status.long
[02:09:44] cosmicfires: $ ./net_status.rb > net.status.log puts output in net.status.log
[02:10:38] cosmicfires: I get output if I don't redirect
[02:11:28] cosmicfires: can redirection output change the program's execution? not that I'm aware of unless I look to see if it's writing to a file
[02:11:42] cosmicfires: there is nothing in net.status.log when I use tee
[02:13:35] cosmicfires: I wrote a test script and it works as expected so something strange is going on
[02:15:55] cosmicfires: oh I think I figured it out stand by
[02:17:09] cosmicfires: the problem is I stopped the program with ^C before the output buffer got flushed because it has a loop in it
[02:17:42] cosmicfires: https://gist.github.com/cosmicfires/2a88bf9025403e6a0f5d
[02:17:53] cosmicfires: there's the output RickHull
[02:18:37] cosmicfires: RickHull $stdout.sync = true fixes the problem
[02:18:56] cosmicfires: I got beer and the problem got solved :)
[02:19:17] cosmicfires: yes it's all obvious now
[02:19:55] cosmicfires: thanks again for the help

2015-05-18

[19:48:11] cosmicfires: is it possible to make a hash containing hases?

2015-05-13

[19:13:09] cosmicfires: I'm looking for a ruby method to take seconds and return hours, minutes and seconds
[19:14:29] cosmicfires: thanks yxhuvud

2015-05-12

[23:23:00] cosmicfires: how do I cast a string to an integer in rugy?
[23:24:29] cosmicfires: no I was too lazy
[23:25:12] cosmicfires: if I use .to_i I get this error
[23:25:16] cosmicfires: ./time_example_1.rb:56:in `+': can't convert String into an exact number (TypeError)

2015-05-07

[22:53:03] cosmicfires: does ruby come with getopt() or do I have to install a gem?

2015-04-28

2015-04-16

[19:06:52] cosmicfires: are case statements more efficient than if ... else ... end statements?
[19:07:26] cosmicfires: less execution time
[19:09:41] cosmicfires: I was curious
[19:13:25] cosmicfires: I did a quick benchmark if/else vs case/when if/else used 30% less cpu time so not worth worrying about

2015-04-11

[07:46:24] cosmicfires: can I use a debugger with ruby 2.2.0? which one?
[19:29:38] cosmicfires: jhass have you used pry + pry-byebug + pry-stack_explorer with eclipse and dynamic language tool kit?

2015-04-06

[21:24:42] cosmicfires: where are user defined rails classes that are tables in the database defined?
[21:25:13] cosmicfires: thanks bricker

2015-03-26

[04:50:08] cosmicfires: what's the lib/ directory for?
[04:53:58] cosmicfires: krz class.rb files?
[04:54:54] cosmicfires: I created one and put it there and I can't use a method from application_helper.rb
[04:55:15] cosmicfires: I get "undefined method" error
[04:56:19] cosmicfires: I'm trying to use an app helper
[04:58:08] cosmicfires: what about an application controller?
[04:58:41] cosmicfires: no it's in app/controllers
[05:00:02] cosmicfires: I put a method in lib/ I call from a controller in app/controllers I have a method in app/helpers I want to use from both
[05:00:38] cosmicfires: all the code is rather big
[05:01:08] cosmicfires: perhaps what I need to know is where should I put these things? I've searched the web and not found the answer
[05:09:07] cosmicfires: https://gist.github.com/cosmicfires/600b8e9e7db0bc287384
[05:10:55] cosmicfires: because I don't know where to put it
[05:11:08] cosmicfires: is application helper only for views?
[05:11:27] cosmicfires: constants are used in views
[05:11:46] cosmicfires: the database queries are for controllers
[05:13:35] cosmicfires: I don't understand how it should be organized to fit the rails way
[05:19:17] cosmicfires: is there a guide on where I should put things in rails?
[05:21:58] cosmicfires: I'm writing a app to get data from other programs and store it in a database
[05:22:17] cosmicfires: it also returns results to the other program
[05:22:26] cosmicfires: they access it by html

2015-03-20

[00:36:09] cosmicfires: is <rails root>/lib/ the best place to put a class to be called from a controller? I can't get a class there to load.
[00:41:54] cosmicfires: I assume that's the problem how to I get it to load?
[00:42:44] cosmicfires: http://hakunin.com/rails3-load-paths
[00:42:59] cosmicfires: that's the most recent docs I've found so far

2015-03-13

[18:43:31] cosmicfires: can I add a default value to a column with a migration?
[18:44:46] cosmicfires: I can't find the syntax in http://api.rubyonrails.org/classes/ActiveRecord/Migration.html

2015-02-08

[03:17:16] cosmicfires: how can I find where the render method is defined? It's undefined in ApplicationHelper.rb

2015-02-07

[02:20:06] cosmicfires: I've changed a file but rails console is using the previous version, unless I restart rails console, is this expected?
[02:23:02] cosmicfires: cool so I don't have to restart it, thank you
[02:24:00] cosmicfires: what doesn't it work for?

2015-01-22

[07:30:08] cosmicfires: I want to create a rails app that uses the database in a different rails app, can I just copy the models and views?
[07:32:57] cosmicfires: I want one app that maintains the database and another for users to view the data
[07:33:17] cosmicfires: the view app user won't have modify access to the database, for security
[07:34:40] cosmicfires: but I don't need migrations to create tables in the read-only app since they are already created
[07:38:20] cosmicfires: right so I can copy the models from the other app?
[07:38:47] cosmicfires: how can I generate them without generating migrations?

2015-01-09

[01:59:13] cosmicfires: should a join table for a has_many has_one ... through: have an id?
[02:26:38] cosmicfires: will rehash reload the shell's cache?
[02:27:35] cosmicfires: rehash is a bash/sh command to find executables in the path
[02:27:47] cosmicfires: but I've never had to use it, they get found
[02:28:49] cosmicfires: it could be useful
[02:37:18] cosmicfires: the command is hash in bash not rehash
[02:39:04] cosmicfires: hash tells the shell to remember where executables are, I'm looking at the info page because I got curious
[22:57:30] cosmicfires: where should I put global constants in rails 4, the were in <rails root>/config/initializers/global_constants.rb in rails 3

2014-04-02

[04:39:40] cosmicfires: I need to add logic to a rails app called from a controller but the controller can't find my class
[04:39:53] cosmicfires: where should I put my classes?

2014-03-20

[07:47:06] cosmicfires: how do I install rails version 3?

2014-03-12

[21:06:50] cosmicfires: I need to add some code to a rails app that should be in a separate class and file, where should I put it?
[21:08:30] cosmicfires: make a new dir in /lib/?
[21:08:57] cosmicfires: or use /lib/assets/ or /lib/tasks/?
[21:10:19] cosmicfires: tubbo where would you put it?
[21:11:33] cosmicfires: tubbo one file with 2 classes in it, should that be 2 files?
[21:12:55] cosmicfires: do I need to change anything in /config/ to make this work?

2013-11-16

[00:59:28] cosmicfires: is there a place I can put constants so they're available to controllers and views?

2013-11-12

[23:04:10] cosmicfires: what's a good way to look at rails log files, less doesn't show the escapes properly
[23:05:31] cosmicfires: is there a way to look through them as with less?

2012-10-02

[02:26:24] cosmicfires: what's the best way to look at rails logs so I see the color highlighting and not the esc codes?
[02:28:20] cosmicfires: less -R ... works thanks