ksinkar

Activity Graph

Page 1 of 1

2017-12-14

[07:31:03] ksinkar: has joined #RubyOnRails
[07:31:48] ksinkar: Hello guys has anyone used stubbing extensively here with rspec? I am trying to create a stub a method onto my object that takes parameters and I do not know how to do that. I only how to stub methods onto objects.
[08:41:39] ksinkar: Ping timeout: 256 seconds

2017-05-04

[07:46:28] ksinkar: has joined #ruby
[07:51:37] ksinkar: Just read a function signature similar to `def some_function(param_a:, param_b:, param_c:)` Any idea what is the meaning of these params with a colon at the end of the identifier. In the function body they are simply being accessed as `param_a` and there seems to be nothing special about `param_a:` in the the argument list.
[08:21:32] ksinkar: havenwood: thanks
[11:12:27] ksinkar: Ping timeout: 240 seconds

2017-04-25

[14:40:06] ksinkar: has joined #RubyOnRails
[17:35:08] ksinkar: Quit: Asta la vista

2016-07-26

[07:47:23] ksinkar: has joined #ruby
[08:05:05] ksinkar: Read error: Connection reset by peer
[08:30:12] ksinkar: has joined #ruby
[13:49:49] ksinkar: Ping timeout: 258 seconds

2016-07-25

[12:35:06] ksinkar: has joined #ruby
[12:38:23] ksinkar: Is there any way to detect a yield block has been provided to a ruby method? Similar to the way count works, with a block passed to it, without a block passed to it.
[12:39:33] ksinkar: dminuoso: thanks
[14:31:31] ksinkar: Ping timeout: 240 seconds

2016-06-11

[04:02:01] ksinkar: has joined #RubyOnRails
[08:50:04] ksinkar: Ping timeout: 244 seconds

2016-06-10

[08:02:59] ksinkar: has joined #ruby
[08:04:34] ksinkar: has anyone here used the Ruby Shell library recently? I am using it, but other than echo, I cannot access any other shell commands which are available in my shell through my PATH.
[08:50:06] ksinkar: Ping timeout: 258 seconds

2016-06-09

[02:33:41] ksinkar: has joined #RubyOnRails
[02:33:59] ksinkar: has joined #ruby
[08:40:07] ksinkar: Ping timeout: 252 seconds

2015-04-25

2014-12-31

[12:55:25] ksinkar: is there any existing helper method or predefined method in ruby or rails to display a number 1 as 1st and 2 as 2nd and 3 as 3rd and 4 as 4th correctly?

2014-11-19

[13:00:58] ksinkar: is anyone here using ruby-saml?
[13:04:59] ksinkar: I am using ruby-saml for SAML authentication for my RoR app. Now ruby-saml does not have support for encryption. There are a couple of forks out there that support encryption. I want to know if any of you have used that and could share your experiences?

2014-11-07

[06:06:14] ksinkar: sevenseacat: https://gist.github.com/5715306e467caf742ae6 https://gist.github.com/be9b3c2aa38a4778d2c7 https://gist.github.com/a80fef2093d68e8adfd4 ; these are the $bin/rake routes o/p, routes.rb file, and the spec/integration file where I am getting errors of path not found
[06:12:37] ksinkar: Radar: I am using the gist gem commandline. hence the multiple gists. The error is when I run the integration spec, it gives me unknown method or variable error for my routes. I am not able to explain why.
[06:14:32] ksinkar: Radar: I though prefer gist so that they can clone the code from their command line rather than having to use the browser.
[06:21:38] ksinkar: Radar: the error https://gist.github.com/ksinkar/848854775dec4b2dc033
[06:23:18] ksinkar: Radar: I had run these tests 6 months back and they ran without including the rails_helper. Why do I have to do it now?
[06:23:54] ksinkar: tmoore: thanks for the advice. I had done that earlier but did not know about the rspec3 upgrade and hence the mistaken assumption.
[07:04:54] ksinkar: Radar: thanks for your help with the rspec3

