baash05

Activity Graph

Page 1 of 11 | Next »

2018-06-29

[07:39:24] baash05: has joined #RubyOnRails
[08:08:09] baash05: Remote host closed the connection

2018-06-25

[01:17:19] baash05: has joined #RubyOnRails
[01:17:45] baash05: Hey all.. Anyone ever interact with netsuite via restlets?
[02:10:12] baash05: Nothing? Ah crap. I was hoping someone managed.
[08:11:28] baash05: Ping timeout: 256 seconds

2018-05-31

[14:15:36] baash05: has joined #RubyOnRails
[14:17:25] baash05: I'm Sydney based, but I was wondering is there was a good place to find remote jobs
[14:26:29] baash05: Humm doesn't seem like a great place.
[14:28:14] baash05: Remote host closed the connection

2017-09-04

[01:38:16] baash05: Good morning all :)
[02:55:24] baash05: Ping timeout: 260 seconds

2017-09-01

[00:34:30] baash05: Hey all.. I'm trying to override circle ci to run specs that live in a different folder.. anyone know how to do that?
[02:25:34] baash05: Is there a way to tell rspec to read from many different folders... I have an engine folder and it has a pile of "sub" rails apps with their own tests.. I want them to all run when I run rspec from the CLI
[05:00:33] baash05: we be all dead inside :)

2017-08-31

[23:42:31] baash05: has joined #RubyOnRails
[23:42:38] baash05: Good morning all.

2017-05-11

