Activity Graph

Page 1 of 2 | Next »


[04:57:18] blackcross: has joined #RubyOnRails


[19:37:54] blackcross: has joined #RubyOnRails


[19:03:09] blackcross: has joined #RubyOnRails


[18:03:26] blackcross: has joined #RubyOnRails
[19:14:27] blackcross: has joined #RubyOnRails


[21:37:51] blackcross: has joined #RubyOnRails


[20:31:30] blackcross: has joined #RubyOnRails


[19:59:58] blackcross: has joined #RubyOnRails


[17:20:19] blackcross: has joined #RubyOnRails



[17:54:26] blackcross: has joined #RubyOnRails


[05:59:07] blackcross: Ping timeout: 240 seconds


[01:34:58] blackcross: has joined #RubyOnRails


[06:18:07] blackcross: Ping timeout: 240 seconds


[13:20:35] blackcross: andywww, route should to have an array of markers [id's], in source to destination manner, would be my suggestion
[13:21:22] blackcross: using has_many doesn't accomplish this goal because 2 markers are not guranteed to be a minimum distance from each other


[01:44:56] blackcross: has joined #RubyOnRails
[01:46:58] blackcross: when using RoR as a backend API only, what is the most popular front-end framework to couple with in your opinions or statistically? I see a lot of React, but I've also looked at Marko (ebay front-end) and AppRun


[22:40:36] blackcross: Ping timeout: 260 seconds


[00:22:55] blackcross: has joined #RubyOnRails
[02:38:18] blackcross: Ping timeout: 268 seconds
[03:18:06] blackcross: has joined #RubyOnRails



[13:54:00] blackcross: has joined #RubyOnRails
[15:11:25] blackcross: run rails db:migrate



[00:03:40] blackcross: Ping timeout: 264 seconds


[10:20:18] blackcross: has joined #RubyOnRails


[04:18:48] blackcross: Ping timeout: 245 seconds


[11:34:23] blackcross: dionysus69, go with whichever has the lowest intranet, interconnect, and/or (local) latency. For example, AWS latency from their S3 (storage) to their EB (scaling servers) is pretty horrible.
[11:34:56] blackcross: honestly, buying/renting your own barebones and setting them up properly is the best way to go, in my experience
[11:48:43] blackcross: oh, then go with whatever has the lowest intra-network latency between storage and nodes
[11:49:16] blackcross: you can also always just rent a dedicated server from rackmount
[11:50:34] blackcross: i personally use buyvm, best bang for the buck and 500GB DDOS protection
[11:52:55] blackcross: buy you may not want to bother with all the security and setup, so i'll check Google Kubernetes Engine vs heroku for u
[11:58:06] blackcross: dionysus69: go with heroku


[04:31:15] blackcross: it's 7000 <tr><form><td><input></td>...<td><input></td></form></tr> so in rows
[04:31:26] blackcross: cause there are 7000 lines in a batch
[04:32:19] blackcross: it's not 1 massive form
[04:32:25] blackcross: it's 7000 individual <forms>
[04:32:54] blackcross: Radar, I guess, and use pagination?
[04:34:16] blackcross: gotcha, guess that'd work, just a lot harder to find things, having to randomly click a page # and hope it's near the manufacturer u want
[04:34:39] blackcross: unless they are searching for some individual item's attribute :(
[04:35:15] blackcross: i'm just surprised that at this day and age, a web browser can't load 7000 <tr> forms </tr> quickly
[04:35:36] blackcross: i work with them directly, so i can
[04:35:50] blackcross: i'm by far not a UX designer though, just backend coder with some RoR knowledge
[04:36:59] blackcross: that isn't the problem though, i don't believe, cause when we load the page with no <form> elements, it loads in 3 seconds
[04:37:57] blackcross: ohhh that's a great point, every line does have a rails routing link
[04:38:40] blackcross: and the rails routing link isn't rendered in the raw table data page
[04:38:52] blackcross: so that is probably it, rails having to render 7000 rails routes as the page loads
[04:40:22] blackcross: ty for the help Radar, that one sentence probably solved the problem, about rails routing, i'll let you know results tomorrow :)
[09:28:20] blackcross: Radar: didn't work, still takes 60s for the form page to load, and 15s for the form-free page to load, i'll try javascript <tr> replacement after page is loaded and see if that makes it goto 15s~, so 7000 link_to's was not the problem afterall :(
[09:34:59] blackcross: i noticed on my staging server (which i dev on), that 4 DB caches are being hit and 1 serial for every item (7000 items), I have eager_load enabled, so that's 28,000 cache hits and 7,000 DB queries, how would I go about doing this in 1 big query? or should i post my .html.erb source?
[09:41:10] blackcross: my _table_staff.html.erb =
[09:48:34] blackcross: ^--- that takes 60s to load and this (without forms) takes 15s to load =>


[00:46:54] blackcross: has joined #RubyOnRails


[09:29:05] blackcross: Ping timeout: 248 seconds


[15:45:42] blackcross: has joined #RubyOnRails



[00:07:16] blackcross: *.net *.split
[00:15:25] blackcross: has joined #RubyOnRails


[21:08:55] blackcross: I have @company =, how would I force every value in company_params to be .upcase ?


[18:36:10] blackcross: Ping timeout: 268 seconds
[20:06:55] blackcross: has joined #RubyOnRails


[12:14:45] blackcross: has joined #RubyOnRails


[22:17:08] blackcross: I have an admin_controller def get_whitespace ( length) that returns a string with length # of spaces. I want to be able to call this inside of views/admin/index.html.erb : <%= get_whitespace ( 8 ) %>, but I receive an "NoMethodError in Admin#index" error, how should I call the get_whitespace or how do make it callable in the template?


[00:47:05] blackcross: inradius: make jquery add the required attribute to the Other text input
[17:05:33] blackcross: has joined #RubyOnRails
[18:27:23] blackcross: has joined #RubyOnRails


[02:35:21] blackcross: you should use postgresql or mysql for production is my opinion


[16:03:52] blackcross: If I have a one to many association of model User to model Company, am I able to do UserInstance.companies.create(args)? and have that create company and associate to UserInstance?
[16:05:15] blackcross: found the answer :)


