adgtl

Activity Graph

Page 1 of 7 | Next »

2019-01-11

[04:24:24] adgtl: has joined #ruby
[04:24:32] adgtl: Is there any better way to write this?
[04:24:34] adgtl: https://gist.github.com/4f6eeefd5bd0c0edf3fa51832251665f
[04:25:18] adgtl: missing else one
[04:37:09] adgtl: mozzarella title of window. . abc.txt - myproject

2018-11-29

[08:42:27] adgtl: Folks do you have any recommended link to implement Stripe payments in Ruby on Rails application
[09:05:12] adgtl: Radar thank you

2018-11-28

[03:39:08] adgtl: Devise experts.. can someone help me to fix this issue? https://gist.github.com/4655478286cf10f3a02c00a6556109c3

2018-11-27

[15:47:28] adgtl: Folks.. how to pass current_user for controller test when we use devise?
[16:31:10] adgtl: tbuehlmann that's for rspect.. I am looking for plain minitest
[16:35:10] adgtl: that example has this
[16:35:12] adgtl: # class PostsTest < ActionController::TestCase
[16:35:13] adgtl: # include Devise::Test::ControllerHelpers
[16:35:15] adgtl: but my code has
[16:35:29] adgtl: class CatsControllerTest < ActionDispatch::IntegrationTest
[16:35:50] adgtl: see it's not ActionController::TestCase .. it's ActionDispatch::IntegrationTest
[16:38:30] adgtl: the class is ActionDispatch::IntegrationTest with Rails 5.1.6
[16:38:39] adgtl: not the ActionController one
[16:39:09] adgtl: so include Devise::Test::ControllerHelpers in controller test throws Error NoMethodError: undefined method `env' for nil:NilClass
[16:53:55] adgtl: tbuehlmann looks like this https://github.com/plataformatec/devise/issues/3913
[16:54:20] adgtl: but this code is not working after adding that snippet in test_helper.rb
[16:54:21] adgtl: assert_response :success
[16:54:21] adgtl: get pads_url, as: user
[16:54:21] adgtl: user = users(:one)
[16:54:42] adgtl: It redirects user to http://www.example.com/users/sign_in
[16:59:01] adgtl: need something simple
[16:59:13] adgtl: like sign_in create(:user)
[16:59:19] adgtl: but that doesn't work either
[17:00:01] adgtl: sign_in create(:user)
[17:00:37] adgtl: basically there is no error for line sign_in ..
[17:00:43] adgtl: but I still get redirected to '<html><body>You are being <a href="http://www.example.com/users/sign_in">redirected</a>'
[17:00:49] adgtl: even before hitting action
[17:00:55] adgtl: isnt' that weird?
[17:04:44] adgtl: so.. sign_in seems not setting proper current_user
[17:12:04] adgtl: thunderbirdtr same behaviour
[17:12:19] adgtl: it's getting redirected to /users/sign_in as I have before_authenticate for :index
[17:12:29] adgtl: I expect it to hit :index action and execute code in it
[17:15:16] adgtl: thunderbirdtr :|
[17:17:16] adgtl: thunderbirdtr yep.. I have included that in test_helper for class class ActionDispatch::IntegrationTest
[17:17:25] adgtl: thunderbirdtr something is wrong.. let me gist you the code
[17:18:38] adgtl: thunderbirdtr https://gist.github.com/4655478286cf10f3a02c00a6556109c3
[17:19:16] adgtl: updated gist with output
[17:21:33] adgtl: thunderbirdtr yeah.. but output is redirecting before hitting action
[17:21:45] adgtl: not sure what's wrong.. I can't fathom
[17:24:21] adgtl: thunderbirdtr updated gist with controller code
[17:27:27] adgtl: thunderbirdtr yes.. I am using VS Code so it saves files automatically
[17:34:55] adgtl: Devise experts.. can someone help me to fix this issue? https://gist.github.com/4655478286cf10f3a02c00a6556109c3

2018-11-23

[16:40:49] adgtl: Folks.. I have belongs_to :user association in Pad model .. but how to I relax it..
[16:41:00] adgtl: basically I mean... I want to allow creating pads without any user_id
[16:41:34] adgtl: tbuehlmann thanks

2018-11-22

[07:23:03] adgtl: Folks.. getting this error
[07:23:06] adgtl: ActionController::InvalidAuthenticityToken in Devise::SessionsController#destroy
[07:23:12] adgtl: Anyone got hint why?
[07:34:04] adgtl: sevenseacat yeh.. but that' coming from default view
[07:34:22] adgtl: I don't expect a invalid authenticity token

2018-11-21

[08:03:45] adgtl: Folks .. getting this error while creating a record with Rails console
[08:03:49] adgtl: 1: from (irb):12
[08:03:49] adgtl: Traceback (most recent call last):
[08:03:49] adgtl: (0.1ms) ROLLBACK
[08:03:49] adgtl: (0.1ms) BEGIN
[08:03:49] adgtl: irb(main):012:0> Language.create!([{name: "ruby"}])
[08:03:50] adgtl: ActiveRecord::RecordInvalid (Validation failed: Pad must exist)
[08:05:45] adgtl: ACTION sorry.. wrong AR association . ignore above question

2018-11-20

[11:33:32] adgtl: sylario for yesterdays' my question regarding error while running tests `ActiveRecord::RecordNotUnique: PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_users_on_email"`
[11:33:40] adgtl: yes I use devise