[00:22:10] baash05: has joined #RubyOnRails
[00:30:27] baash05: Hey people... I've an rspec question
[00:31:42] baash05: I'm trying to handle this expect_any_instance_of(MyUser).to receive(:user_event).with('posted_comment')
[00:32:13] baash05: But MyUser receives a user_event with something before my test.
[00:33:13] baash05: Is there anyway to ignore messages with other data.
[00:38:45] baash05: Noone.. :(
[03:58:02] baash05: Quit: Page closed

2017-05-02

[04:26:10] baash05: Quit: Page closed

2017-05-01

[07:06:53] baash05: has joined #RubyOnRails
[07:07:26] baash05: I'm trying to define views inside an engine, and = block_head is failing..
[07:07:37] baash05: Anyone know what I should be including?

2017-04-20

[04:04:22] baash05: Quit: Page closed

2017-04-19

[05:14:56] baash05: has joined #RubyOnRails
[05:16:39] baash05: Hey all.. I'm trying to write a gem, and test how it interacts with an active record. I was wondering how others test sql generation without having a database stipulated in the rspec.
[05:17:07] baash05: Would I have to add a database.yml type thing to the gem?

2016-07-30

[07:48:37] baash05: has joined #RubyOnRails
[13:04:06] baash05: Hey.. I'm running passenger and I'm getting this error in my log
[13:04:08] baash05: bind() to 0.0.0.0:80 failed (13: Permission denied)
[13:04:18] baash05: Anyone know how I can fix that?
[13:06:44] baash05: Sorry How do I do that?
[13:07:46] baash05: redirect to
[13:07:58] baash05: If that's okay.
[13:08:34] baash05: Why not just render the artical in that controller
[13:18:03] baash05: Papierkorb: nothing in that talked about running as root.
[13:19:55] baash05: very new to ops work.
[13:20:06] baash05: never used nginx.
[13:24:53] baash05: The app I'm working with is really really old.
[13:25:28] baash05: it's kludged together in some very strange ways..
[13:26:19] baash05: I'm having a hard time understanding what's broken, because it feels like everything is.
[13:31:00] baash05: its not stand along..
[13:31:26] baash05: it seems touching a file restarts passenger.
[13:31:44] baash05: Which is really strange to me
[13:32:17] baash05: touch tmp/restart.txt #this restarts passenger.
[13:32:24] baash05: Not sure how that would work.
[13:35:20] baash05: cool.. but wouldn't that start passenger in sudo.
[13:37:11] baash05: but then I get this [emerg] 778#0: bind() to 0.0.0.0:80 failed (13: Permission denied)
[13:37:56] baash05: I am BTW keeping notes, and reading the inotify thing right now.
[13:39:08] baash05: touch tmp/restart.txt
[13:40:04] baash05: Nope.. it's just making passenger write to a log.
[13:40:22] baash05: and the log entry is the pasted code.
[13:41:57] baash05: Papierkorb: if passenger is not running (for some reason) then the log wouldn't be updated.. and I just realized it's not been updated for a while..
[13:42:04] baash05: The error is old.
[13:43:58] baash05: What I did is perhaps better. I updated the version of ruby from 1.9.3 to 2.1.1, then I updated the rails applicaiton.
[13:44:22] baash05: then I touched the file.. and then the server went down.
[13:45:35] baash05: I used this https://gist.github.com/baash05/470c5df71cd9e9277532e3c04afab2d6 to update ruby
[13:46:10] baash05: I ran gem install bundler to update the bundler.
[13:46:40] baash05: I then ran bundle update to update the gems.
[13:47:24] baash05: The only error I'm getting (or rather got) was the one in the log file.
[13:52:21] baash05: But the site is dead..
[13:53:34] baash05: Sure.. he stopped working for this guy 4 years ago.
[13:54:27] baash05: I may just roll things back to where I started.
[13:54:47] baash05: Back to the git commit and back to the ruby version.
[20:53:03] baash05: Ping timeout: 240 seconds

2016-07-28

[05:33:29] baash05: has joined #RubyOnRails
[05:34:04] baash05: Is there an easy way (without any extra gems) to get system variables?
[05:38:25] baash05: I'm trying to find a way to turn my api to maintenance mode. I can ssh into the box where it's running.
[05:38:31] baash05: Is there an easy way?
[06:01:52] baash05: I tried that..
[06:02:14] baash05: for some reason when I edited the var's they didn't reload.
[06:02:20] baash05: it was null.
[06:02:50] baash05: if File.exist?("maintenance")
[06:02:50] baash05: def test_maintence_mode
[06:02:50] baash05: before_action :test_maintence_mode
[06:02:51] baash05: render json: { error: "Sorry we are in maintenance mode"}, status: 422
[08:15:50] baash05: Ping timeout: 244 seconds

2016-07-26

[08:13:31] baash05: Ping timeout: 240 seconds
[10:12:50] baash05: has joined #RubyOnRails
[13:17:28] baash05: Remote host closed the connection
[13:24:52] baash05: has joined #RubyOnRails
[14:42:27] baash05: Remote host closed the connection

2016-07-25

[06:15:27] baash05: has joined #RubyOnRails
[08:21:39] baash05: Ping timeout: 265 seconds
[08:25:31] baash05: has joined #RubyOnRails
[08:32:24] baash05: Ping timeout: 276 seconds
[23:27:40] baash05: has joined #RubyOnRails

2016-07-22

[00:15:10] baash05: has joined #RubyOnRails
[01:33:38] baash05: Ping timeout: 272 seconds
[01:38:10] baash05: has joined #RubyOnRails
[03:52:09] baash05: Ping timeout: 244 seconds
[03:57:10] baash05: has joined #RubyOnRails
[08:21:04] baash05: Ping timeout: 240 seconds
[10:13:13] baash05: has joined #RubyOnRails
[14:20:09] baash05: Remote host closed the connection

2016-07-21

[03:46:43] baash05: has joined #RubyOnRails
[03:46:55] baash05: Hey guys/girls.
[03:48:48] baash05: Conversational style question. I've got a test suite that's taking over 40 minutes to run.. I was wondering what some strategies you've all used to mitigate these.
[03:49:44] baash05: Oh snap. :)
[03:50:20] baash05: over that..
[03:51:30] baash05: If I start it when I get on the bus, it won't finish before I get off the bus.
[03:53:23] baash05: We write TDD so I don't think there's overlap.
[03:56:30] baash05: I was thinking of breaking the app into engines or gems..
[03:56:35] baash05: But it seems extream.
[03:56:55] baash05: He's just getting started.
[08:03:52] baash05: Remote host closed the connection

2016-07-20

