Activity Graph

Page 1 of 15 | Next »


[01:23:32] cnk: Quit: cnk


[20:06:18] cnk: has joined #RubyOnRails


[00:56:48] cnk: It sounds difficult. One of the things that tends to change in the Rails ecosystem is the testing tools
[00:57:23] cnk: so even if you had a test suite on 3.2, it might be tough getting it to run on your initial 4.0 upgrade; much less all the way to 5
[00:57:54] cnk: Is the UI stable? (not to change in the upgrade)?
[00:58:21] cnk: if so, perhaps some characterization tests - testing in the browser
[01:10:01] cnk: capybara is one of the tools in the tool chain. I don't think it is super tightly coupled to rails versions - unlike a lot of the rails test tools - or even rspec-rails
[01:11:08] cnk: So tool of choice - straight seleniium, capybara with something to run it - and testing only via the browser ... might work.
[01:11:41] cnk: The issue is that you lose all the "set up date, roll back transactions" coolness of testing from WITHIN rails
[01:13:46] cnk: Sounds good. Given your comment about code quality, thinking carefully about testing intention and not implementation would be helpful (often harder to do when testing after coding)
[01:23:19] cnk: Thing is I don't know how easy it is to move from 3 -> 4 -> 5. I had some stuff stuck in 2.3 and to get to 3 (and then 4), I couldn't get 'update gems and run this code' to work at all. Ended up making a new Rails 3 project and copying files into it, making needed changes as I went. It was doable because it was a relatively small project and I had written all of it so knew what it was supposed to do
[01:24:32] cnk: might be worth a quick spike to see how doable 'just hack it into 5.1 and then fix it' is
[01:25:13] cnk: ya. sigh
[01:26:10] cnk: I think making a fork and trying some upgrades would be my first step. Just to get an estimate of how hard this is going to b
[01:27:06] cnk: How many libraries does it use? When upgrading really old stuff, it's often hard to figure out a set of libA + libB + libC that works in rails 4.0 - and then repeat for each upgrade step
[01:42:18] cnk: Quit: cnk


[16:15:54] cnk: has joined #RubyOnRails
[16:34:26] cnk: brianpWins: excellent!


[01:07:21] cnk: has joined #RubyOnRails
[14:02:11] cnk: *.net *.split
[14:06:30] cnk: has joined #RubyOnRails
[19:16:22] cnk: what is the context for `Rake::Task['db:migrate']`? Rake is a command so more normal would be, from the command line: `rake db:migrate`
[19:18:07] cnk: OK good to know
[19:18:17] cnk: and that took care of your runtime error?
[22:34:54] cnk: Quit: cnk


[18:42:49] cnk: has joined #RubyOnRails
[19:44:48] cnk: Quit: cnk