[21:03:56] blackcross: pastebin the output


[18:22:01] blackcross: how do I pass #something in a example_path(:arg1 => 'fubar') ? so it goes to ?
[18:22:23] blackcross: err so it goes to ?
[18:37:49] blackcross: found it, have to use :anchor => 'anchor_id"


[12:29:24] blackcross: NL3limin4t0r: .dup makes a shallow copy, so the id and i believe relationships are nil'd.
[12:30:33] blackcross: you'd have to call some_object_copy =, then set the relationships you want


[16:43:54] blackcross: Ping timeout: 260 seconds
[21:40:52] blackcross: has joined #RubyOnRails


[11:13:28] blackcross: has joined #RubyOnRails


[09:31:18] blackcross: has joined #RubyOnRails
[09:47:54] blackcross: has joined #RubyOnRails


[06:28:35] blackcross: Ping timeout: 245 seconds


[22:56:21] blackcross: has joined #RubyOnRails


[19:25:37] blackcross: Ping timeout: 245 seconds


[02:25:39] blackcross: has joined #RubyOnRails



[11:14:13] blackcross: Read error: Connection reset by peer
[11:14:37] blackcross: has joined #RubyOnRails


[15:52:30] blackcross: MrCrackPotBuilde: maybe try accelerate:50%
[15:53:41] blackcross: MrCrackPotBuilde:
[15:54:10] blackcross: :playbackspeed => 0.5


[21:56:29] blackcross: Dbugger: read the comments in your post, they explain your problem :)


[17:23:33] blackcross: Anyone know of a good free CRM made for ruby on rails? I am trying fat_free_crm, but it looks like the Advanced Search is broken
[17:48:05] blackcross: fox_mulder_cp: what do you mean by it's a say to fixit? :)
[17:59:58] blackcross: Looking for ruby developer that can fix a bug in fat_free_crm for me. Will pay well.


[00:36:51] blackcross: I want to have two model fields that reference a User, namely item.verified_by and item.created_by, what is the best way to implement this? just have verified_by and created_by use an integer to reference or what?