2018-11-19

[11:49:39] adgtl: Folks I am getting this error
[11:49:41] adgtl: while running tests
[11:49:45] adgtl: bin/rails test test/controllers/pads_controller_test.rb:8
[11:49:46] adgtl: ActiveRecord::RecordNotUnique: PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_users_on_email"
[11:49:46] adgtl: PadsControllerTest#test_should_create_pad:
[11:49:47] adgtl: DETAIL: Key (email)=() already exists.
[11:49:48] adgtl: : INSERT INTO "users" ("created_at", "updated_at", "id") VALUES ('2018-11-19 11:49:08.706871', '2018-11-19 11:49:08.706871', 298486374)
[11:51:43] adgtl: there is no unique index on email
[11:52:00] adgtl: wondering..

2018-11-15

[09:24:03] adgtl: has joined #RubyOnRails
[09:26:21] adgtl: Hello folks
[09:26:33] adgtl: what's the best way to add basic authentication to Ruby on Rails application

2018-04-08

[11:20:57] adgtl: has left #ruby: ()

2018-03-28

[21:18:20] adgtl: has joined #ruby

2018-03-25

[15:53:45] adgtl: Disconnected by services

2018-03-07

[00:40:10] adgtl: Remote host closed the connection
[01:29:59] adgtl: has joined #ruby

2018-02-25

[09:34:48] adgtl: *.net *.split
[09:36:29] adgtl: has joined #ruby

2018-02-23

[17:04:24] adgtl: has joined #ruby
[17:04:38] adgtl: Anyone wrote
[17:05:04] adgtl: anyone wrote Reactive web application with Ruby?
[17:05:22] adgtl: similar to Reactive Manifesto one?

2017-12-28

[12:54:32] adgtl: has joined #ruby
[12:54:48] adgtl: Radar: hey
[18:10:34] adgtl: has left #ruby: ("Using Circe, the loveliest of all IRC clients")

2017-12-04

[14:14:58] adgtl: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")

2017-11-28

[12:40:17] adgtl: Read error: Connection reset by peer
[13:07:20] adgtl: has joined #RubyOnRails

2017-11-23

[00:09:16] adgtl: Quit: bye
[00:24:34] adgtl: has joined #RubyOnRails

2017-11-18

[04:12:44] adgtl: Remote host closed the connection
[04:31:51] adgtl: has joined #RubyOnRails

2017-11-01

[10:39:27] adgtl: Remote host closed the connection
[11:36:43] adgtl: has joined #RubyOnRails

2017-10-29

[19:10:35] adgtl: Disconnected by services
[19:11:44] adgtl: has joined #RubyOnRails
[19:12:46] adgtl: Disconnected by services

2017-10-15

[03:10:23] adgtl: Remote host closed the connection
[03:27:12] adgtl: has joined #RubyOnRails

2017-10-10

[19:27:10] adgtl: Remote host closed the connection

2017-10-08

[05:08:05] adgtl: Ping timeout: 246 seconds
[05:30:19] adgtl: has joined #RubyOnRails

2017-09-28

[14:49:38] adgtl: has joined #RubyOnRails

2017-09-14

[00:37:05] adgtl: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")

2017-08-29

[05:05:28] adgtl: Ping timeout: 240 seconds
[05:08:01] adgtl: has joined #RubyOnRails
[05:38:46] adgtl: Ping timeout: 276 seconds
[05:42:53] adgtl: has joined #RubyOnRails

2017-08-28

[11:15:36] adgtl: Remote host closed the connection
[14:51:47] adgtl: has joined #RubyOnRails