[02:30:24] baash05: has joined #RubyOnRails
[06:44:32] baash05: Remote host closed the connection
[07:16:06] baash05: has joined #RubyOnRails
[07:16:42] baash05: Anyone ever have their tests start timing out after they added something that should not time them out?
[07:17:00] baash05: I've got a test suite that is now timing out.
[07:17:37] baash05: That's just it.. I didn't add anything to the app that should time out.
[07:17:46] baash05: and if the one test file is run on it's own it runs well.
[07:18:18] baash05: I can't reproduce without running hundreds of tests first.
[07:18:33] baash05: and it doesn't break in the same spot each time.
[07:18:41] baash05: different files..
[07:19:40] baash05: I wasn't really asking for specific answers..
[07:19:46] baash05: more if it's happened to anyone.
[07:20:02] baash05: Well any one here.
[07:20:28] baash05: I suppose if you know of it happening to anyone ever that could help.
[07:20:36] baash05: cheeky lot us.
[07:21:01] baash05: Has it happened to anyone ever (other than me).. ?
[07:21:38] baash05: I'll take a closer look at the changes.. It just doesn't make any sense.. they are really small.
[07:26:43] baash05: You could union.
[07:27:52] baash05: something like this
[07:28:00] baash05: comments = Comment.select('author_id, body, created_at')
[07:28:00] baash05: topics = Topic.select('user_id AS author_id, description AS body, created_at')
[07:28:01] baash05: Comment.from("(#{comments.to_sql} UNION #{topics.to_sql}) AS comments")
[07:30:15] baash05: I don't understand what you mean.
[07:34:34] baash05: Ping timeout: 240 seconds
[07:39:08] baash05: has joined #RubyOnRails
[08:09:31] baash05: Ping timeout: 258 seconds

2016-07-18

[01:38:32] baash05: amperry.. Our front end guy did most of the work..
[01:39:06] baash05: Sorry amperry: .. I'm not always watching.
[01:39:52] baash05: What I understand it's just some old school HTML tables.
[04:04:24] baash05: Ping timeout: 276 seconds
[04:08:43] baash05: has joined #RubyOnRails
[04:21:01] baash05: Ping timeout: 252 seconds
[04:25:47] baash05: has joined #RubyOnRails
[07:52:33] baash05: Remote host closed the connection

2016-07-17

[23:15:43] baash05: has joined #RubyOnRails
[23:16:08] baash05: Good morning all :)
[23:18:04] baash05: I'm trying to figure out a funny rspec error.. No route matches... PITA I tell ya
[23:30:06] baash05: fryguy: I think that was enough..
[23:30:36] baash05: The route (while clearly in my routes.rb) is not in the routes.txt I produced.
[23:30:40] baash05: Interesting.
[23:41:39] baash05: No route matches {:action=>"accept_cancel", :controller=>"api/v2/tasks", :id=>"1"}
[23:41:40] baash05: accept_cancel_api_v2_task PUT /api/v2/tasks/:id/accept_cancel(.:format) api/v2/tasks/cancellations_controller#accept_cancel
[23:42:45] baash05: does that seem wrong?
[23:47:45] baash05: https://gist.github.com/baash05/f7fb8a048ef634b06f62f6b56f35714e
[23:48:46] baash05: fryguy: There's my gist.
[23:49:57] baash05: The problem is I want to still pass old tests, but I need to move cancellation to it's own controller.. (they've expanded functionality)
[23:50:30] baash05: I suppose I can't do that in controller test can I :(
[23:50:54] baash05: I'll have to move them to feature tests.
[23:52:09] baash05: I don't like moving large amounts of tests when I'm changing supporting code.

2016-07-16