[19:42:25] blackcross: tuskkk___, if you have an API available, you don't need rails, what you're asking about is more javascript than 'rails' specific
[19:43:08] blackcross: tuskkk___:
[19:43:31] blackcross: has streams, broadcasting, subscription, etc
[19:46:12] blackcross: list of IPs is stored as json, model instance, or what?
[19:47:09] blackcross: how is the API accessed?
[19:48:41] blackcross: and the AWS SDK accesses it how? RESTful API?
[19:54:44] blackcross: i don't see a problem with that pseudo code, so what do you want to do after all the loops finish?
[20:00:05] blackcross: add after end of inner loop if you want it saved, otherwise create an array @models = [] or collection @models = {}, and at the end of the inner loop, have models.append(model) or models << model depending on if u are using an array or collection, then just do return models or render json: models
[20:00:14] blackcross: depending on how you want to send it to the client


[12:24:06] blackcross: has joined #RubyOnRails


[10:58:35] blackcross: has joined #RubyOnRails


[08:04:29] blackcross: timdotrb, how is the disk space and memory usage?
[08:04:39] blackcross: is mongodb running?
[09:40:28] blackcross: Ping timeout: 240 seconds


[17:30:56] blackcross: I have a "def get_cache_ndc" in line_items_controller.rb, how would I include this in another controller? namely, "home_controller.rb"
[17:36:36] blackcross: it queries a model, @line_item = line_item.find_by(drug_code: CODE) and if it finds it, returns @line_item, if not, it queues 10 other models, and copies all those attributes into a, then returns @line_item
[17:36:58] blackcross: yes, it's necessary to use it in 2 controllers
[17:38:42] blackcross: so how would i just include that 1 "def get_cache_ndc" into another controller? I tried require get_cache_ndc and require line_item_controller, and include line_item_controller and include get_cache_ndc, but none work
[17:39:09] blackcross: i am pretty sure this is just basic ruby i am asking about, but even google doesn't have documentation on how to directly include 1 definition
[17:42:11] blackcross: looks like i can do "require line_items_controller.rb", but this makes all the definitions accessible, which i do not want
[17:47:58] blackcross: awesome, so modules go in concerns
[17:55:01] blackcross: I went with the first option, using modules seems cleaner in the long run
[17:55:11] blackcross: thank you for the help and especially this gists


[06:14:09] blackcross: Radar, and yebyen, it is in production, i just have run as local as true to try to find how to fix the assets problem. Radar, how did you check if the routes require a password, also, what form is broken?
[06:15:57] blackcross: I ended up changing all the css/js in the <head> to use <%= asset_path 'filename.ext' %> with filename.ext also being added to the initializers/assets.rb
[06:17:57] blackcross: hm, do i not need the <%= asset_path 'filename.css' %> then, since everything is compiled into <%= stylesheet_link_tag "application" %> ?
[06:18:08] blackcross: as long as it's in the initializers/assets.rb file, right?
[06:18:49] blackcross: god, this seems like it'd be a nightmare for a UX/UI designer that didn't know rails
[06:19:21] blackcross: what is a more modern webkit/or-whatever way to handle assets in rails?
[06:20:01] blackcross: ya, i want to go to that in v2 of the website
[06:20:44] blackcross: but this website will be used by hospitals with javascript on lockdown, so have to account for 'legacy' browsers like that
[06:20:57] blackcross: 'locked down' browsers


[13:41:28] blackcross: $('#line_item_SizeOfPackage').val($('#line_item_SizeOfPackage').val()+"1")
[13:41:28] blackcross: This is more of a coffeescript question, tried googling it, but to no successful solution. I have:$('#inc_SizeOfPackage').click ->
[13:42:28] blackcross: inc_SizeOfPackage is a button, line_itemSizeOfPackage is a form input number field, when I click the button, and the value is 1 for instance, it makes it 11 instead of 2
[13:42:34] blackcross: I have also tried with just +1
[13:43:47] blackcross: and when i do: number = parseInt( $('#line_item_SizeOfPackage').val(), 1) and number+1, this just clears the field entirely
[14:35:29] blackcross: How would I increase an integer in a form number input field? I tried $('#SizeOfPackage').val($('#SizeOfPackage').val()+1) but this changes it from 1 to 11 instead of 2
[14:47:06] blackcross: ok, ty, had to use Number()
[20:55:14] blackcross: Anyone familiar with getting assets working in production? It's the last problem I have. Willing to pay hourly for a fix. Can give you teamviewer access.
[21:20:31] blackcross: I have deployed my development code to production. I am using passenger and nginx. is the website. "/assets/application-CHECKSUM.js" works and "/assets/application-CHECKSUM.css" works, but none of the other assets can be found. What could be the cause of this? I have ran rails assets:precompile as well.
[21:22:23] blackcross: I also checked in my /home/username/app_name/current/public/assets folder and see the application-CHECKSUM.js and application-CHECKSUM.css files, but none of the other js or css files in my /home/username/app_name/current/assets folder
[21:23:54] blackcross: are all the css and js folders being compiled into the application*.js and application*.css files? I would think not, since the website doesn't look like it has any css


