#RubyOnRails - 12 December 2018
« Back 1 day Forward 1 day »
[00:34:56] Aces1up: as any other file added to that directory rails cannot see any modules or classes I put into it.
[02:39:58] andrew_v: anyone worked with actioncable before? all I've found for docs is the guide. want to look into what to do when people lose access to an ACL'd subscription (example: a chat room they're kicked out of)
[06:34:04] spd_25: Hello, I am new here and I want to contribute in the ruby on rails project. How should I get started?
[08:01:05] dionysus69: just for info, there's this Rails group on linkedin for those who are interested: https://www.linkedin.com/groups/13653102/
[16:23:56] cpruitt: So I have an application that mostly works with dates in UTC, but the user facing portions localize time to the user's zone. I do this by setting time zone in the controller in a before action. I have an issue in which the application works correctly, but tests following the request tests that hit the controller fail. This is because the controller is setting Time.zone and later tests inherit that config change.
[16:24:51] cpruitt: So I've set a before :each in my rspec config to set Time.zone = Rails.application.config.time_zone. That solves the problem, but I'm curious if there's a better way or if my choice of using a before action for this is not ideal. Anyone have any thoughts?
[17:42:00] syndikate: Not sure what caused this - I used draper gem, created a decorator which has a field being called itself inside a method with same name essentially going into an infinite loop. So, the app got stuck and I killed it. This somehow broke my mysql data. The table name got rewritten and I am not sure where to start debugging for this. Although, I could replace my dev data and go ahead but I want to inv
[18:23:59] TCrown: Hey all, been working on a Udemy course for ruby on rails.. I am having issues with push saying my ruby version != gemfile.. Ive tried everything, if anyone has a moment could they help me out? :D
[18:30:29] baweaver: "Paste 4+ lines of text to https://dpaste.de/ and select ruby as the language" <- Make sure to use something like that next time. IRC will kick you otherwise.
[18:34:49] TCrown: Detected a mismatch between your Ruby version installed and Ruby version specified in Gemfile or Gemfile.lock.
[19:01:13] TCrown: Could someone please assist me if they are available? New to ruby on rails. Having issues with push & deployment on heroku. getting error ' Failed to install gems via Bundler.
[19:01:13] TCrown: <TCrown> Detected a mismatch between your Ruby version installed and Ruby version specified in Gemfile or Gemfile.lock.'
[19:17:58] Inside: 1) What does your Gemfile look like? Does it have a 'ruby 'X.X.X' directive at the top?
[19:18:24] Inside: The error basically means that the version of ruby installed on the server is not the same as the version of ruby that is specified by your Gemfile
[19:26:29] TCrown: Yes my gemfile does. i edited it to say ruby 2.5.0. ive troubleshot through heroku, but ill give that link some love too
[19:26:53] TCrown: I did change the version in the gemfile.lock at one point, but have used RVM to change my ruby version and bundler install since
[19:35:56] TCrown: ruby -v returns 2.5.3p105, but when i push to heroku it says 2.5.1 is specified and 2.5.3 is in gemfile.lock
[19:38:34] Inside: 2) You should be able to change Gemfile to have ruby '~> 2.5' like I said, then run bundle install to change your Gemfile.lock
[19:39:19] Inside: When you do that you're basically saying 'it's okay if I developed on 2.5.3, but the server has 2.5.1'
[19:41:04] TCrown: This was unexpected...: Your Ruby version is 2.3.4, but your Gemfile specified ~> 2.5
[19:44:24] TCrown: i got it! Thanks for your help inside.. Just having it explained in words did the trick
[19:48:44] context: anyone here use activejob + sidekiq? im trying to schedule a job in the future but it never shows up in sidekiq
[20:06:24] TCrown: Still not totally sure.. But i set ruby to 2.5.1, bundle install, and pushed it to heroku again and it worked.. although when i open the page it says application error lol.
[20:11:04] context: i see the job[s] in the redis key "schedule" but something tells me thats not where sidekiq is looking
[20:45:14] baweaver: TCrown: "Paste 4+ lines of text to https://dpaste.de/ and select ruby as the language" <- Make sure to use something like that next time.
[20:46:10] baweaver: Heroku typically has good docs if you search around, I know some of the folks who write them and they try and make sure to document common errors like that.
[21:55:39] MasterAsia: I have a contact form, what controller/endpoint should be used for submitting it