[06:55:53] baash05: I'm new to it..
[06:55:56] baash05: and I've got this
[06:55:58] baash05: <Mysql2::Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)>
[06:56:10] baash05: when I run rake db:create
[06:56:24] baash05: Does anyone know how to get around it?
[06:56:45] baash05: http://www.cyberciti.biz/faq/howto-install-mysql-on-ubuntu-linux-16-04/
[06:56:51] baash05: I followed those instructions.
[06:57:08] baash05: and it all seemed good.
[06:57:43] baash05: [sudo] password for dave:
[06:57:43] baash05: sudo systemctl start mysql.service
[06:58:07] baash05: Nothing negative shows up.
[06:58:54] baash05: Humm.. and now it seem to be working..
[06:59:28] baash05: mysql 960 0.0 10.5 1915424 847984 ? Ssl 13:51 0:06 /usr/sbin/mysqld
[06:59:51] baash05: cool.. Woot..
[07:00:02] baash05: Thanks baweaver
[07:00:18] baash05: How do you pronounce your nic?
[07:00:54] baash05: Ah.. cool.
[07:18:26] baash05: And I thought I was through
[07:18:29] baash05: Mysql2::Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
[07:18:29] baash05: rake aborted!
[07:18:46] baash05: but the grep still returns the thing I had above.
[07:24:46] baash05: I've run this ps aux | grep mysql | grep -v grep
[07:24:54] baash05: is that what you mean.
[07:25:09] baash05: it returns a line.
[07:25:35] baash05: mysql 960 0.0 10.5 1915424 847984 ? Ssl 13:51 0:06 /usr/sbin/mysqld
[07:25:56] baash05: does that mean I'm running?
[07:26:05] baash05: or rather it's running?
[07:26:52] baash05: excellent.
[07:28:21] baash05: Mind if I paste here?
[07:28:29] baash05: Just the dev section?
[07:30:04] baash05: https://gist.github.com/baash05/4e26289578e28a2b5046e80a0b59f1f1
[07:31:07] baash05: I just removed the socket bit..
[07:31:12] baash05: of the yml.
[07:31:26] baash05: and the migration worked..
[07:32:02] baash05: cool.. it's for a client and I got this 4 year old rails app.
[07:33:18] baash05: | performance_schema_max_socket_classes | 10
[07:33:18] baash05: sudo mysqladmin variables | grep socket
[07:33:57] baash05: socket | /var/run/mysqld/mysqld.sock
[07:34:05] baash05: I think that's the line I care about.
[07:34:57] baash05: Perfect.. I shall take your advice.
[07:35:28] baash05: The migration still fails.. but after running a pile..
[07:35:40] baash05: they were on rails 2..
[07:36:09] baash05: Sadly I didn't count getting things running in my estimates.
[07:45:49] baash05: I don't think it's going to be all that hard.. the app is very very simple.
[08:17:43] baash05: Ping timeout: 252 seconds
[08:52:34] baash05: has joined #RubyOnRails
[09:31:14] baash05: Ping timeout: 272 seconds
[09:51:01] baash05: has joined #RubyOnRails
[13:18:58] baash05: You know how some applications in the past had attr_accessible
[13:19:18] baash05: And how some applications just left everything wide open
[13:19:50] baash05: and how now strong params are "the thing"
[13:20:17] baash05: Is there a way to make all attributes accessible without going into each model?
[13:20:33] baash05: and without adding strong params.
[13:20:53] baash05: Before you fry me (and I should be I suppose)
[13:21:06] baash05: I've been asked to make some small changes to an existing application.
[13:21:38] baash05: An application that has zero tests.
[13:27:04] baash05: Or well all attributes are protected now.
[13:27:37] baash05: Sorry.. the app was on rails 2, and all attributes were public.
[13:28:10] baash05: not an attr_accessible in the code.
[13:28:28] baash05: I tested it on the live site.. you can litterally write to any field..
[13:29:20] baash05: khelair: where is that value defined?
[13:29:26] baash05: where is it set?
[13:30:21] baash05: No.. when I upgraded to 4.
[13:30:46] baash05: it all stopped working because now none of the fields are accessible.
[13:31:17] baash05: Ah.. I see now..
[13:31:56] baash05: I added the gem protected_attributes because the devise gem demands it.
[13:32:31] baash05: Crap.. they monkey patched it.
[13:33:00] baash05: Yeah.. ha ha.
[13:34:02] baash05: I am very cautious in this codebase. There was not even a test/spec folder.
[13:35:35] baash05: thanks.. I think I see what I've got to do.
[13:35:42] baash05: Sometimes just talking it out.
[13:35:58] baash05: Remote host closed the connection