[12:25:40] blackcross: *.net *.split
[12:27:32] blackcross: has joined #RubyOnRails
[15:01:10] blackcross: *.net *.split
[15:03:06] blackcross: has joined #RubyOnRails


[18:43:28] blackcross: Is there a LTS version of rails that will have security updates maintained?
[18:44:33] blackcross: seems like the X.2.Y verions are the longest maintained, is this correct?


[01:28:19] blackcross: has joined #RubyOnRails



[04:57:31] blackcross: has joined #RubyOnRails
[05:47:14] blackcross: Anyone have a recommended up to date (within 1 year) Ubuntu 16.04 guide for setting up rails in production?
[13:40:54] blackcross: Anyone have a recommended up to date (within 1 year) Ubuntu 16.04 guide for setting up rails in production?
[13:42:37] blackcross: or just how to setup a rails 5 production server on barebones? I can install any OS
[13:47:09] blackcross: will take a gander at it, ty
[13:53:06] blackcross: Good mini tutorial, but it doesn't explain how to setup nginx/apache, and any of the many app servers and setup the asset pipeline.
[13:54:48] blackcross: I have my production server setup using capistrino, passenger, nginx, postgresql, and it's serving fine, but I am unable to run rails c production to import lots of .txt data into the database. That is my real problem, I keep getting a devise error that secret_key is missing from the devise initializer, but it is there, so no idea why i keep getting the same error when running rails c
[13:54:49] blackcross: production. Anyone have a suggestion?
[14:09:38] blackcross: I can see why rails devs get paid so well, it's a nightmare to go from development to production, with all the security, assets, database loading, woo!
[14:33:22] blackcross: secret_key_base is not used for database encryption, aside from session data, correct? I can export from a test database and import that into a production database with no problems?



[16:27:46] blackcross: Ping timeout: 246 seconds


[13:37:27] blackcross: how would i make an associate with a model Company and a model Shipment where Shipment would have a ship_from_company and a ship_to_company?
[13:37:57] blackcross: should i use 2 intermediate tables, or has_and_belongs_to_many or what?
[14:01:01] blackcross: msg nickserv ghost cgibsonmm cg359997


[18:34:44] blackcross: Ping timeout: 260 seconds
[21:44:22] blackcross: has joined #RubyOnRails


[13:10:10] blackcross: has joined #RubyOnRails
[14:21:39] blackcross: Read error: Connection reset by peer
[14:28:16] blackcross: has joined #RubyOnRails
[14:39:07] blackcross: has joined #RubyOnRails


[05:14:07] blackcross: has joined #RubyOnRails
[18:06:01] blackcross: has joined #RubyOnRails


[00:40:08] blackcross: has joined #RubyOnRails


[02:08:13] blackcross: Read error: Connection reset by peer
[02:29:14] blackcross: has joined #RubyOnRails
[02:55:44] blackcross: has joined #RubyOnRails
[22:32:26] blackcross: I have gem 'ups-ruby', '~> 0.9.6' in my Gemfile, and I have ran bundle install, when I am in rails console, and type "require 'ups-ruby'" as well as require 'ups', both give me the error "LoadError: cannot load such file -- ups-ruby" and "LoadError: cannot load such file -- ups" What am I doing wrong for rails not to be able to load ups or ups-ruby, even though bundle install saids it is