[21:55:18] cnk: has joined #RubyOnRails
[21:58:48] cnk: Sorry off topic, but in SCSS, is there a way to convert between a variable name and the value of a variable? I am trying to create a mixin that takes color and writes something like .button-orange {color: ##ff6e1e;} I don't actually care if I pass in $color or the name, but I would love not to have to make the signature of the mixing ('orange', $orange) to get the string and the variable value
[22:05:18] cnk: Quit: cnk
[22:09:01] cnk: has joined #RubyOnRails
[23:23:15] cnk: Quit: cnk


[16:37:26] cnk: Quit: cnk
[19:03:36] cnk: has joined #RubyOnRails
[20:25:34] cnk: Quit: cnk
[21:45:13] cnk: has joined #RubyOnRails
[23:26:46] cnk: Quit: cnk


[21:22:11] cnk: has joined #RubyOnRails
[23:47:53] cnk: Quit: cnk


[00:04:23] cnk: Quit: cnk


[23:56:12] cnk: has joined #RubyOnRails


[00:36:42] cnk: Quit: cnk
[00:44:45] cnk: has joined #RubyOnRails
[03:04:58] cnk: Quit: cnk


[22:17:49] cnk: has joined #RubyOnRails
[22:54:07] cnk: Quit: cnk
[22:56:31] cnk: has joined #RubyOnRails


[00:10:29] cnk: Quit: cnk


[00:22:11] cnk: has joined #RubyOnRails


[02:19:46] cnk: Quit: cnk


[22:56:31] cnk: has joined #RubyOnRails


[00:37:02] cnk: has joined #RubyOnRails
[02:06:00] cnk: Quit: cnk


[02:11:01] cnk: Quit: cnk


[19:55:20] cnk: has joined #RubyOnRails


[01:12:09] cnk: Quit: cnk


[22:02:50] cnk: has joined #RubyOnRails
[23:27:00] cnk: Quit: cnk
[23:31:23] cnk: has joined #RubyOnRails


[01:30:35] cnk: Quit: cnk


[02:25:09] cnk: Quit: cnk
[23:27:32] cnk: has joined #RubyOnRails


[22:44:19] cnk: has joined #RubyOnRails


[18:41:38] cnk: has joined #RubyOnRails
[20:10:39] cnk: Quit: cnk
[20:12:24] cnk: has joined #RubyOnRails
[22:39:41] cnk: Quit: cnk
[22:43:09] cnk: has joined #RubyOnRails
[23:24:45] cnk: Quit: cnk
[23:33:19] cnk: has joined #RubyOnRails
[23:48:33] cnk: Quit: cnk


[00:49:54] cnk: Quit: cnk


[01:23:23] cnk: Quit: cnk
[16:53:04] cnk: has joined #RubyOnRails
[20:05:02] cnk: Quit: cnk
[20:14:11] cnk: has joined #RubyOnRails
[21:25:48] cnk: Quit: cnk
[22:29:39] cnk: has joined #RubyOnRails
[23:25:30] cnk: Quit: cnk
[23:34:15] cnk: has joined #RubyOnRails


[21:24:15] cnk: has joined #RubyOnRails
[21:24:32] cnk: Client Quit
[21:25:01] cnk: has joined #RubyOnRails
[21:40:57] cnk: So you want to restrict the possible list of C's based on what B has mapped as A?
[21:41:30] cnk: (by the way, it is ALWAYS easier to help if you do NOT obfiscate the domain, real names, not ABC)
[21:44:39] cnk: Hmmm it sounds to me like Answer and ConditionalAnswer should be directly related - not just via Questoin. Is that true?
[21:45:22] cnk: What didn't you like about the original solution? It sounds OK to me
[21:49:24] cnk: Scopes are really just a shorthand for a query so your explicit query method in Question is equivalent and straightforward


[01:25:52] cnk: Quit: cnk


[00:54:50] cnk: has joined #RubyOnRails
[02:26:44] cnk: Quit: cnk
[17:41:23] cnk: has joined #RubyOnRails
[18:11:45] cnk: Quit: cnk
[20:01:57] cnk: has joined #RubyOnRails
[21:41:49] cnk: Somewhat - but it might be the practical solution if you just need a little info


[00:43:11] cnk: Quit: cnk


[20:10:58] cnk: has joined #RubyOnRails
[21:09:23] cnk: That's sad to hear. I loved capistrano when it first came out. Haven't had occaision to use it recently


[21:48:24] cnk: has joined #RubyOnRails
[23:19:52] cnk: Quit: cnk


[00:00:00] cnk: Quit: cnk
[00:01:25] cnk: has joined #RubyOnRails
[00:10:00] cnk: Quit: cnk


[21:43:19] cnk: has joined #RubyOnRails
[22:33:41] cnk: Quit: cnk
[23:30:09] cnk: has joined #RubyOnRails


[00:06:30] cnk: I usually like Michael Hartl' stuff
[00:15:07] cnk: Quit: cnk


[00:30:31] cnk: Quit: cnk
[17:15:58] cnk: has joined #RubyOnRails
[17:33:43] cnk: Probably the same way you would unit test any other rails model
[17:34:30] cnk: you might have to do some manual work to fill the underlying tables - if you want to test against data from the db
[20:57:52] cnk: Quit: cnk
[21:15:51] cnk: has joined #RubyOnRails
[22:08:17] cnk: timdotrb: I don't now for certain but update_attributes says it runs callbacks so I would expect reindexing


[20:53:31] cnk: has joined #RubyOnRails
[22:40:34] cnk: harrycs: In general it is easier and more tasteful to do that sort of thing in a helper method rather than in your view. For something like this I would probably make a method that returns the entire header row - and do the 'if admin' part in that method
[22:44:06] cnk: I have done things both ways so 'it depends'
[22:44:57] cnk: for example, you oculd biuld things up with content_tag or do 2 partials and decide between them in the helper
[22:45:28] cnk: I am slightly in favor of the former for this case
[22:46:31] cnk: whichever way you go, then a similar strategy for building the data rows for that table


[00:29:22] cnk: Quit: cnk


[18:19:46] cnk: has joined #RubyOnRails
[19:01:34] cnk: Not to recommend ignoring your data but … postgres storing JSON is pretty flexible
[19:28:23] cnk: zephiro: I suggested Admin.where(email: "").domains.where(formation: true)
[19:31:31] cnk: zephiro: Probably need to get down to a single admin (I added .first)
[20:53:31] cnk: funkytwig: Generally I use one master branch and then feature branches for development. Then I use tags to decide if something gets released to production.
[20:54:23] cnk: The driving factor for deciding your git workflow is often something about the tool you are using to do your production releases. So perhaps start there and work backwards towards test and dev?
[20:59:50] cnk: show code
[21:01:36] cnk: funkytwig: on a VPC? or containers or ?
[21:03:15] cnk: ali_g: you have a syntax error ‘class’ not ‘@class’ in your welcome controller
[21:03:31] cnk: but otherwise, I think this should work. What error do you get?
[21:07:36] cnk: OK so that shoulds like a machine (virtual or otherwise). What other tools are in your mix? Do you make production updates manually? to a single server? or multiples?


[01:25:00] cnk: Quit: cnk


[19:29:50] cnk: has joined #RubyOnRails
[19:52:11] cnk: ocpysh: This channel is a lot less active than it used to be. But is that a drop off in Rails or IRC use? Or just the intersection of those 2 things? Hard to know
[19:56:50] cnk: Probably. though 2 years ago the Django and RubyOnRails channels had about equal numbers at any one time and roughly similar activity levels. Django is at the about the same size but ROR is 1/2 the logged in people it used to be
[20:07:32] cnk: Quit: cnk
[20:56:17] cnk: has joined #RubyOnRails


[00:42:13] cnk: has joined #RubyOnRails
[01:32:15] cnk: azlev: do you want to use 2 databases in the same app - or do you want to migrate from MySQL to Postgres?
[01:33:23] cnk: Can you give an example of code that uses a MySQL function? I feel like ‘just replace that bit with the pg equivalent” is missing something or you wouldn’t have asked
[01:36:29] cnk: OK and then you could just order by name without the function, yes? (I don’t do much w ip addresses)
[01:38:16] cnk: Looks like PG has lots of functions for that type - but I am not sure what is closest to INET_ATON
[01:39:16] cnk: I guess my strategy would be 1) review all models for field types and note what needs to change
[01:39:38] cnk: 2) write a data migration (in SQL) that moves the data from MySQL to PG
[01:39:53] cnk: 3) try running your app + tests and see what breaks. Change as needed
[01:40:28] cnk: Not super sophisticated but if the app is small to medium size it could work
[01:47:47] cnk: If you want to support multiple databases you either have to not use any db-specific functions - or you need to wrap them in something that checks the database driver and calls the correct one
[01:51:21] cnk:
[01:51:43] cnk: the adapter has the db type. There may be other ways to find it
[02:26:18] cnk: Quit: cnk