2017-08-14

[23:51:22] adgtl: *.net *.split
[23:56:32] adgtl: has joined #RubyOnRails

2017-08-07

[09:29:28] adgtl: Remote host closed the connection
[09:43:45] adgtl: has joined #RubyOnRails
[17:48:55] adgtl: Quit: bye
[18:19:36] adgtl: has joined #RubyOnRails

2017-08-03

[09:47:26] adgtl: Folks.. just followed this post https://medium.com/rubyinside/action-cable-hello-world-with-rails-5-1-efc475b0208b
[09:47:43] adgtl: it says.. in dev mode.. you have can't send message from rails console to app
[09:47:51] adgtl: you have to install redis to do that
[09:47:58] adgtl: isn't that a hard limitation?
[10:48:09] adgtl: folks, adding $redis.subscribe in my controller action blocks my app https://gist.github.com/anildigital/afe3b302d68525d0b23113a907c119c6
[10:48:12] adgtl: it doesn't start
[11:04:11] adgtl: So in my app, I have Health Channel.. created using ActionCable
[11:04:36] adgtl: now I want to update UI.. based on Redis Pub Sub.. basically I want to write to Redis db .. from third party service
[11:04:41] adgtl: and Rails should reflect that fine?
[11:04:48] adgtl: Is it possible to implement this?
[11:04:50] adgtl: thank you

2017-07-23

2017-07-21

[03:11:07] adgtl: Quit: bye
[06:07:40] adgtl: has joined #RubyOnRails

2017-06-29