[00:05:17] blackcross: camp_act_path is the path to a controller and @camp is an instance


[16:14:35] blackcross: has joined #RubyOnRails


[19:25:10] blackcross: What is a recommended gem for United Parcel Service (UPS) API integration? Any besides these: ?
[22:34:53] blackcross: Ping timeout: 240 seconds


[06:15:54] blackcross: and neither work
[06:15:54] blackcross: I have <input type="text" id="serial_id" value=<%= @serial_id %> /> in a _form.html.erb for creation of a LineItem model instance, serial_id is not a field in LineItem, but is needed to have LineItem added to a Serial after creation, How would i get the serial_id from the input in def create? I have tried @serial_id = line_item_params[:serial_id] as well as @serial_id = params[:serial_id]
[06:20:46] blackcross: I want to be able to use but have no idea on how to pass or get @serial from inside my LineItem's def create. Any help would be appreciated.
[13:53:15] blackcross: When clicking a link in rails 5, javascript no longer works on the new page until I reload the page, how do i fix this?
[13:53:53] blackcross: and what is causing it, i looked the page source code, and it looks like it should of loaded the javascript, it is no different than when i reload the page, but the javascript works when i reload the page or manually enter the page url
[13:59:25] blackcross: lol, ok, whole website is based off turbolinks isn't it? like, link_to has to use turbolinks or no?
[14:06:35] blackcross: yes that worked
[14:07:13] blackcross: so how do i go about making my coffeescripts autoload now at the end of the pages with <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> removed?
[14:09:54] blackcross: I have my code in app/assets/javascripts/ for example
[14:10:57] blackcross: and then i have at the in my _footer.html.erb file
[14:13:43] blackcross: It looks like I can just remove //= require turbolinks from app/assets/javascripts/application.js and leave the "<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>" in my _footer.html.erb and that loads all my javascript assets and javascript still works, is this OK to do or is it bad practice?
[14:17:57] blackcross: i just learned turbolinks uses ajax to replace the body, so it fucks over any footer javascript (in the body), so i will just disable it
[14:18:05] blackcross: ty for all the help dminuoso
[14:19:20] blackcross: ahh, explains how to make everything work without turbolinks :)
[14:20:34] blackcross: dminuoso, how would i go about fixing javascript not working when using turbolinks then? Is there a up to date guide?
[14:21:10] blackcross: ty will read


[00:24:23] blackcross: has joined #RubyOnRails
[00:32:09] blackcross: d_belongs_to LineItem, and Manifest belongs to 1 User and 1 Company ?
[00:32:09] blackcross: I have 4 models, User, Company, LineItem, and Manifest. company.rb contains has_and_belongs_to_many :users and user.rb contains has_and_belongs_to_many :companies . I also have ran rails g migration CreateJoinTableCompanyUser Company User . What would be the best way to implement LineItem has_many_and_belongs_to Manifest, LineItem belongs_to 1 User and 1 Company, and Manifest has_many_an
[00:33:43] blackcross: also, I am wondering if I should make User and Company associated with each other through an Employment model, thoughts?
[00:34:41] blackcross: user creates an account, registers a company or 3 companies, each company can have seveal manifests that contain line items
[00:35:30] blackcross: and the user may also work for more than 1 company as well
[00:39:39] blackcross: thank you guacamole, I am now thinking that I can have User and Company associated to LineItem through a Manifest model
[00:41:11] blackcross: no need for the keyword through?
[00:42:30] blackcross: guacamole: like
[00:43:29] blackcross: user has_many :line_items, through: manifests
[00:43:35] blackcross: ahh, answered my own question :)
[00:43:57] blackcross: ty for your help! i appreciate it
[21:43:31] blackcross: I have a <%= link_to 'RX', new_manifest_path %>, which links to a creating a new Manifest model instance, how would I pass in a parameter via url in the link_to? such as, :name => 'RX' ?
[21:46:22] blackcross: so I see that it directed to http://***:8080/manifests/new?name=RX, how would I go about reading that into the def new controller? sorry for such newbie questions, the tutorial i followed didn't cover this
[21:48:31] blackcross: figured it out


[14:36:14] blackcross: looks like has_and_belongs_to_many is the best bet, unless there is something better...