« Back to channel list

#RubyOnRails - 02 July 2016

« Back 1 day Forward 1 day »
[00:01:59] triptec: has joined #RubyOnRails
[00:04:44] banisterfiend: has joined #RubyOnRails
[00:11:34] hahuang61: has joined #RubyOnRails
[00:17:45] hahuang61: has joined #RubyOnRails
[00:23:59] B1n4r10: has joined #RubyOnRails
[00:24:44] dc4: has joined #RubyOnRails
[00:30:36] SteenJobs: has joined #RubyOnRails
[00:32:15] roamingdog: has joined #RubyOnRails
[00:36:19] jenrzzz: has joined #RubyOnRails
[00:37:51] weaksauce: has joined #RubyOnRails
[00:42:25] ketherah: has joined #RubyOnRails
[00:48:09] blackmes1: has joined #RubyOnRails
[00:51:09] _Tariq: has joined #RubyOnRails
[00:59:07] ishamo: has joined #RubyOnRails
[01:02:38] duffy_duck_2: has joined #RubyOnRails
[01:02:53] Oliphaunte: has joined #RubyOnRails
[01:08:01] rbr: has joined #RubyOnRails
[01:10:50] ensyde: has joined #RubyOnRails
[01:17:33] quazimodo: has joined #RubyOnRails
[01:17:37] quazimod1: has joined #RubyOnRails
[01:21:47] sandroqz: has joined #RubyOnRails
[01:21:57] pontiki: has joined #RubyOnRails
[01:23:19] The_Phoenix: has joined #RubyOnRails
[01:23:23] hahuang61: has joined #RubyOnRails
[01:25:34] desnudopenguino: has joined #RubyOnRails
[01:26:07] duncannz: has joined #RubyOnRails
[01:28:14] ElFerna: has joined #RubyOnRails
[01:30:52] ekinmur: has joined #RubyOnRails
[01:37:13] jenrzzz: has joined #RubyOnRails
[01:37:26] Oliphaunte: has joined #RubyOnRails
[01:40:09] guest56: has joined #RubyOnRails
[01:48:35] rbr: has joined #RubyOnRails
[01:53:37] chipotle: has joined #RubyOnRails
[01:55:20] skiz: has joined #RubyOnRails
[01:57:24] roamingdog: has joined #RubyOnRails
[02:02:06] blackmes1: has joined #RubyOnRails
[02:03:41] dc4: has joined #RubyOnRails
[02:06:22] mikeiniowa: has joined #RubyOnRails
[02:06:36] jheathco: has joined #RubyOnRails
[02:07:01] Devalo: has joined #RubyOnRails
[02:07:14] jheathco: anyone know how i can manually unserialize a record from the db that seems to have been serialized twice by ActiveRecord? it's stored as a string representing the hash rather than the hash itself when i pull it from the db
[02:07:19] Oliphaunte: has joined #RubyOnRails
[02:14:01] triptec: has joined #RubyOnRails
[02:18:13] SteenJobs: has joined #RubyOnRails
[02:20:53] pontiki: i've never ever heard that happening, and wonder how it possibly could have
[02:21:07] User458764: has joined #RubyOnRails
[02:21:27] pontiki: i'm pretty sure you won't be able to do that with AR directly, but it's nothing i've ever looked into
[02:25:36] alfiemax: has joined #RubyOnRails
[02:26:08] Oliphaunte: has joined #RubyOnRails
[02:30:36] braincrash: has joined #RubyOnRails
[02:32:45] cd-rum: has joined #RubyOnRails
[02:32:53] matthewd: jheathco: As a one-off migration? Just manually unserialize it (via YAML or JSON, or whatever format it's in)
[02:35:49] sharkman: has joined #RubyOnRails
[02:37:14] Oliphaunte: has joined #RubyOnRails
[02:43:58] sharkman: frdya night
[02:47:35] _Tariq: has joined #RubyOnRails
[02:48:30] alfiemax: has joined #RubyOnRails
[02:49:00] arnonhongklay: has joined #RubyOnRails
[02:51:03] AndrewIsHere: has joined #RubyOnRails
[02:56:35] Oliphaunte: has joined #RubyOnRails
[03:03:52] blackmes1: has joined #RubyOnRails
[03:04:39] brianblanton: has joined #RubyOnRails
[03:08:23] Oliphaunte: has joined #RubyOnRails
[03:09:52] Oliphaunte: has joined #RubyOnRails
[03:13:39] AmiMoench: has joined #RubyOnRails
[03:15:17] arnonhongklay: has joined #RubyOnRails
[03:16:16] tanuki: has joined #RubyOnRails
[03:19:27] SteenJobs: has joined #RubyOnRails
[03:20:23] SteenJobs: has anyone gotten “NoMethodError: undefined method `[]' for nil:NilClass” using cap when precompile is running?
[03:21:19] pontiki: i don't recall seeing it happen. what file is raising the error?
[03:21:45] wethu: has joined #RubyOnRails
[03:21:46] alfiemax: SteenJobs, nop, but you could provide some more info
[03:22:05] SteenJobs: pontiki: seems to be aborting when compiling a css file
[03:22:16] SteenJobs: it’s located in vendor/stylesheets
[03:23:12] pontiki: gist the whole error trace and the file?
[03:23:23] SteenJobs: yea yea just running it again so i can gist it
[03:23:32] skiz: has joined #RubyOnRails
[03:23:48] SteenJobs: the stacktrace is different after trying to deploy again, gimme a sec
[03:25:16] Rodya_: has joined #RubyOnRails
[03:26:33] ensyde__: has joined #RubyOnRails
[03:29:12] arnonhongklay: has joined #RubyOnRails
[03:31:34] SteenJobs: pontiki: “cd /home/root/apps/****/releases/20160702032906 && ( export REDIS_URL="redis://URL/“ RAILS_ENV="staging" ; /usr/local/rvm/bin/rvm default do bundle exec rake assets:precompile )” is what’s killing it
[03:31:43] SteenJobs: lemme see if i can fix it before i use your time
[03:33:59] egray: has joined #RubyOnRails
[03:39:20] SteenJobs: pontiki: does anything about that command look fishy to you?
[03:39:43] pontiki: no, looks fine
[03:40:05] SteenJobs: yea it actually runs fine earlier in the log
[03:40:11] SteenJobs: i’ll gist the full trace
[03:41:55] SteenJobs: pontiki: https://gist.github.com/jesiegel1/9ed75bf5ae8dfca5951fe60ed08df6f6
[03:42:05] arnonhon_: has joined #RubyOnRails
[03:42:39] SteenJobs: oh wait. may know what it is, one sec
[03:44:03] SteenJobs: nope havent found it
[03:45:08] djbkd: has joined #RubyOnRails
[03:46:59] pontiki: nothing stands out
[03:47:36] pontiki: i'm going to suggest running the assets:precompile locally to see if it works
[03:51:25] pontiki: i'm stuck :((
[03:52:32] SteenJobs: in one of the css files, there was an “asset-url” which needed to be “url"
[03:53:13] pontiki: that should have shown up elsewhere
[03:53:28] SteenJobs: although now there’s a puma/nginx issue
[03:53:30] SteenJobs: this night doesn’t end
[03:53:49] pontiki: first deploy?
[03:54:26] SteenJobs: but ever since the dev that left, left the staging/prod stuff unfinished, it’s been a bit of a mess. like in the cap file he was just commenting out the ip and changing bet staging and prod
[03:54:34] SteenJobs: so now all the wrong config files are being linked to, etc.
[03:54:45] xall: has joined #RubyOnRails
[03:54:48] pontiki: your first time, then?
[03:55:39] SteenJobs: it was a miracle to me that he had it working, but whatever he did to get it working must’ve only been known to him, because nothing was in the right place
[03:55:48] SteenJobs: had to change the nginx service file. that one took a while to debug
[03:56:40] pontiki: it's like plate juggling
[03:56:49] SteenJobs: i’m pretty sure now it’s an nginx issue. i fixed all the puma stuff. but i still haven’t managed to get two independent nginx files to run for prod/staging
[03:56:53] SteenJobs: haha yea it is
[03:56:57] SteenJobs: it really really is
[03:57:10] jishankai: has joined #RubyOnRails
[03:57:18] SteenJobs: i had to learn server stuff fast, because the dev quit suddenly about a month and a half ago
[03:57:25] SteenJobs: but things breaking is always the best way to learn
[03:58:02] pontiki: sorta true
[03:58:11] Oliphaunte: has joined #RubyOnRails
[03:59:27] pontiki: depends on how one deals with the stress. if you can cope and make progress, then yeah
[04:00:16] Oliphaunte: has joined #RubyOnRails
[04:00:25] zeitue: has joined #RubyOnRails
[04:02:01] SteenJobs: i’m the only dev now, so i have no choice i guess
[04:02:06] cd-rum: has joined #RubyOnRails
[04:02:19] SteenJobs: although this is quite frustrating. seems neither puma nor nginx are the issue. and there’s nothing in the server logs haha
[04:05:09] dionysus69: has joined #RubyOnRails
[04:07:02] blackmes1: has joined #RubyOnRails
[04:08:20] arnonhongklay: has joined #RubyOnRails
[04:14:23] jishankai: has left #RubyOnRails: ("WeeChat 1.5")
[04:14:42] KensoDev: has joined #RubyOnRails
[04:15:27] jishankai: has joined #RubyOnRails
[04:17:07] jishankai: has left #RubyOnRails: (":D")
[04:18:20] jishankai: has joined #RubyOnRails
[04:20:03] nettoweb: has joined #RubyOnRails
[04:21:49] wethu: has joined #RubyOnRails
[04:27:28] l4v2: has joined #RubyOnRails
[04:27:29] l4v2: Is it more common to use one custom css/saas file than using each generated one?
[04:29:14] pontiki: generally, yes
[04:29:25] arnonhongklay: has joined #RubyOnRails
[04:29:43] pontiki: fewer downloads, and it's cached
[04:32:07] Rodya_: has joined #RubyOnRails
[04:32:35] l4v2: When I hear of the CRUD operations, what controller actions do they go to? the only one htat is missing is read, but that could be index and show?
[04:33:45] hahuang61: has joined #RubyOnRails
[04:34:25] pontiki: l4v2: !routing
[04:34:25] helpa: l4v2: http://guides.rubyonrails.org/routing.html - Rails Routing From the Outside In - Rails Guide - by Mike Gunderloy
[04:34:26] qejk: has joined #RubyOnRails
[04:34:39] nofxx: l4v2, that's why controllers are plural too
[04:35:46] l4v2: I just read that, doesn’t it combine both HTTP requests as well as CRUD
[04:38:50] l4v2: I thin I said it correctly, becuase it shows controller#update and controller#create and controller#destroy, but I don’t see controller#read
[04:39:48] nofxx: l4v2, first...D in crud is delete. But as you're worried with non-important things... let me clear
[04:40:18] Oliphaunte: has joined #RubyOnRails
[04:40:18] nofxx: also, you need to 'read' 1 and N ... its more clear to split that code
[04:40:32] l4v2: Well then that would mean it is the HTTP request where it gets its naming
[04:40:43] jishankai: R is controller#index controller#show
[04:41:02] nofxx: but, nothing impedes you from customizing all routes and def read;
[04:41:22] triptec: has joined #RubyOnRails
[04:41:23] nofxx: just not sure about using that name for a method... strange things can happen
[04:42:12] nofxx: #open, #read and #write ... you're problably overwriting something =D
[04:42:49] l4v2: So is controller#new create?
[04:43:02] l4v2: as wells as controller#create
[04:43:16] nofxx: new is the form... just create a scaffold there and play around
[04:43:44] nofxx: #new is ok cuz it's #initialize btw
[04:44:46] l4v2: So basically those actions on the model don’t necisarily have actions
[04:44:51] shinnya: has joined #RubyOnRails
[04:46:05] l4v2: kind of hard to word it
[04:46:40] l4v2: also can more def be made than just the 7?
[04:46:44] pontiki: controller actions for resources generally map to methods on the resource model
[04:46:57] pontiki: how much of that page did you read?
[04:47:20] l4v2: I read the whole thing 1 year ago
[04:47:34] pontiki: your question is answered in it
[04:48:39] yaewa: has joined #RubyOnRails
[04:50:05] l4v2: I just watned clarity on two questions.
[04:51:16] l4v2: I’ve only seen or worked with show, index, create, etc… that’s all I see so far scrolling through this page, but could you make a def for say def x that is not one of those 7?
[04:51:33] l4v2: I’m assuming no
[04:51:37] pontiki: yes you can
[04:51:57] pontiki: you don't have to use any of the standard resource mappings
[04:52:01] pontiki: or some of them
[04:52:07] pontiki: and you can create new ones
[04:52:31] nofxx: and it's all on that page
[04:52:45] nofxx: ;) get :yourname post :yourname
[04:52:48] lupine: has joined #RubyOnRails
[04:52:54] nofxx: check member and collection there
[04:53:26] Oliphaunte: has joined #RubyOnRails
[04:54:58] SteenJobs: has joined #RubyOnRails
[04:58:55] SteenJobs: has joined #RubyOnRails
[05:00:36] p8m_: has joined #RubyOnRails
[05:03:10] arnonhongklay: has joined #RubyOnRails
[05:03:24] mfilipe: has joined #RubyOnRails
[05:03:25] Fridtjof_: has joined #RubyOnRails
[05:03:27] pragmati-: has joined #RubyOnRails
[05:03:30] djgraham|calypso: has joined #RubyOnRails
[05:03:33] maxmanders_: has joined #RubyOnRails
[05:03:33] bakingbread: has joined #RubyOnRails
[05:03:34] Qwertie-: has joined #RubyOnRails
[05:03:35] Olipro_: has joined #RubyOnRails
[05:03:40] Talltree_: has joined #RubyOnRails
[05:03:41] hfp__work: has joined #RubyOnRails
[05:03:59] spion_: has joined #RubyOnRails
[05:04:03] Olipro-: has joined #RubyOnRails
[05:04:40] gthank_: has joined #RubyOnRails
[05:05:16] thomasfedb: has joined #RubyOnRails
[05:05:16] thomasfedb: has joined #RubyOnRails
[05:05:28] toydestroyer: has joined #RubyOnRails
[05:06:07] User458764: has joined #RubyOnRails
[05:11:52] asheinfeld: has joined #RubyOnRails
[05:15:31] alfiemax: has joined #RubyOnRails
[05:17:56] arnonhongklay: has joined #RubyOnRails
[05:18:22] yfeldblum: has joined #RubyOnRails
[05:21:39] roelof: has joined #RubyOnRails
[05:21:59] roelof: How can I solve this deprecated message in rails 5 : https://gist.github.com/rwobben/e82072709262e97afaa5beffcde9b648
[05:23:08] andrewfree: has joined #RubyOnRails
[05:23:42] rafaelfranca: has joined #RubyOnRails
[05:23:54] rafaelfranca: has joined #RubyOnRails
[05:24:12] andrewfree: I'm trying to get a basic app of 5.0 rc1 w/ ember running and am having issues with some bundle. "Bundler could not find compatible versions for gem "railties":" haven't been able to find a resolution. Anyone see this?
[05:27:24] andrewfree: Can confirm the issue on seperate enviroments that are both pretty clean/up to date as we both are starting fresh here.
[05:31:15] deecross: has joined #RubyOnRails
[05:35:44] i: has joined #RubyOnRails
[05:36:04] dopie: has joined #RubyOnRails
[05:37:47] deecross: has joined #RubyOnRails
[05:46:48] pawnbox: has joined #RubyOnRails
[05:49:10] cd-rum: has joined #RubyOnRails
[05:50:15] sadaf2605: has joined #RubyOnRails
[05:52:05] cd-rum_: has joined #RubyOnRails
[05:53:07] conta: has joined #RubyOnRails
[05:54:30] JohanTux: has joined #RubyOnRails
[05:56:43] roelof: andrewfree: I think everyone is still sleeping
[05:57:47] andrewfree: heh don't blame em
[05:58:12] roelof: its 8 o clock in the morning here
[05:58:24] roelof: nice time to begin the day I think
[05:59:13] JohanTux: roelof: where is "here"? In the US Central zone it's 1AM
[05:59:26] JohanTux: about bed time.
[05:59:48] roelof: Europe/Amsterdam
[06:00:09] jgt: has joined #RubyOnRails
[06:01:05] Devalo: has joined #RubyOnRails
[06:01:50] arnonhon_: has joined #RubyOnRails
[06:02:52] roamingdog: has joined #RubyOnRails
[06:04:53] roelof: JohanTux: where do you live then ?
[06:08:11] JohanTux: Missouri, in the midwest U.S.
[06:08:41] roelof: Thanks, I live in the Netherlands
[06:08:57] JohanTux: I want to visit Amsterdam someday.
[06:09:36] jheathco: has joined #RubyOnRails
[06:09:51] roelof: Amsterdam for me is a ride of 3 hours. I live near Germany
[06:10:13] JohanTux: <--leaving for a few minutes to install some RAM
[06:11:59] sevenseacat: has joined #RubyOnRails
[06:16:00] roelof: How can I solve this deprecated message in rails 5 : https://gist.github.com/rwobben/e82072709262e97afaa5beffcde9b648 ?
[06:16:38] matthewd: roelof: Is the example not helpful?
[06:18:35] roelof: I tried several things like : process :create, method: :post, params: {account: @account_attributes, format: :json } but no success so for me the example is not helpfull, matthewd
[06:20:08] matthewd: "no success" = you still get the deprecation? That looks right. :/
[06:20:30] matthewd: (though you can also continue using the post method, as per the get example)
[06:20:56] roelof: no, I see then another error message
[06:22:26] roelof: wierd, now it works well, yesterday I saw a error message on that code, Wierd box
[06:25:44] roelof: thanks all, I can work now on non-valid json input
[06:26:22] roelof: Can I also use factorygirl for that. So make different factories for different cases ?
[06:27:06] yardenbar: has joined #RubyOnRails
[06:28:45] hahuang61: has joined #RubyOnRails
[06:35:21] arnonhongklay: has joined #RubyOnRails
[06:42:44] learner: has joined #RubyOnRails
[06:43:23] wethu: has joined #RubyOnRails
[06:43:31] learner: hey guys how do i define a controller that's in a module in rspec. can i say describe MyModule::MyController do
[06:44:46] learner: sevenseacat: I get error
[06:44:51] sevenseacat: and that error is?
[06:45:22] learner: sevenseacat: I have this module defined in other classes, it looks for the controller in those classes instead of its own file
[06:45:32] sevenseacat: that doesnt tell me what the error is
[06:47:13] learner: sevenseacat: I get this error: uninitialized constant MyModule (NameError)
[06:47:36] sevenseacat: can you gist the code and the error, please
[06:47:40] deecross: has joined #RubyOnRails
[06:49:28] sadaf2605: has joined #RubyOnRails
[06:52:13] triptec: has joined #RubyOnRails
[06:52:13] darutoko: has joined #RubyOnRails
[06:53:39] learner: sevenseacat: http://pastie.org/10897127
[06:54:24] sevenseacat: and the error is?
[06:54:33] jishankai: has joined #RubyOnRails
[06:58:31] learner: ok let me paste another one
[06:58:39] learner: cause i don't really want menuss
[06:58:42] learner: i want menus
[06:58:56] learner: i was just trying to get menus to work with another ss and same error happened
[06:59:04] learner: so let me post original code
[06:59:10] pawnbox: has joined #RubyOnRails
[07:00:14] sevenseacat: then fix the code to be what you want it to be, make it Menus
[07:00:26] zarubin: has joined #RubyOnRails
[07:03:03] deecross: has joined #RubyOnRails
[07:06:58] learner: sevenseacat: http://pastie.org/10897135
[07:07:39] arnonhongklay: has joined #RubyOnRails
[07:09:16] benlieb: has joined #RubyOnRails
[07:09:28] sevenseacat: ah you've got constants with the same name in different modules
[07:09:34] sevenseacat: yeah... Ruby can be tricky with that
[07:10:07] sevenseacat: however, your Menus module file is in an incorrectly named file
[07:10:36] sevenseacat: you dont have Goprax::Menus::Menus so you shouldnt have goprax/menus/menus.rb
[07:11:51] matthewd: Note goprax is directly inside app/, so app/goprax/menus/menus.rb should be defining Menus::Menus
[07:12:06] sevenseacat: ooh I missed that
[07:12:44] learner: but that's not defining a class
[07:12:48] matthewd: learner: So yeah.. umm... what do you *intend* to be doing here? :)
[07:12:53] learner: it's defining a module function
[07:13:06] learner: my issue is with the controller
[07:13:18] learner: i'm extracting status from menuscontroller
[07:13:27] learner: putting it under a module named Menus
[07:15:20] matthewd: Also relevant: you haven't even shown the file named in the error -- app/goprax/menus.rb
[07:15:32] learner: yes i ahve
[07:16:06] learner: oh i mislabled it
[07:16:22] learner: the file is actually app/goprax/menus.rb
[07:16:56] learner: this happens when you've been working for 24 hours
[07:16:58] matthewd: Well, the problem is still the same: that file is not defining the constant it's supposed to be
[07:17:10] learner: what constant?
[07:17:31] matthewd: It's defining GoPrax::Menus, and as per the error, it should be defining Menus
[07:17:45] matthewd: This app/goprax/ directory is.... :|
[07:18:24] learner: but my application name is also goprax
[07:19:08] learner: i'm following this guy's tutorial: https://github.com/coreyhaines/bawch/tree/episode3
[07:19:20] learner: he's got a very similar set up
[07:19:29] learner: look at it
[07:20:49] sevenseacat: thats... unusual
[07:21:02] matthewd: Yeah... I wouldn't be doing that
[07:21:09] sevenseacat: its also 4 years old
[07:21:21] matthewd: Largely because you'll run into confusion like this
[07:21:37] sevenseacat: unsupported ruby, unsupported rails
[07:21:39] matthewd: You're missing a require in the controller
[07:21:45] matthewd: (compared to Corey's)
[07:21:59] matthewd: .. which will hackfully make it work, because you pre-empt the autoload
[07:22:18] User458764: has joined #RubyOnRails
[07:22:21] matthewd: But if you're going to define un-autoloadable constants, they should really be in lib/, not app/
[07:22:30] learner: matthewd: but his code at the begining doesn't include that
[07:22:41] arnonhongklay: has joined #RubyOnRails
[07:22:45] learner: what you see is the final code for episode 3
[07:22:59] matthewd: I don't really care
[07:23:09] matthewd: Without https://github.com/coreyhaines/bawch/blob/episode3/app/controllers/coderetreats_controller.rb#L1, it won't work
[07:23:22] dc4: has joined #RubyOnRails
[07:24:01] learner: matthewd: you're looking at the wrong controller
[07:24:06] learner: look at statuscontroller
[07:24:09] sevenseacat: root-level folders in app don't define namespaces
[07:24:13] sevenseacat: learner: what
[07:24:22] learner: https://github.com/coreyhaines/bawch/blob/episode3/app/controllers/coderetreats/status_controller.rb
[07:24:33] sevenseacat: yeah, its got a require in it
[07:25:49] learner: sevenseacat: that require has nothing to do with the constant "Menus"
[07:25:59] learner: it has to do with including status
[07:26:10] sevenseacat: and that file also defines menus
[07:26:24] matthewd: learner: /nick already-knower
[07:26:26] blackhuey: has joined #RubyOnRails
[07:26:42] learner: ugh come on
[07:26:47] learner: stop confusing me
[07:27:13] sevenseacat: learner: okay. you're doing things in a non-standard way. don't do it.
[07:27:28] learner: the file status_controller.rb defines module Menus, so what's wrong with that
[07:27:32] matthewd: learner: I'm pointing at a particular thing and claiming that's the cause of your problem
[07:27:51] matthewd: learner: Instead of saying "I tried that, and it's still a problem", you're arguing that I'm wrong because you know better
[07:27:54] learner: what is the cause of my problem?
[07:28:04] matthewd: You. are. missing. the. require.
[07:28:21] learner: i added the require and same issue exists
[07:28:25] learner: no change in error
[07:28:40] learner: and you're looking at the wrong controller again
[07:29:04] learner: you keep talking about how contretreats_controller has require coderetreats
[07:29:25] learner: that controller has nothing to do with the spec for status_controller
[07:29:36] learner: status controller doesn't even know menus controller exists
[07:30:03] learner: the codereteat controller is the one using status controller not the other way around
[07:30:12] learner: and i do have the require statements there
[07:30:17] learner: still the same error
[07:31:03] tego101: has joined #RubyOnRails
[07:31:46] arnonhongklay: has joined #RubyOnRails
[07:33:46] sevenseacat: well I've made my recommendations, up to you now
[07:33:59] Davey: has joined #RubyOnRails
[07:33:59] Davey: has joined #RubyOnRails
[07:33:59] deecross: has joined #RubyOnRails
[07:34:12] deecross: has joined #RubyOnRails
[07:34:29] learner: your recommendation didn't fix anything thanks then
[07:34:45] matthewd: Hrmm. I think I see why it would still be failing... but now I don't see how Corey's can work.
[07:35:06] matthewd: Maybe I'm misremembering the behaviour of the ancient Rails version it's using
[07:35:24] sevenseacat: my recommendation to follow rails standard autoloading?
[07:35:28] sevenseacat: and not implement your own?
[07:35:41] matthewd: Anyway, I'm with sevenseacat: don't do this. It is fighting the framework, badly.
[07:36:58] sadaf2606: has joined #RubyOnRails
[07:38:56] matthewd: To be clear, it would be possible to follow Corey's non-standard application layout... but this app/applicationname/ placement is pointlessly harmful
[07:42:43] learner: what if i don't want autoloading
[07:42:49] learner: how can i load things on my own
[07:42:57] learner: anti-loading
[07:43:06] sevenseacat: then you're using the wrong framework.
[07:43:07] matthewd: learner: Then you need to use require
[07:45:08] learner: so in the spec file i can say require "app/controllers/menus/status_controller" and that'll fix it?
[07:45:09] fox_mulder_cp: ohoh... Patrick released 14.2 slackware.. yohoho...
[07:45:31] matthewd: learner: Empty out config.autoload_paths
[07:46:05] matthewd: learner: That way you'll get ordinary missing-constant errors anytime you reference something you haven't required, instead of triggering an autoload that will break like this
[07:46:38] matthewd: Yes, that should fix it (well, not quite, because that's relative to the wrong thing. but that's the file you need to require.)
[07:46:56] learner: matthewd: so in config/application.rb add a directive against autoloading?
[07:47:27] matthewd: If that's what you want, yes
[07:50:34] learner: so config.autoload_paths = ""?
[07:50:54] matthewd: Empty array
[07:52:08] matthewd: Might need to do eager_load_paths too, for production.. not sure.
[07:54:23] Qwertie-: Im trying to make a pastebin in rails but when I visit /pastes/id I get this error https://i.imgur.com/UxerWyK.png. I can upload the content of my files but I dont know where the problem is..
[07:54:36] pawnbox: has joined #RubyOnRails
[07:55:45] matthewd: (but because it bears repeating, I strongly discourage going down this path... independent of any opinion on the goal structure, the tutorial is clearly out of date. If you're learning, you should really be sticking to the "normal" path.. and if not, relying on very specific instructions [that are outdated/unhelpful here])
[07:56:03] sadaf2606: has left #RubyOnRails: ()
[07:56:38] matthewd: Qwertie-: That error message seems relevant
[07:57:13] Qwertie-: matthewd: I have removed everything in paste_controller and I still get the error
[07:58:04] matthewd: That is not the name of the thing it's looking for
[07:58:46] Qwertie-: Hm, thats a good point the class is PasteController but its looking for PastesController
[07:58:49] learner: matthewd: he's using the Coderetreats module as a decoupled app, that's not a part of rails, so he loads it in, i don't understand why that's wrong in your opinion
[07:59:20] matthewd: > To be clear, it would be possible to follow Corey's non-standard application layout... but this app/applicationname/ placement is pointlessly harmful
[08:00:07] jishankai: Qwertie-: You should rename paste_controller to pastes_controller
[08:00:34] Qwertie-: Should controllers always be plural?
[08:01:38] matthewd: Qwertie-: Generally (e.g., you're using normal resource routes), yes
[08:01:42] jishankai: no. in this issue, i think you use resources :pastes in routes.rb.
[08:01:45] fox_mulder_cp: tbuehlmann: thanks for nigthy hints for scope, i think, how fix it
[08:01:49] dionysus69: has joined #RubyOnRails
[08:01:58] Qwertie-: matthewd: Well thats fixed it. thanks :D
[08:04:55] matthewd: Qwertie-: Glad to help :)
[08:05:58] Qwertie-: Probably the hardest thing for me to understand with RoR is when I should use a capital, plural or none
[08:08:16] moei: has joined #RubyOnRails
[08:08:55] yfeldblum: has joined #RubyOnRails
[08:09:00] matthewd: Some are more reasoned, some are more arbitrary... mostly, I'd say just be on the lookout for it as a possible "typo" when you get that sort of error, where it's unexpectedly complaining that something isn't there when you think it is
[08:10:30] yfeldblum: has joined #RubyOnRails
[08:10:35] arnonhongklay: has joined #RubyOnRails
[08:11:11] User458764: has joined #RubyOnRails
[08:17:54] nofxx: has joined #RubyOnRails
[08:17:54] nofxx: has joined #RubyOnRails
[08:22:02] IggyGee: has joined #RubyOnRails
[08:26:20] marr: has joined #RubyOnRails
[08:27:47] solars: has joined #RubyOnRails
[08:30:35] pawnbox: has joined #RubyOnRails
[08:34:07] arnonhongklay: has joined #RubyOnRails
[08:34:55] shinnya: has joined #RubyOnRails
[08:39:32] lxsameer: has joined #RubyOnRails
[08:40:14] arBmind: has joined #RubyOnRails
[08:43:13] nofxx: Qwertie-, capital is ruby, you use with constants only (class is a constant)
[08:43:34] nofxx: Qwertie-, in rails all is singular but controllers... easier to think that way
[08:43:55] nofxx: as a consequence views too heh
[08:44:05] jishankai: is there anyone who can help me to use the gem https://github.com/fwshun8023/yuntongxun-api? it's not a regular gem and i also a beginner for gem workflow. thanks
[08:44:11] nofxx: classes and modules are constants*
[08:50:04] tbuehlmann: fox_mulder_cp: welcome
[08:54:15] Devalo: has joined #RubyOnRails
[08:54:15] M-shine: has joined #RubyOnRails
[08:54:52] Devalo: has joined #RubyOnRails
[09:02:28] arnonhongklay: has joined #RubyOnRails
[09:08:02] skiz: has joined #RubyOnRails
[09:14:13] Ergo: has joined #RubyOnRails
[09:30:26] concordiadiscors: has joined #RubyOnRails
[09:37:00] arnonhongklay: has joined #RubyOnRails
[09:37:53] dionysus69: has joined #RubyOnRails
[09:42:33] cd-rum: has joined #RubyOnRails
[09:43:20] bjaX: has joined #RubyOnRails
[09:44:35] jak: has joined #RubyOnRails
[09:44:54] deecross: has joined #RubyOnRails
[09:48:37] arnonhongklay: has joined #RubyOnRails
[09:50:05] sameerynho: has joined #RubyOnRails
[09:55:21] TheMonster_: has joined #RubyOnRails
[09:55:31] zeitue: has joined #RubyOnRails
[09:58:51] vedu: has joined #RubyOnRails
[10:01:37] arnonhongklay: has joined #RubyOnRails
[10:04:22] pawnbox: has joined #RubyOnRails
[10:07:01] Devalo: has joined #RubyOnRails
[10:09:32] triptec: has joined #RubyOnRails
[10:11:54] Tempesta: has joined #RubyOnRails
[10:15:30] Nuck: has joined #RubyOnRails
[10:21:30] rubyonrailed: has joined #RubyOnRails
[10:23:16] sadaf2605: has joined #RubyOnRails
[10:23:22] sadaf2605: has left #RubyOnRails: ()
[10:27:29] sadaf2606: has joined #RubyOnRails
[10:27:48] sadaf2606: has left #RubyOnRails: ()
[10:31:12] User458764: has joined #RubyOnRails
[10:32:49] AzaToth: has joined #RubyOnRails
[10:49:10] siaw23: has joined #RubyOnRails
[10:49:53] Devalo: has joined #RubyOnRails
[10:51:15] roelof: has joined #RubyOnRails
[10:51:41] roelof: Hello, I have this factory : https://gist.github.com/rwobben/7d8f2c85cd7c8566480ecff8d06efe79
[10:52:00] roelof: and Im using it this way : @account_attributes = FactoryGirl.attributes_for (:account, :valid)
[10:52:23] roelof: but then I see this error message : syntax error, unexpected ',', expecting ')' (SyntaxError)
[10:52:40] roelof: how to solve this and use the factory right ?
[10:54:37] marr: has joined #RubyOnRails
[10:54:43] tbuehlmann: there's a space between attributes_for and the arguments
[10:57:00] arnonhongklay: has joined #RubyOnRails
[10:57:10] roelof: tbuehlmann: thanks, new error message : ArgumentError: Trait not registered: valid_account
[10:58:24] User458764: has joined #RubyOnRails
[10:59:18] roelof: but I make it here : factory :valid_account do
[11:04:30] aayushkothari: has joined #RubyOnRails
[11:07:15] roelof: found it. I had to do : @account_attributes = FactoryGirl.attributes_for(:valid_account)
[11:07:21] roelof: aayushkothari: hello
[11:07:47] Devalo: has joined #RubyOnRails
[11:08:15] aayushkothari: Hey roelof! About to start building the API backend for my company's next project and I have some questions.
[11:10:25] aayushkothari: The primary one relevant to this community being, how do Sinatra and Rails 5's API mode compare with respect to number of req/s handled and the average memory footprint of each process? Here's a more detailed reference to my query - http://softwarerecs.stackexchange.com/questions/34235/backend-infrastructure-of-dropbox-like-platform
[11:15:48] roelof: sorry, never worked with Sinatra and now for the first time playing with the api
[11:16:18] hardtail: has joined #RubyOnRails
[11:19:19] arnonhongklay: has joined #RubyOnRails
[11:22:07] chipotle_: has joined #RubyOnRails
[11:23:00] FernandoBasso: has joined #RubyOnRails
[11:24:33] chipotle_: has joined #RubyOnRails
[11:26:11] chipotle: has joined #RubyOnRails
[11:27:55] differentreality: has joined #RubyOnRails
[11:29:43] chipotle_: has joined #RubyOnRails
[11:33:35] arnonhongklay: has joined #RubyOnRails
[11:44:31] Axilla: has joined #RubyOnRails
[11:48:53] Sashimi: has joined #RubyOnRails
[11:52:50] Devalo: has joined #RubyOnRails
[11:59:20] arnonhongklay: has joined #RubyOnRails
[12:00:32] arnonhongklay: has joined #RubyOnRails
[12:05:02] triangles: has joined #RubyOnRails
[12:08:34] webnanners: has joined #RubyOnRails
[12:09:18] webnanners: has joined #RubyOnRails
[12:09:18] webnanners: has joined #RubyOnRails
[12:09:39] allcentury: has joined #RubyOnRails
[12:15:00] khelair: has joined #RubyOnRails
[12:15:37] aayushkothari: has joined #RubyOnRails
[12:21:36] triptec: has joined #RubyOnRails
[12:31:09] dangerousdave: has joined #RubyOnRails
[12:31:24] tknz: has joined #RubyOnRails
[12:34:12] arnonhon_: has joined #RubyOnRails
[12:35:15] roamingdog: has joined #RubyOnRails
[12:37:19] l4v2: has joined #RubyOnRails
[12:44:46] netzfisch: has joined #RubyOnRails
[12:44:54] desnudopenguino: has joined #RubyOnRails
[12:47:18] siaw23: has joined #RubyOnRails
[12:49:26] sypheren: has joined #RubyOnRails
[12:49:51] Devalo: has joined #RubyOnRails
[13:00:45] fl4sh_: has joined #RubyOnRails
[13:00:49] jetpack_joe: has joined #RubyOnRails
[13:07:12] rbr: has joined #RubyOnRails
[13:10:00] jhill: has joined #RubyOnRails
[13:10:01] machty: has joined #RubyOnRails
[13:10:08] JackMc: has joined #RubyOnRails
[13:13:41] nettoweb: has joined #RubyOnRails
[13:14:56] rafaelfranca: has joined #RubyOnRails
[13:15:13] arnonhongklay: has joined #RubyOnRails
[13:18:06] pLaToOn: has joined #RubyOnRails
[13:18:25] siaw23: has joined #RubyOnRails
[13:20:18] asheinfeld: has joined #RubyOnRails
[13:23:07] pontiki: has joined #RubyOnRails
[13:23:49] triptec: has joined #RubyOnRails
[13:25:28] FernandoBasso: I am having lots of problems migrating controller tests from 4.2 to 5. Is there docs on that specific topic?
[13:27:13] kareeole_: has joined #RubyOnRails
[13:27:36] FernandoBasso: Testing guide still uses MiniTest and stuff like that, but they say our controller tests should be inheriting from ActionDispatch::IntegrationTest instead in rails 5.
[13:28:12] kareeole_: Can clockwork work together with Delayed job and ActiveJob or the last two are the same ? I want to persist some data to the database every 10 seconds and I am able to but I don't know If I am doing something wrong.
[13:35:16] atzorvas: has joined #RubyOnRails
[13:35:35] roamingdog: has joined #RubyOnRails
[13:38:27] GodFather_: has joined #RubyOnRails
[13:42:37] JesseH: has joined #RubyOnRails
[13:43:05] srinidhi: has joined #RubyOnRails
[13:43:51] arnonhongklay: has joined #RubyOnRails
[13:44:16] tweeeaks: action cable is freaking awesome.
[13:44:46] atzorvas: shouldn't 'scope module:' "swallow" the prefix path? url_for seems to have the scope as a prefix http://dpaste.com/231G7TM
[13:45:37] Devalo: has joined #RubyOnRails
[13:52:35] atzorvas: it worked using "def self.use_relative_model_naming?; true; end" inside app/models/app.rb
[13:52:40] siaw23: has left #RubyOnRails: ()
[13:54:10] atzorvas: I'm not sure though for the correctness of my approach. I would appreciate any comments :) (updated paste: http://dpaste.com/0M4KKXK)
[13:59:11] pontiki: has joined #RubyOnRails
[14:09:00] ElFerna: has joined #RubyOnRails
[14:13:47] noobda: has joined #RubyOnRails
[14:14:07] deecross: has joined #RubyOnRails
[14:14:51] noobda: Hey guys. Can you suggest some cool rails projects that I can contribute to? I couldn't find much on Google unfortunately.
[14:15:48] pontiki: there's rails itself
[14:16:00] sevenseacat: http://ruby-toolbox.com
[14:16:01] FernandoBasso: Talk about cool!
[14:16:03] pontiki: and the many packages and gems included there in
[14:16:15] helpa: We're not all guys here - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
[14:16:16] noobda: pontiki: Err, something beginner friendly maybe?
[14:16:38] pontiki: rails itself is quite beginner friendly
[14:17:06] noobda: sevenseacat: Nice thanks. Also, LOL.
[14:17:12] Contigi777: has joined #RubyOnRails
[14:17:16] noobda: pontiki: Okay. Will look into it.
[14:17:40] noobda: sevenseacat: the guys thing. Was it a joke?
[14:18:29] arnonhongklay: has joined #RubyOnRails
[14:20:31] User458764: has joined #RubyOnRails
[14:26:44] hive-mind: has joined #RubyOnRails
[14:27:27] FernandoBasso: I always though "guys" be used in a general sense to mean "everybody".
[14:27:41] FernandoBasso: s/though/thought/
[14:27:50] FernandoBasso: Of course I am wrong again.
[14:27:55] sevenseacat: not everyone agrees with that. typically, a lot of women don't.
[14:29:13] FernandoBasso: And rightly so if the word is not really all-encompassing.
[14:32:26] kareeoleez: has joined #RubyOnRails
[14:32:50] kareeoleez: guys is delayedjob the same as activejob ?
[14:32:53] triptec: has joined #RubyOnRails
[14:36:43] mostlybadfly: has joined #RubyOnRails
[14:40:07] FernandoBasso: kareeoleez, :|
[14:40:57] FernandoBasso: That is preposterous.
[14:42:10] Guest683: has joined #RubyOnRails
[14:43:18] arnonhongklay: has joined #RubyOnRails
[14:43:53] dionysus69: has joined #RubyOnRails
[14:48:53] hinbody: has joined #RubyOnRails
[14:50:18] arnonhongklay: has joined #RubyOnRails
[14:51:32] conta: has joined #RubyOnRails
[14:52:34] Ebok: has joined #RubyOnRails
[14:52:34] AnoHito: has joined #RubyOnRails
[14:52:37] upgrayeddd: has joined #RubyOnRails
[14:54:13] nettoweb: has joined #RubyOnRails
[14:54:28] swap_a_b: has joined #RubyOnRails
[14:55:49] ekinmur: has joined #RubyOnRails
[15:01:16] Axilla: has joined #RubyOnRails
[15:01:50] lele: has joined #RubyOnRails
[15:02:23] sadaf2606: has joined #RubyOnRails
[15:03:07] alfiemax: has joined #RubyOnRails
[15:03:51] sadaf2606: has left #RubyOnRails: ()
[15:05:18] ekinmur: has joined #RubyOnRails
[15:12:08] GodFather_: has joined #RubyOnRails
[15:18:50] Rodya_: has joined #RubyOnRails
[15:22:11] whathappens: has joined #RubyOnRails
[15:23:13] arnonhongklay: has joined #RubyOnRails
[15:26:59] triptec: has joined #RubyOnRails
[15:30:56] Devalo: has joined #RubyOnRails
[15:32:28] arnonhongklay: has joined #RubyOnRails
[15:37:19] Scriptonaut: has joined #RubyOnRails
[15:38:05] kareeoleez: has joined #RubyOnRails
[15:39:29] gareeoliz: can anyone please help with some scheduled jobs ? https://gist.github.com/chrisvel/e6797a8fb4891550e0bbbafe95cfdccd
[15:40:18] gareeoliz: I see the worker run, then jobs, then it stops after executing what's in the queue
[15:42:28] Scriptonaut: has left #RubyOnRails: ()
[15:44:17] arBmind: has joined #RubyOnRails
[15:46:21] deecross: has joined #RubyOnRails
[15:46:53] conta: has joined #RubyOnRails
[15:47:13] arnonhongklay: has joined #RubyOnRails
[15:48:36] macsteps: has joined #RubyOnRails
[15:50:44] banisterfiend: has joined #RubyOnRails
[15:54:53] Tempesta: has joined #RubyOnRails
[15:54:53] Tempesta: has joined #RubyOnRails
[16:00:05] allcentury: has joined #RubyOnRails
[16:01:35] GodFather_: has joined #RubyOnRails
[16:04:48] triptec: has joined #RubyOnRails
[16:06:54] khelair: can anybody here give a recommendation for a good ruby on rails 4 simple app tutorial? I'm having a really terrible time finding a free one online here...
[16:07:24] GodFather_: has joined #RubyOnRails
[16:09:06] sevenseacat: I can recommend good ones, but they're not free
[16:14:27] diegoviola: has joined #RubyOnRails
[16:16:59] asheinfeld: has joined #RubyOnRails
[16:17:18] siaw23: has joined #RubyOnRails
[16:19:09] khelair: yeah I'm afraid I'm only one step up from homeless right now, I don't have much to work with
[16:19:30] ferr: has joined #RubyOnRails
[16:23:13] FernandoBasso: What about Hartl's tutorial?
[16:24:59] FernandoBasso: And I don't have any idea how this one is on youtube: https://www.youtube.com/watch?v=y8IE6xyacJk&list=PLFtv7PD-Y-DmcE1wH8UAqoaoP0D-DSlA9&index=10
[16:29:36] allcentury: has joined #RubyOnRails
[16:30:09] Fernando-Basso: has joined #RubyOnRails
[16:33:07] rubyonrails345: has joined #RubyOnRails
[16:33:51] rubyonrails345: has left #RubyOnRails: ()
[16:34:17] DoubleMalt: has joined #RubyOnRails
[16:35:59] diegoviola: has joined #RubyOnRails
[16:38:15] gareeoliz: has joined #RubyOnRails
[16:39:19] arnonhongklay: has joined #RubyOnRails
[16:43:49] qejk: has joined #RubyOnRails
[16:49:58] khelair: FernandoBasso: I know nothing of Hartl's tutorial, but I shall google. I'll check out the link, also; thanks!
[16:51:47] arnonhongklay: has joined #RubyOnRails
[16:53:19] pontiki: has joined #RubyOnRails
[16:55:32] Fernando-Basso: ACTION Playing tomb raider 1 with my lady.
[16:56:08] diegoviola: has joined #RubyOnRails
[16:56:51] arup_r: has joined #RubyOnRails
[16:57:15] arup_r: How do I check if an object is empty or not in ES5?
[16:58:02] pontiki: arup_r: what's ESS?
[16:58:22] sevenseacat: whats that got to do with rails?
[16:58:22] arup_r: i mean I call {} is an empty object.. that is ES5
[16:58:31] arup_r: wrong channel
[16:58:32] Oliphaunte: has joined #RubyOnRails
[16:58:34] arup_r: ignore me
[16:58:49] arup_r: I thought I am in JS
[16:59:50] arup_r: has left #RubyOnRails: ()
[17:00:43] srinidhi: has joined #RubyOnRails
[17:01:27] chouhoulis: has joined #RubyOnRails
[17:02:28] norc: has joined #RubyOnRails
[17:03:03] macsteps: has joined #RubyOnRails
[17:04:19] pontiki: oh, js, you say ES
[17:04:38] pontiki: stupid font made it look like "ee ess ess" :(
[17:05:20] pontiki: if (obj.keys.length === 0) // then empty
[17:05:54] Oliphaunte: has joined #RubyOnRails
[17:09:22] Hobogrammer: has joined #RubyOnRails
[17:12:42] arnonhongklay: has joined #RubyOnRails
[17:12:51] macsteps: has joined #RubyOnRails
[17:24:22] IanV0rn2341: has joined #RubyOnRails
[17:24:41] whathappens: has joined #RubyOnRails
[17:25:00] dionysus69: has joined #RubyOnRails
[17:28:08] crdpink2: has joined #RubyOnRails
[17:36:32] andrewfree: has joined #RubyOnRails
[17:37:37] MrWinner: has joined #RubyOnRails
[17:41:12] zel: has joined #RubyOnRails
[17:41:30] flopsec: has joined #RubyOnRails
[17:43:25] edwinvdgraaf: has joined #RubyOnRails
[17:46:54] pawnbox: has joined #RubyOnRails
[17:46:59] arathald: has joined #RubyOnRails
[17:48:22] asheinfeld: has joined #RubyOnRails
[17:49:07] hardtail: has joined #RubyOnRails
[17:51:04] macsteps: has joined #RubyOnRails
[17:51:35] MEATCHICKEN: has joined #RubyOnRails
[17:52:12] arnonhongklay: has joined #RubyOnRails
[17:55:33] deecross: has joined #RubyOnRails
[17:57:41] Emily: has joined #RubyOnRails
[17:58:02] Emily: has joined #RubyOnRails
[17:58:28] deecross: has joined #RubyOnRails
[17:58:47] deecross: has joined #RubyOnRails
[17:59:53] yfeldblum: has joined #RubyOnRails
[18:00:03] roamingdog: has joined #RubyOnRails
[18:00:12] Oliphaunte: has joined #RubyOnRails
[18:06:16] deecross: has joined #RubyOnRails
[18:08:25] ereboucas: has joined #RubyOnRails
[18:10:16] ereboucas: has left #RubyOnRails: ("WeeChat 0.4.2")
[18:12:39] solars: has joined #RubyOnRails
[18:15:20] joelwallis: has joined #RubyOnRails
[18:16:01] kroltan: has joined #RubyOnRails
[18:18:22] arnonhongklay: has joined #RubyOnRails
[18:21:27] conta: has joined #RubyOnRails
[18:21:58] triptec: has joined #RubyOnRails
[18:29:01] hahuang65: has joined #RubyOnRails
[18:29:45] webdestroya: has joined #RubyOnRails
[18:31:09] bdnelson: has joined #RubyOnRails
[18:31:47] macsteps: has joined #RubyOnRails
[18:34:36] mdw: has joined #RubyOnRails
[18:38:35] nk121: has joined #RubyOnRails
[18:39:42] User458764: has joined #RubyOnRails
[18:46:39] lxsameer: has joined #RubyOnRails
[18:46:43] deecross: has joined #RubyOnRails
[18:47:23] jheathco: has joined #RubyOnRails
[18:50:18] asheinfeld: has joined #RubyOnRails
[18:51:09] allcentury: has joined #RubyOnRails
[18:51:40] Devalo: has joined #RubyOnRails
[18:54:28] Oliphaunte: has joined #RubyOnRails
[18:55:33] Sashimi: has joined #RubyOnRails
[18:56:48] arnonhongklay: has joined #RubyOnRails
[19:00:53] khelair: has joined #RubyOnRails
[19:06:10] DoubleMalt: has joined #RubyOnRails
[19:08:05] theod: has joined #RubyOnRails
[19:12:34] Devalo: has joined #RubyOnRails
[19:14:51] roelof: has joined #RubyOnRails
[19:16:20] roelof: Hello, I made a api where I want to test the create function. but when I do /accounts/create in postman I see this error message : "#<ActiveRecord::RecordNotFound: Couldn't find Account with 'id'=new>",
[19:16:29] asheinfeld: has joined #RubyOnRails
[19:16:32] roelof: what did I do wrong here ?
[19:18:46] fox_mulder_cp: roelof: id=new %)
[19:19:04] roelof: when I made a post request : I see this error : "#<ActionController::RoutingError: No route matches [POST] \"/accounts/new\">",
[19:19:32] roelof: fox_mulder_cp: sorry, I do not understand what you mean with it
[19:19:59] roelof: very wierd, I always thought a create action is a post action
[19:20:02] fox_mulder_cp: roelof: create ne test app and run in it rails g scaffold account
[19:20:16] roelof: I did already
[19:20:22] fox_mulder_cp: roelof: and inspect, WHAT rails generate for u
[19:20:54] fox_mulder_cp: roelof: id = must be generated on db in server side
[19:20:59] fox_mulder_cp: not in your app
[19:21:07] roelof: i made this model : class Account < ApplicationRecord validates :name, presence: true end
[19:21:29] roelof: and this route : resources :accounts
[19:21:38] l4v2: has joined #RubyOnRails
[19:22:11] fox_mulder_cp: roelof: try to create new test app with scaffolging account. and really inspect, what it generate for u
[19:22:32] fox_mulder_cp: and compare it with your coode
[19:22:58] roelof: fox_mulder_cp: I already scaffold this in rails 5
[19:24:17] fox_mulder_cp: roelof: aand? what u se and why u post new object into /new?
[19:24:56] roelof: For that I use postman to see that
[19:26:59] fox_mulder_cp: roelof: domain_zones_path GET /domain_zones(.:format) domain_zones#index
[19:27:00] fox_mulder_cp: POST /domain_zones(.:format) domain_zones#create
[19:27:13] fox_mulder_cp: oh, sorry that
[19:27:22] fox_mulder_cp: POST /domain_zones(.:format) domain_zones#create
[19:27:39] fox_mulder_cp: why u make a POST into non-existant /new?
[19:27:41] roelof: I found that I need to use account , then I see a error message
[19:27:47] theod: has joined #RubyOnRails
[19:29:07] srinidhi1: has joined #RubyOnRails
[19:29:24] fox_mulder_cp: roelof: first - u must post into /accounts, not /accounts/new
[19:29:30] MrWinner: has joined #RubyOnRails
[19:29:32] fox_mulder_cp: by defult routes
[19:29:38] crystal77: has joined #RubyOnRails
[19:29:58] roelof: yep, I found out already
[19:33:52] diegoviola: has joined #RubyOnRails
[19:34:36] Sashimi: has joined #RubyOnRails
[19:35:28] IggyGee: has joined #RubyOnRails
[19:36:04] allcentury: has joined #RubyOnRails
[19:45:45] allcentury: has joined #RubyOnRails
[19:50:31] Rodya_: has joined #RubyOnRails
[19:54:57] Sashimi: has joined #RubyOnRails
[20:01:16] macsteps: has joined #RubyOnRails
[20:01:26] Dimik: has joined #RubyOnRails
[20:03:05] hightower2: has joined #RubyOnRails
[20:05:30] arnonhongklay: has joined #RubyOnRails
[20:14:49] siaw23: i have a failing test and the test itself here. when i visit the url visit('/topics.json') from the test i see json stuff but i’m getting this error: TypeError:
[20:14:50] siaw23: no implicit conversion of String into Integer can someone help? https://gist.github.com/siaw23/1d72eb8ebe1d8c0e8c4c9a5f3ddb1441
[20:15:33] fox_mulder_cp: siaw23: Int.parse(string)?
[20:15:47] siaw23: fox_mulder_cp: i don’t get it
[20:16:04] jhass: siaw23: could you provide the exact output of p page.html ?
[20:16:11] siaw23: jhass: yes
[20:16:48] siaw23: jhass: https://gist.github.com/siaw23/1d72eb8ebe1d8c0e8c4c9a5f3ddb1441#file-json_stuff-json-L1
[20:17:03] jhass: notice the outer []
[20:17:08] jhass: you get an array back
[20:17:15] diegoviola: has joined #RubyOnRails
[20:17:54] siaw23: jhass: this means i have to find a way to strip the outer [] right?
[20:18:29] jhass: if you're just interested in the first element in your test, just call .first on the parsed result
[20:18:41] jhass: if you never intended to return an array from that endpoint, don't do it
[20:19:16] asheinfeld: has joined #RubyOnRails
[20:19:28] jhass: in either case, don't try to strip the [] via string manipulation prior parsing nor after serialization
[20:20:24] marr: has joined #RubyOnRails
[20:20:25] siaw23: jhass: that means my test shouls say something like “json = JSON.parse(page.html).first["topics”]”
[20:20:39] siaw23: if ‘im not mistaken
[20:21:01] jhass: if you do indeed only want to test the first element of the returned array
[20:22:08] jhass: btw I don't see a "topics" key in any of your returned json
[20:22:45] jenrzzz: has joined #RubyOnRails
[20:22:45] jenrzzz: has joined #RubyOnRails
[20:23:00] jhass: perhaps you think you get a {"resource": [{instance}, {instance}, ...]} style answer where you actually get a [{instance}, {instance}, ...] style answer
[20:24:17] siaw23: jhass: yeah i was just looking and just found out there’s no “topics” key
[20:25:48] mdw: has joined #RubyOnRails
[20:25:54] ekinmur: has joined #RubyOnRails
[20:26:25] diegoviola: has joined #RubyOnRails
[20:27:34] aujt74: has joined #RubyOnRails
[20:32:03] epitron: has joined #RubyOnRails
[20:41:04] nickjj: has anyone experienced this issue with rails 5 yet? every time i try to run: rails generate --help , or any command other than rails new , the command just throws the error output for creating a new rails app
[20:41:15] xall: has joined #RubyOnRails
[20:42:35] Oliphaunte: has joined #RubyOnRails
[20:46:36] roamingdog: nickjj: i get help for using 'generate', as expected. same for just `bin/rails g`
[20:46:41] matthewd: nickjj: Are you running it from inside a rails app?
[20:47:40] nickjj: matthewd, yes and no. the same result happens in both
[20:47:52] nickjj: in the case of when i'm not, i just have a globally installed version of rails 5
[20:48:21] matthewd: If you're not inside a rails app directory, it's expected that the only thing you can do is create a new project
[20:48:25] roamingdog: nickjj: when not in a rails app, i get the error output you mention fwiw
[20:49:06] matthewd: I'm not sure why you'd see that same behaviour while inside a project, though
[20:49:18] nickjj: matthewd, probably because i manually deleted /bin
[20:49:26] nickjj: and that's likely how rails determines if you're inside a rails dir?
[20:49:49] nickjj: do you get the same results if you delete /bin inside of a rails app?
[20:49:53] arnonhongklay: has joined #RubyOnRails
[20:50:18] roamingdog: nickjj: confirmed yes
[20:50:45] nickjj: so now i'm curious why the rails team did this, it's super unintuitive
[20:51:37] matthewd: I don't think it's that it's using the presence of bin/ to detect an app, but rather that it's invoking / delegating to bin/rails when it is present
[20:52:08] matthewd: It's hopefully obvious why the global 'rails' command cannot start a console, or generate a model, when running outside of an application
[20:52:19] roamingdog: matthewd: yes, just deleting bin/rails causes same issue
[20:52:47] nickjj: matthewd, yes i get why it can't but it should throw an error rather than just dump a help menu for a command you didn't run
[20:53:47] roamingdog: nickjj: it's a standard 'usage' message - you can only use 'new' when outside an app
[20:54:02] matthewd: nickjj: How do you propose it detect that it's running from inside an application directory, if you're applying a constraint that you may have deleted arbitrary files?
[20:54:33] nickjj: matthewd, i didn't think it would use the bin/ dir for any type of detection
[20:54:52] matthewd: Again, it's currently not doing detection. But you're saying it should.
[20:55:09] roamingdog: nickjj: this isn't new to rails 5 btw, my rails 4 app here behaves the same
[20:55:10] nickjj: well, with the bin/ dir in place things work as intended, but without it, things break
[20:55:29] matthewd: Right now the logic is "if there's a bin/rails, run that; if not, use the global new-app generator"
[20:55:44] roamingdog: nickjj: again, it's not the existence of the bin directory, it's the rails stub within it
[20:55:58] nickjj: roamingdog, oh. i haven't encountered this in 4 (mainly because i never deleted the bin dir up until today)
[20:56:10] roamingdog: nickjj: why did you delete it?
[20:56:34] jenrzzz: has joined #RubyOnRails
[20:56:48] nickjj: roamingdog, it was conflicting with running bundle install --binstubs inside of a docker image along with a volume mount
[20:57:03] roamingdog: and matthewd does this mean i can reliably stop using `bin/rails` all the time? `rails` will do?
[20:57:28] nickjj: i can change the binstub path i guess to work around it
[20:58:03] matthewd: roamingdog: I believe so, yeah -- admittedly haven't actually read the code in question
[20:58:20] nickjj: yeah i believe that's the purpose of binstubs
[20:58:28] nickjj: it's so you can just run the binary straight up
[20:59:21] Sashimi_: has joined #RubyOnRails
[20:59:22] matthewd: nickjj: Recommended usage is to commit the binstubs for things you use in your application (in bin/)
[20:59:59] roamingdog: wonder why all the demos seem to use bin/rails everywhere, even recent ones
[21:00:20] nickjj: matthewd, yeah. in my case the binstubs didn't exist until after i ran bundle install --binstubs , but by that point i was mounting in "old" bin/ dir without the binstubs
[21:00:38] nickjj: but i can work around this, i just had no idea wtf rails was trying to run rails new for everything haha
[21:01:18] nickjj: thanks guys
[21:01:57] matthewd: roamingdog: I'm pretty sure David's new intro video uses bare 'rails'; I can't speak for 3rd parties :)
[21:02:04] triptec: has joined #RubyOnRails
[21:02:08] nickjj: roamingdog, it's probably due to a lot of people not really knowing, so they use what worked in the past
[21:02:18] roamingdog: finger memory, ja
[21:02:35] roamingdog: took me forever to use bin/
[21:02:45] nickjj: and prior to that you were using bundle exec?
[21:03:28] roamingdog: indeed (aliased be)
[21:05:25] nickjj: matthewd, btw rails does use a lot more than that dir to detect the presence of rails
[21:06:48] nickjj: if you have what looks like a rails app in your pwd (bin/ dir included), it will still fail because it doesn't detect any installed gems
[21:07:09] nickjj: but in this case it throws a reasonable error saying it can't find the first gem it depends on (a bundle error)
[21:08:13] matthewd: I'm confused
[21:08:33] matthewd: If it's doing something other than trying to run 'rails new', then it has already switched over to bin/rails, no?
[21:09:07] gr33nw00d: has joined #RubyOnRails
[21:09:09] roamingdog: i'd think so, since 'rails/commands' lies in bin/rails
[21:09:25] nickjj: yeah, in my case i don't have any gems installed on my actual workstation, i fully expected it to fail in this case, i just wanted to see what would happen
[21:09:31] gr33nw00d: Hello again. I'm having trouble with rails autoloading picking up my classes in app/services and app/lib
[21:09:39] nickjj: normally i'd be running all of the rails commands through a running docker container
[21:09:45] nickjj: which is where everything has been installed to
[21:10:10] gr33nw00d: on first boot in a dev environment things work as expected, but after making a change and rails hot-reloading, the Classes I've defined are not found and I get a "uninitialized constant" error
[21:10:14] matthewd: nickjj: Anyway, if you have a better strategy, I'm happy to improve it. I just don't see how we could solve the general problem of "don't do 'rails new' if I'm inside a rails app, even if I've deleted arbitrary things"
[21:10:49] matthewd: gr33nw00d: Start here: http://guides.rubyonrails.org/autoloading_and_reloading_constants.html
[21:11:10] matthewd: gr33nw00d: For further insight, we'll need to see code
[21:11:21] nickjj: matthewd, something happens internally for it to invoke the help menu for rails new instead of running what the user supplied right?
[21:11:22] gr33nw00d: THis is what I'm trying: config.autoload_paths << Rails.root.join('app/lib')
[21:11:27] gr33nw00d: I'll checkout the reading. cheers
[21:11:50] matthewd: gr33nw00d: Umm... don't do that. Why are you doing that? Don't do that.
[21:11:59] matthewd: gr33nw00d: (also, what rails version?)
[21:12:51] gr33nw00d: Hmmm, it seems that the 2 classes in my app/services folder are not being consistently loaded by rails. I thought the solution is to add them to the autoload path
[21:13:37] matthewd: nickjj: It's the other way around... unless it finds something better to do (a bin/rails to invoke), the only thing the global 'rails' command knows how to do is 'rails new'
[21:13:58] matthewd: gr33nw00d: !xy
[21:13:58] helpa: gr33nw00d: It seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
[21:14:35] nickjj: matthewd, ah. so there's really no reasonable way to print out something else?
[21:14:40] nogic: has joined #RubyOnRails
[21:15:44] gr33nw00d: matthewd - Let me try again. In rails 5 what is the preferred method of adding your own custom classes or services?
[21:15:55] matthewd: nickjj: I guess we could teach it what the other top-level commands are, so it could fail more aggressively
[21:16:41] matthewd: nickjj: Basically, instead of outputting "hey, you seem to have misspelt 'new'.. here's how to call me", it could focus on "you clearly intended to do a different thing; I can't do that right now"
[21:16:44] diegoviola: has joined #RubyOnRails
[21:17:13] matthewd: nickjj: Though that does get into some versioning issues; by design, the global 'rails' command you're running may not match the version of the bin/rails it's delegating to
[21:17:45] matthewd: gr33nw00d: Define Your::CustomClass in app/*/your/custom_class.rb
[21:18:04] nickjj: matthewd, makes sense. that's a can of worms you may not want to open
[21:18:10] gr33nw00d: matthewd thank you
[21:18:26] matthewd: gr33nw00d: But it sounds like that's what you're doing with app/lib
[21:18:46] matthewd: gr33nw00d: So I'm not sure why the result isn't then loading happily, automatically
[21:19:30] matthewd: nickjj: Also relevant: in previous versions (< 4, IIRC), 'rails foo' outside an app meant 'rails new foo'
[21:19:56] matthewd: nickjj: .. which is why said global command currently assumes, no matter what argument you supply, you were trying to create a new app
[21:20:03] nickjj: at least you changed that, because that would have been madness (i came onboard with rails 4)
[21:20:41] matthewd: Yeah.. used to be very easy to create random apps called 'c' and 's' :)
[21:21:39] matthewd: But, as that changed a while ago, perhaps it would now make sense to have 'rails new' show the full help if you get its arguments wrong, but anything != 'new' give a much briefer "You probably want 'rails new', or to run this inside an app."
[21:21:58] matthewd: I think that would be reasonable.
[21:22:08] matthewd: nickjj: Wanna make a PR? :)
[21:23:25] nickjj: a briefer warning about having to be within an app would have saved a slight headache
[21:23:48] nickjj: but it was mainly because i had no idea about how the global command worked
[21:24:11] ekinmur: has joined #RubyOnRails
[21:25:17] xall: has joined #RubyOnRails
[21:26:14] roamingd_: has joined #RubyOnRails
[21:29:38] roamingdog: has joined #RubyOnRails
[21:32:42] nickjj: matthewd, i wouldn't be completely opposed but it would take all day just to figure out where to start, i never looked at the railties source
[21:34:29] matthewd: At a glance, it looks like it'd be somewhere around https://github.com/rails/rails/blob/master/railties/lib/rails/cli.rb#L13-14
[21:35:05] matthewd: (that file gets loaded by railties/exe/rails, which is the actual executable)
[21:35:09] y2mq37: has joined #RubyOnRails
[21:36:30] Oliphaunte: has joined #RubyOnRails
[21:37:46] Devalo: has joined #RubyOnRails
[21:37:53] jheathco: has joined #RubyOnRails
[21:45:37] roamingdog: has joined #RubyOnRails
[21:49:19] roamingdog: has joined #RubyOnRails
[21:50:41] triptec: has joined #RubyOnRails
[22:08:36] duderonomy: has joined #RubyOnRails
[22:13:46] cd-rum: has joined #RubyOnRails
[22:15:24] Rodya_: has joined #RubyOnRails
[22:17:12] cd-rum_: has joined #RubyOnRails
[22:17:38] CrossFit_Jesus: has joined #RubyOnRails
[22:28:10] rubyonrailed: has joined #RubyOnRails
[22:29:02] Devalo: has joined #RubyOnRails
[22:30:27] CrossFit_Jesus: has joined #RubyOnRails
[22:30:34] Oliphaunte: has joined #RubyOnRails
[22:33:25] jenrzzz: has joined #RubyOnRails
[22:33:25] jenrzzz: has joined #RubyOnRails
[22:35:29] dsaur: has joined #RubyOnRails
[22:36:00] russt: has joined #RubyOnRails
[22:36:09] felltir: has joined #RubyOnRails
[22:41:20] dsaur: has left #RubyOnRails: ()
[22:43:41] drex: has joined #RubyOnRails
[22:44:26] SteenJobs: has joined #RubyOnRails
[22:50:31] SteenJobs: any idea why after doing a cap deploy my db schema isn’t updated on the server?
[22:50:33] macsteps: has joined #RubyOnRails
[22:50:34] roamingdog: has joined #RubyOnRails
[22:50:54] roamingdog: has joined #RubyOnRails
[23:05:22] sadaf2605: has joined #RubyOnRails
[23:14:20] siaw23: any ideas why i’m getting this error please? https://gist.github.com/siaw23/d831b677f29ad335c32e253d378b5123#file-failure-txt-L10 i have the test too if you scroll down a bit
[23:14:50] dalbuschat: has joined #RubyOnRails
[23:17:39] edwinvdgraaf: has joined #RubyOnRails
[23:24:56] Oliphaunte: has joined #RubyOnRails
[23:25:21] andrewfr1e: has joined #RubyOnRails
[23:27:36] drex: has joined #RubyOnRails
[23:33:02] rakm: has joined #RubyOnRails
[23:33:25] Devalo: has joined #RubyOnRails
[23:51:49] coffeecupp: has joined #RubyOnRails
[23:52:17] drex: has joined #RubyOnRails
[23:52:36] kroltan: is it possible to store a function in a variable directly?
[23:52:44] lupine: kroltan: almost
[23:52:54] lupine: f = method(:method_name)
[23:54:15] lupine: or f = instance.method(:name) generally works too
[23:54:30] kroltan: then if i do "somefunc method(:method_name)" i can call "method_name" from inside "somefunc"? (btw this is just curiosity, i don't intend to use that lol)
[23:55:23] lupine: not entirely sure what you mean there
[23:55:36] lupine: for instance, f = method(:puts) ; f.call("ok")
[23:55:46] lupine: will print "ok" to the screen
[23:56:13] lupine: f is just a variable, you can pass it around however you like, including as an argument to a function
[23:56:52] lupine: (f.class is Method, which is fun)
[23:56:54] kroltan: but I have to use .call to actually call it, right?
[23:57:06] lupine: yeah, you can't do f("ok")
[23:57:15] kroltan: ah okay, that was my doubt
[23:57:22] lupine: you *can* do f["ok"] though
[23:57:32] lupine: also f.("ok")
[23:57:45] lupine: welcome to ruby :D
[23:58:33] lupine: the square bracket syntax is generally frowned upon, but could be viewed as a perfectly ordinary M-expression
[23:59:27] lupine: I've never worked out why f.() works