[08:02:51] adgtl: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[08:15:35] adgtl: Folks here .. getting this error
[08:16:01] adgtl: Folks, I am getting this error - LoadError (Unable to autoload constant FirmwareUpdate, expected /Users/anil/Projects/abc/app/models/abc/firmware_update.rb to define it
[08:16:09] adgtl: but I have defined it there
[08:16:40] adgtl: It's defined as `class Abc::FirmwareUpdate` in firmware_update.rb
[08:19:31] adgtl: universa1 https://gist.github.com/anildigital/83a29fb61df07f2582b3e32dec7ae445
[08:19:38] adgtl: universa1 there is actual code
[08:19:58] adgtl: you can see all folders under models are under `autoload_paths`
[08:20:45] adgtl: universa1 so that ruby files get autoloaded when requested
[08:21:28] adgtl: rails (5.0.1)
[08:21:49] adgtl: universa1 I have subfolders inside app/models
[08:21:55] adgtl: universa1 isn't that necessary?
[08:22:26] adgtl: universa1 are you saying that I don't need to add those lines
[08:22:31] adgtl: let me try removing and testing
[08:25:06] adgtl: universa1 after removing those lines I am getting this error https://gist.github.com/anildigital/76a7093206aa827764db342c791e4a5e
[08:26:02] adgtl: I tried both ... just 6-9 removed.. also tried 6-10
[08:26:08] adgtl: error is same in all the cases
[08:27:34] adgtl: Do you know what could be reason behind 'LoadError (Unable to autoload constant FirmwareUpdate, expected /Users/anil/Projects/abc/app/models/abc/firmware_update.rb to define it' ?
[08:27:43] adgtl: I mean. I don't expect that error from Rails
[08:28:22] adgtl: universa1 screenhero?
[08:28:35] adgtl: universa1 okay
[08:28:52] adgtl: what files do you want to see?
[08:28:59] adgtl: I had shared the application.rb
[08:29:03] adgtl: but anything else than that?
[08:31:31] adgtl: universa1 https://gist.github.com/anildigital/a47a57b97e92c9f9b93781cc05a808df
[08:36:00] adgtl: universa1 any clue?
[08:39:38] adgtl: hmm did not get you
[08:39:47] adgtl: what do you have in appliacation.rb?
[08:39:51] adgtl: is it 5.0.1?
[08:41:33] adgtl: universa1 what's there in application.rb then?
[08:43:45] adgtl: universa1 okay
[09:30:06] adgtl: universa1 hey.. I needed to something like this to fix that issue https://gist.github.com/anildigital/cb2f1d418fe0622db687b0a17b37ea37
[09:30:12] adgtl: that doesn't look legit
[09:30:20] adgtl: but does it tell anything about real problem?
[09:30:53] adgtl: I need to have both class Star and class Starling::Star in star.rb
[09:30:58] adgtl: otherwise it throws that error
[09:31:07] adgtl: bit wrong
[09:32:35] adgtl: universa1 hmm
[09:36:49] adgtl: universa1 I wonder why my app look for autoload constant Star, and autoload constant Starling::Star in same file star.rb
[09:37:00] adgtl: file usually would have only one constant there
[09:37:16] adgtl: what makes it to go for 2 constants Star and Starling::Star
[09:37:44] adgtl: who told Rails to search for both constants in same file
[09:39:11] adgtl: universa1 how to find out if 'your subdirectory is on the autoload path' is true
[09:40:31] adgtl: dminuoso https://gist.github.com/anildigital/83a29fb61df07f2582b3e32dec7ae445
[09:41:08] adgtl: dminuoso it forces me to have both class Star and class Starling::Star in same file
[09:42:25] adgtl: dminuoso don't know why.. otherwise it throws that constant not found in file error
[09:42:36] adgtl: dminuoso trying to find solution for this issue
[09:43:01] adgtl: Not sure.. how Rails gets 2 constants Star and Starling::Star to look in the same file star.rb
[09:43:10] adgtl: which is there in models/starling/star.rb
[09:43:25] adgtl: dminuoso what do you want to see.. I can share
[09:48:46] adgtl: dminuoso ?
[10:16:24] adgtl: I mean to advoid the issue
[10:16:50] adgtl: issue is that I am getting LoadError (Unable to autoload constant Star, expected /Users/anil/Projects/starling_guardian/app/models/starling/star.rb to define it):
[10:16:52] adgtl: otherwise
[10:17:25] adgtl: dminuoso hmm
[10:17:57] adgtl: dminuoso sorry....... how can I ignore that? rails is throwing error
[10:20:33] adgtl: Starling::Star
[10:20:41] adgtl: from many places
[10:21:09] adgtl: dminuoso https://gist.github.com/40124723343af39d3893d0964d630869
[10:21:35] adgtl: dminuoso error comes while loading the file
[10:22:02] adgtl: dminuoso hmm it's residing in app/models/starling/star.rb
[10:22:11] adgtl: and thats why Starling::Star
[10:22:47] adgtl: dminuoso I searched project and I could not find that something else referencing Star
[10:22:54] adgtl: I also want to know that
[10:24:31] adgtl: dminuoso sure
[10:25:28] adgtl: dminuoso here it is https://gist.github.com/254aa66dfea35c4ee80d733f43462eb1
[10:26:22] adgtl: for now use the last gist I shared.. I will udpate it
[10:27:11] adgtl: dminuoso updated gist
[10:30:26] adgtl: dminuoso I have added controllers to gist
[10:32:04] adgtl: dminuoso also added stars_controller.rb just now
[10:36:51] adgtl: naming of controller or model?
[10:38:18] adgtl: dminuoso just updated gist with wrap_parameters.rb
[10:38:42] adgtl: dminuoso include the base controller?
[10:39:25] adgtl: dminuoso did not get you
[10:39:38] adgtl: dminuoso hmm
[10:39:43] adgtl: dminuoso what to remove
[10:41:33] adgtl: Diabolik removing wrap_parameters.rb seemed to have helped.. dminuoso thanks
[10:41:45] adgtl: dminuoso ^^
[11:00:29] adgtl: Successfully installed rails-5.1.2
[11:00:29] adgtl: $ gem install rails
[11:00:30] adgtl: 1 gem installed
[11:00:37] adgtl: that command installs only 1 gem
[11:00:41] adgtl: what about other gems?
[11:28:07] adgtl: Getting an exception for a trivial piece of code https://gist.github.com/1c3b3bc1138e0085e369539f3218a026
[11:28:15] adgtl: Anyone interested to take a look there?
[11:29:20] adgtl: universa1 updated gist
[11:32:05] adgtl: universa1 thanks

2017-06-20

[00:17:17] adgtl: *.net *.split
[00:22:39] adgtl: has joined #RubyOnRails
[00:23:06] adgtl: has joined #ruby

2017-06-13

[06:20:12] adgtl: has joined #RubyOnRails
[06:20:19] adgtl: has joined #ruby

2017-06-12

[15:07:04] adgtl: has joined #ruby
[15:07:04] adgtl: Changing host
[15:07:04] adgtl: has joined #ruby
[15:07:04] adgtl: Changing host
[15:07:05] adgtl: has joined #RubyOnRails
[16:02:04] adgtl: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[16:02:06] adgtl: has left #ruby: ("Textual IRC Client: www.textualapp.com")

2017-06-03

[21:38:00] adgtl: has joined #ruby