[20:52:48] cnk: has joined #RubyOnRails
[20:54:31] cnk: Client Quit


[16:26:20] cnk: has joined #RubyOnRails
[16:48:02] cnk: Quit: cnk
[16:51:30] cnk: has joined #RubyOnRails
[17:08:34] cnk: Quit: cnk
[17:28:16] cnk: has joined #RubyOnRails
[17:41:47] cnk: Quit: cnk
[18:17:35] cnk: has joined #RubyOnRails
[23:46:12] cnk: Quit: cnk


[19:23:17] cnk: has joined #RubyOnRails
[19:23:24] cnk: Client Quit


[20:07:49] cnk: has joined #RubyOnRails
[20:57:58] cnk: Ping timeout: 240 seconds
[21:28:09] cnk: has joined #RubyOnRails
[22:22:51] cnk: Quit: cnk


[20:49:55] cnk: has joined #RubyOnRails
[21:59:33] cnk: You should not have to do that 3 times - in fact it might get confused if you do
[22:00:12] cnk: do you have ~/.profile and ~/.bash_profile? if so, why?
[22:08:54] cnk: not sure
[22:09:12] cnk: do either have stuff that you did not post and need to keep?
[22:09:30] cnk: and is that file really bash_profile.txt or is it .bash_profile
[22:09:49] cnk: the former probably isn't read but the llater one should be
[22:11:40] cnk: You could put the general methods on a module and include it where you need it
[22:11:59] cnk: or include it in the setup script that governs minitest
[23:27:34] cnk: Quit: cnk