2014-11-06

[07:24:53] ksinkar: hello people, I am running rspec tests which are all giving errors (not failing). These tests are not able to identify the path like root_path, signin_path and so on. while rake routes shows all these paths. rspec throws an error saying 'undefined local variable or method'. Any ideas of what could be the problem? BTW I have already set the cache_store to NULL in my test.rb
[07:34:09] ksinkar: rvanlieshout: http://ur1.ca/ipmye o/p of my $bin/rake routes
[07:34:54] ksinkar: rvanlieshout: http://ur1.ca/ipmyo my config/routes file
[07:35:36] ksinkar: sevenseacat: I will just give one spec file
[07:38:09] ksinkar: sevenseacat: http://ur1.ca/ipmz3 http://ur1.ca/ipmyo http://ur1.ca/ipmye, here are the three files

2014-10-28

[06:05:07] ksinkar: hello, I am using the mysql2 gem as the db connector for my RoR application. The mysql server on my machine is not listening to the TCP/IP port yet I am able to run rake db:migrate in spite of NOT having specified where the unix socket file is.....
[06:05:49] ksinkar: Shuttle: development environment
[06:06:05] ksinkar: Shuttle: but how does one explain that behaviour
[06:10:43] ksinkar: Shuttle: I just looked at config/environments/development.rb and I do not see any special settings that will connect the ROR to MySQL over UNIX socket; do you have anything specific in your mind? Can you help me understand what is happening?
[06:13:51] ksinkar: kp666: http://ur1.ca/ikt4f
[06:14:39] ksinkar: kp666: and my socket is at /var/lib/mysql/mysql.sock
[06:14:48] ksinkar: Shuttle: http://ur1.ca/ikt4f
[06:17:46] ksinkar: kp666: yes it was commented earlier as well
[06:18:26] ksinkar: kp666, Shuttle: also JDBC is not able to connect to MySQL due to the TCP being down
[06:22:25] ksinkar: kp666: output of `netstat -lnp | grep mysql` is
[06:22:37] ksinkar: unix 2 [ ACC ] STREAM LISTENING 3934122 14443/mysqld /var/lib/mysql/mysql.sock
[06:27:55] ksinkar: sevenseacat: why not systemd?
[06:35:36] ksinkar: Shuttle: thanks for hearing me out. I am just trying to understand this particular behavior. If you stumble across the answer, send me a memo.
[06:39:57] ksinkar: sevenseacat: hi

2014-10-14

[09:26:08] ksinkar: hello, I have started using rails dbconsole recently to connect to the SQL client of my DB. But I am perplexed by the fact that I am asked the password to access the SQL client inspite of having stored the password in the config/database.yml . Why "$ rails dbconsole" not provide for the password from the configuration file?
[09:30:49] ksinkar: rhizome: it worked. But I distinctly remember that it used to work without the -p option earlier. IMHO it should supply the password without any flag as it is a natural expectation and more intuitive given the way other "$ rails console" or "$ rails server" works.
[09:43:53] ksinkar: rhizome: I guess then the -p behaviour was for an account with postgres db with full trust
[09:44:03] ksinkar: rhizome: thanks for your help anyway

2014-07-29

[09:59:14] ksinkar: why does omniauth have separate strategies for twitter, facebook and linkedin inspite of the fact that all of them follow the OAuth2.0 specification?
[10:05:12] ksinkar: workmad3: got it. thanks.
[10:10:57] ksinkar: workmad3: does oauth2.0 make openid oboselete?
[10:11:37] ksinkar: workmad3: http://openid.net/developers/specs/
[10:13:58] ksinkar: which are the ones that are worth supporting?
[10:14:18] ksinkar: SAML2.0, OAuth2.0 definitely are worth supporting
[10:14:28] ksinkar: does it make sense to support openid?
[10:15:17] ksinkar: workmad3: and yes oauth2.0 oboseletes the oauth1.0 spec
[10:15:37] ksinkar: workmad3: you should read RFC 6749
[10:16:34] ksinkar: workmad3: I am talking as an application service provider and not an identity provider.
[10:17:52] ksinkar: workmad3: I have read that post about oauth2.0. I think SAML2.0 has done a better job.

2014-06-30

[06:50:36] ksinkar: anyone here using the debugger with passenger?
[06:58:06] ksinkar: rvanlieshout: will it work with the multiprocess environment of passenger?
[07:01:02] ksinkar: sevenseacat: on the staging server, not production. The problem is that I am building something that needs a public facing DNS entry which is accessible from the internet outside our intranet. It is a configuration with an API service that needs the URL endpoints on both the sides. I am trying to make it work and hence I need a debugger on my staging environment which is running phusion passenger builtin as apache module

2014-06-18

[05:31:14] ksinkar: I am looking at the devise gem and am trying to understand its structure. It has lib/devise/controllers/*.rb as well app/controllers/*.rb . I am trying to understand the structure behind the gem? How are files getting included? Can anyone help?
[05:36:04] ksinkar: sevenseacat, rvanlieshout: I got that point. Now I am not able to figure out how is the code in app/controllers and app/helpers being included in a Rails app that uses the Devise gem?

2014-06-05

[10:01:30] ksinkar: Does it where in our class definition or module definition we include external classes or modules?
[10:01:54] ksinkar: Pardon me, I meant "Does it matter where in our class definition or module definition we include external classes or modules?"
[12:51:41] ksinkar: I am writing the yaffle rails plugin as illusrated on http://guides.rubyonrails.org/plugins.html and at the end of the tutorial when I am running tests for the instance methods of the Hickwill and Wickwill class, I get an error saying that no such tables exist. But go to the dummy directory and start rails console there, I get the tables, objects etc. as expected. Any pointers?
[12:55:41] ksinkar: sorted, the migrations hadn't run for the test db but only for the dev db

2014-05-15

[06:20:41] ksinkar: why do we have the vendor directory in rails 4.1?

2014-04-18

[05:20:44] ksinkar: I am compiling ruby from source. Do I have to pass any specific flags to the ./compile if I want to compile my ruby with readline support?
[05:28:14] ksinkar: havenwood: CentOS 6
[05:29:08] ksinkar: havenwood: after having installed ruby and then deployed a rails application, I found that $rails console will not work because of readline errors
[05:30:51] ksinkar: havenwood: yes, readline-devel is installed.
[05:31:23] ksinkar: havenwood: I am not sure if it was installed the first time I compiled ruby. Hence, compiling it again. Will keep you posted
[05:40:12] ksinkar: havenwood: yes, recompiling ruby worked. Thank you for the help.

2014-04-17

[13:49:56] ksinkar: has anyone done here a multitenant installation of a rails application and a nodejs application with passenger?

2014-03-26

[06:16:54] ksinkar: when I am using post and get methods in my rspec tests, why can I not use the default capybara methods?
[06:41:03] ksinkar: TigerWolf: ok
[06:44:17] ksinkar: If I have called delete or get or post (ActionController::TestCase::Behavior methods) etc in my before block, should Capybara kick in if I check for pages to be shown as a result of those HTTP methods being sent to my server?
[07:03:33] ksinkar: helpa: https://gist.github.com/ksinkar/9778078#file-user_pages_spec-rb-L52 why does that line fail?
[07:04:01] ksinkar: Radar: https://gist.github.com/ksinkar/9778078#file-user_pages_spec-rb-L52 why does that line fail?
[07:06:29] ksinkar: Radar: have_selector
[07:06:42] ksinkar: I thought that was a capybara method
[07:09:01] ksinkar: Radar: I guess that answers your question

2014-02-25

[15:03:19] ksinkar: I just read matz post which advices to commit your Gemfile.lock if you are doing an application. But most of use rails developers always have a set of gems that are specific to our development machine, which get listed in our Gemfile.lock. In that case how do we propagate a production only Gemfile.lock? Is there an standard procedure that is followed in this regard?
[15:05:39] ksinkar: Hates_: gems like wirble, debugger, pry etc are dev gems which are not required in production.
[15:06:12] ksinkar: Hates_: yes they are in the development group.
[15:07:06] ksinkar: ok, got it. But it still leaves the problem that different developers may have different preferences to the kind of specific gems that they use.

2014-02-21

[07:12:55] ksinkar: What is the best way to write XML documents in ruby 1.9.3?
[07:13:04] ksinkar: and above...
[09:38:37] ksinkar: I am trying to build an XML file. Now if one use Nokogiri or builder the common usage pattern seems to be creating an XML string first and then writing it to a file. In case of large data that needs to be converted in XML this can bloat the memory especially the XML string. How can one write to an XML file periodically while without bloating up the memory too much?

2014-01-17

[14:03:20] ksinkar: has anyone here used the before_enqueue hooks for Resque?

2014-01-07

[13:12:42] ksinkar: I am using the sanitize method to sanitize all user input that is going to be displayed. The problem is that user defined html pages are also being passed throught the sanitize filter

2014-01-03

[11:16:30] ksinkar: with redis version 2.2.2 and above and resque version 1.25.1, is anyone facing reconnection issues after forking from the parent process?

2013-12-26

[05:47:40] ksinkar: how does one identify if our resque-scheduler process is on or not? I cannot see any resque-scheduler process in my ps -ef.
[13:47:15] ksinkar: With the resque scheduler, when you schedule a job to run after every 5 minutes in the cronjob format, why does the job schedule for one hour and five minutes? cron: "5 * * * *"
[13:48:57] ksinkar: maloik_: is it not supposed to be m h dom mon dow ???
[13:49:39] ksinkar: maloik_: is this how cron works, or is this rufus-scheduler/resque-scheduler specific?
[13:50:46] ksinkar: andywww: carrierwave gem, is the way to go
[13:51:27] ksinkar: maloik_: you have provided a much needed clarification. Thank you very much.

2013-12-25

[17:57:33] ksinkar: I am using RVM on my development machine and want to test some scheduled running of tasks with cronjob. Now the dilemma I am facing is that how do I have all the gems and my bundle and my ruby in the included in the cronjob environment, as the cron does not read your .bash_rc file.

2013-12-19

[13:35:38] ksinkar: Is the Rails cache that is created a presistent store common across different instances of the same application on the same machine, or is it different per Rails process. Example Can I access the same Rails cache from my console that is available to my web application running locally?
[13:36:55] ksinkar: tbuehlmann: the cache store is a Memcache server
[13:37:46] ksinkar: tbuehlmann: I guess I shall find out

2013-12-13

[11:33:01] ksinkar: I am currently using delayed jobs as the scheduler in my application. I had used it first because it seemed to be the default choice. Now that I have started facing problems with Delayed Jobs, especially jobs not mysteriously being executed, I am now looking at other options namely redis-resque, beanstalkd etc. I was wondering why is nobody in the rails world using cron jobs as their scheduler? Or is it that cron jobs is a scheduler
[11:33:02] ksinkar: while most of then above solutions are queueing solutions?

2013-10-08

[06:20:39] ksinkar: how does one access fixtures data in a before(:all) block? I tried the normal method -- users(:david) -- to return objects, which works for individual 'it' blocks but it does not work for before(:all) block. Is it even possible to access fixtures from the before(:all) block?
[06:26:36] ksinkar: parndt, sarmiena: yes, does not the fact that I am loading the fixtures before the before all code make a difference?
[06:27:45] ksinkar: sevenseacat: I am usring before(:all) for my controller tests, to sign in the user
[06:28:39] ksinkar: parndt: wouldn't before(:all) be better, instead of signing in the user at each individual test?

2013-10-03

[14:23:35] ksinkar: how do I mount a rails engine at two different points?
[15:22:11] ksinkar: michael_mbp: usually to alias routes, we use controller names, if I do that for mounting engines, it will try to mount the engine twice and then that is not allowed, right?

2013-09-23

[12:55:13] ksinkar: How does one access cookies set for a particular path in our rails controller?
[12:56:07] ksinkar: Current the Action Dispatch cookie class only allows me to access root path cookies like this 'cookies[<cookie_name>]'
[15:04:36] ksinkar: Currently the Action Dispatch cookie class only allows me to access root path cookies like this 'cookies[<cookie_name>]'. Does anyone know how to access a cookie with a given path?

2013-09-11

[14:34:45] ksinkar: ACTION shall remember sevenseacat in his prayers

2013-09-10

[06:08:35] ksinkar: where are the rake tasks that come by default in rails located in the rails source code?
[06:11:10] ksinkar: sevenseacat: rake db:_dump
[06:25:15] ksinkar: I am trying to dump some of the tables in existing database to fixtures. Is there any easy way to do this with Rails 3?
[08:44:38] ksinkar: where do I write tests for the function in my lib folder?
[09:00:39] ksinkar: toretore: thanx
[09:00:49] ksinkar: xybre: I am not using rspec
[09:01:02] ksinkar: xybre: I am just trying to sue the rails test
[10:27:49] ksinkar: shouldn't rake tests run automatically in the test environment?
[13:08:57] ksinkar: When I run tests for my rails application, using $ rake test, the tests run the development enviroment and not the test environment. Aren't the tests supposed to run by default in the test environment
[13:25:32] ksinkar: universa1: that is what I am trying to figure out where that hardcoding has happened. Have looked at boot.rb, application.rb and going by http://guides.rubyonrails.org/initialization.html, I have not found the hard coding anywhere
[13:26:19] ksinkar: universa1: unlike nodejs rails I thought is not asynchronous

2013-08-26

[18:19:18] ksinkar: how do I render a partial that is within a directory?

2013-08-23

[13:19:15] ksinkar: what is the channel for rails development?
[13:20:47] ksinkar: elaptics: #rails-contrib is the one

2013-08-22

[06:37:51] ksinkar: I have noticed that when I try to access my mysql console through rails dbconsole, it asks me for the database password, which has already been provided in the config/database.yml. Any idea why does it ask for the password? It did not ask for password previously on other applications that I have worked on.

2013-08-20

[10:38:26] ksinkar: I am using the truncate helper method to truncate lines of text. Now these lines of text also have html links embedded in them. These links should not be truncated. Has this problem been solved before?
[13:50:56] ksinkar: I have installed the debugger gem in my global gemset but while I try to require the debugger gem in my rails application, it gives me a LoadError. Where could I be going wrong?

2013-07-01

[11:22:43] ksinkar: has anyone here tried pjax with rails? I am not able to load javascript files with <%= javascript_include_tag controller_name%> or <script src=path_to_file></script> being placed in my pjax callee blocks

2013-06-30

[04:19:41] ksinkar: i have added the devise gem and still i get method_missing error for authenticate_user! and I am not able to figure out what is the bug. I have worked with devise before and it worked out of the box. Unable to debug the problem. Any hints as to how to proceed?
[04:20:40] ksinkar: micah`: yes
[04:23:52] ksinkar: micah`: yes
[04:24:03] ksinkar: micah`: many times
[04:25:32] ksinkar: micah`: have you faced this problem before?
[04:26:14] ksinkar: Paradox: so if we are doing something fancy like ffmpeg, then we can do that with openshift? Because we cannot do that with Heroku.
[04:26:34] ksinkar: Paradox: did you host your own openshift server?
[04:27:03] ksinkar: I have not tried that yet. But sure would like to
[04:34:06] ksinkar: micah`: devise_for :target_model
[04:34:13] ksinkar: micah`: I have donet hat
[04:38:08] ksinkar: micah`: you are so right. You nailed it.
[04:39:21] ksinkar: micah`: i guess this was case of having another pair of eyes
[09:53:06] ksinkar: micah`: have you got persistent redirect loops while integrating devise?

2013-05-01

[08:25:20] ksinkar: for a model with relationships, how do I implement the checking for validations on the dependent objects as well?
[08:33:09] ksinkar: pacso: well I have two models, with a many to many relationship between them. What I want is when an object1 which is an instance of model1 changes and is saved to the database, I want validations to be run on the child models as well. I come from the world of DataMapper where this is possible using the ORM DSL itself. I was wondering if I could do that in Active Record as well.

2013-04-18

[09:14:54] ksinkar: does spork work with debugger gem instead of ruby-debug?

2013-04-02

[12:18:34] ksinkar: is there anything like shoulda_matchers for testing the attributes of a model?
[12:22:00] ksinkar: elaptics: to test if the attribute is present, if it is a database column, and if yes, if it is of the correct data type
[12:26:42] ksinkar: pi3r: yes you can say that, but I need to know if certain attributes that which I have written in my specs are actually present in the model/class
[12:27:39] ksinkar: elaptics: I want to test if the database column exists or not
[12:33:29] ksinkar: elaptics: ok
[12:34:43] ksinkar: elaptics: actually I am not testing whether the database has been correctly created or not, but just testing if the developer has created those fields and their datatype values are the same as the specification, which is nothing but my test
[12:47:52] ksinkar: elaptics: http://pastie.org/7278806, now in this code I just want to reduce the length of the first three tests

2013-02-01

[12:19:26] ksinkar: FactoryGirl creates a new object at every association that is there

2012-12-22

[12:44:10] ksinkar: I am trying to do some data import from csv files into a postgres database through a rake task. I am using the standard csv library of ruby. Now after some time the process just comes to a halt inexplicably. After I look at the logs I can see a SQL stmt being fired and is frozen in time
[12:44:16] ksinkar: Can anyone explain this

2012-11-19

[08:47:15] ksinkar: how do I enable the display of backtrace when I run my rake tasks, '$rake --backtrace stdout' does not work
[08:59:18] ksinkar: Antiarc: --trace does not display the database actions that are taking place in the background
[08:59:45] ksinkar: Antiarc: --trace only displays once there it encounters an error and not before that

2012-10-08

[08:52:36] ksinkar: I have written some functions in my rails lib folder
[08:52:47] ksinkar: Where do I write the tests for them?
[08:58:14] ksinkar: sideshowcoder: GAYtonde.20
[09:09:38] ksinkar: sevenseacat: yes, but I need the lib function to be visible in my specs
[09:25:01] ksinkar: elaptics: yes

2012-09-22

[04:11:21] ksinkar: I am trying to skip a validates_attachment_presence using the skip_callback method on the class, but I am getting a method missing error
[04:11:32] ksinkar: How do I skip this particular validation

2012-09-16

[11:20:27] ksinkar: hello, when you are using fixture_file_upload() as a part of your test suite, how do you close all the file handles that were opened?
[12:51:47] ksinkar: How does one fabricate while skipping validations?

2012-09-13

[07:51:10] ksinkar: namaste, how does one create a set of data to randomly pick up from in Fabricator gem, the way we do it in FactoryGirl gem..
[07:52:56] ksinkar: sevenseacat: are you talking about sequences?

2012-09-12

[14:39:25] ksinkar: how do we debug devise, I am using the devise gem for authentication and I am unable to login to as the user
[15:37:46] ksinkar: do I need to add anything on my Procfile to enable web solr index on heroku app if I have already added the addon?

2012-09-09

[08:02:07] ksinkar: is anyone here using prawn library
[12:54:08] ksinkar: I am facing this wierd problem in my app, if I do require 'open-uri' in my console and run open(<weblink>). It works
[12:54:13] ksinkar: while in the app code
[12:55:05] ksinkar: inspite of having require 'open-uri' stated at the beginning of the class definition, I am unable to run open(<weblink>) properly
[13:08:02] ksinkar: rushed: the is the code http://pastie.org/4690185
[13:09:03] ksinkar: rushed: this is the error http://pastie.org/4690186