[16:35:33] cnk: has joined #RubyOnRails
[18:09:40] cnk: has_many
[18:12:16] cnk: because you want ot be able to say avacado.items and get the list of items containing avacados
[18:13:13] cnk: Read this or a book chapter on assocations in rails
[18:13:31] cnk: this section may be what you need now
[18:14:23] cnk: you probably need a mapping table between ingredients and items, so has_and_belongs_to_many
[18:17:07] cnk: myItem.ingredients << fish_stock
[18:17:46] cnk:
[22:11:24] cnk: Quit: cnk


[15:29:04] cnk: has joined #RubyOnRails
[15:29:19] cnk: Client Quit


[16:38:34] cnk: has joined #RubyOnRails
[21:09:22] cnk: I would guess you would need to requery the changed thing so that rails builds a new object with the new type - but guessing
[21:39:42] cnk: Quit: cnk


[21:07:23] cnk: has joined #RubyOnRails
[23:27:23] cnk: Quit: cnk


[20:54:19] cnk: has joined #RubyOnRails
[23:21:59] cnk: Quit: cnk


[17:29:48] cnk: has joined #RubyOnRails
[17:39:39] cnk: Quit: cnk
[18:14:47] cnk: has joined #RubyOnRails
[18:28:05] cnk: Quit: cnk
[18:30:03] cnk: has joined #RubyOnRails
[18:37:22] cnk: Quit: cnk
[18:38:40] cnk: has joined #RubyOnRails
[19:14:14] cnk: Quit: cnk
[19:15:16] cnk: has joined #RubyOnRails
[19:17:17] cnk: Client Quit
[19:24:11] cnk: has joined #RubyOnRails
[19:32:55] cnk: Quit: cnk
[20:17:05] cnk: has joined #RubyOnRails
[20:23:48] cnk: Ping timeout: 240 seconds
[20:24:40] cnk: has joined #RubyOnRails
[20:24:54] cnk: Client Quit
[20:26:38] cnk: has joined #RubyOnRails
[22:57:42] cnk: Quit: cnk


[14:51:31] cnk: has joined #RubyOnRails
[16:56:20] cnk: User458764: you might look at
[18:32:56] cnk: Ping timeout: 252 seconds


[17:14:38] cnk: has joined #RubyOnRails
[19:18:24] cnk: Hmmm so how did you install ruby and rails?
[22:34:56] cnk: use SourceTree or git commit -m "your commit message here"
[22:37:06] cnk: Sorry, no idea. I have EDITOR set to emacs -nw
[23:48:10] cnk: Quit: cnk


[00:02:22] cnk: Quit: cnk


[18:49:03] cnk: OK I don't think that is the default when generating a new project
[18:49:18] cnk: Right - but it will only have the config files is my bet
[18:50:23] cnk: do `rails --help` and look for a flag to pass to specify the database type
[18:51:24] cnk: Or copy from section 3.15.1
[18:59:56] cnk: Interesting
[19:00:20] cnk: Flipp`-: can you grep the project for any more references to openshift - to get a list of all the files you are missing
[19:00:36] cnk:
[19:01:01] cnk: vaguely it's a RedHat container service
[19:01:18] cnk: I have heard of it but don't really know anything about it
[19:01:40] cnk: michael_mbp:
[19:03:30] cnk: The job ads I see from StackOverflow look generally reasonable quality - but are almost all Python, not Ruby
[19:03:56] cnk: clearly their algorithm has not figured out that I am on SO because my Python skilz are not as good as my Ruby
[19:05:57] cnk: OK after reading that README, I would suggest using to get reasonable versions of the files
[19:06:23] cnk: you will want your own secret anyway, but need to know what the file structure should look like
[19:18:27] cnk: whatasunnyday: From a technical standpoint - you just need to read the docs on how to namespace controllers. From a design perspective.... I sometimes do separate controllers by access / role, though I often do that on the same level, both controllers directly in app/controllers, rather than in subdirectories
[19:19:03] cnk: whether to nest largely depends on whether other controllers will also need to differ by role
[19:26:52] cnk: High level, what are you trying to do? e.g. when I edit the user I want X to happen with org ids
[19:29:25] cnk: In ruby you definitely can - but you need to do some reading to see how that plays with Rails autoloading conventions
[19:30:38] cnk: So if the user does not find his org, you create a new organization with whatever he typed?
[19:32:55] cnk: I think that is what is expected from that method - but check the apidocs
[19:42:04] cnk: just call the method that the callback is running
[19:42:23] cnk: e.g. if you have after_save XYZ, just call XYZ
[19:43:21] cnk: I'm not super happy with the organization_id= in Profile, but not my code
[19:43:34] cnk: anyway: lunch!