Activity Graph

Page 1 of 1


[09:54:35] donnib: has left #RubyOnRails: ()


[10:27:44] donnib: i have this which i have added as per instructions, in my erb file i added new FastClick(document.body); as per instructions (at least that's how i read them) but i get the error FastClick is not defined. any ideas what i am doing wrong ?


[14:31:44] donnib: has joined #RubyOnRails
[14:32:36] donnib: hi, i have an onclick here :
[14:32:44] donnib: this does not work well on iPad
[14:32:54] donnib: how can i change that to addEventListener ?



[13:59:59] donnib: i am trying do to rake db:create and i get an error, i have no idea how to get over this, any ideas ?
[14:00:27] donnib: this works on a mac but now trying to install on windows where i have specified latest ruby and did a gem update
[14:02:51] donnib: epochwolf: well there is nothing wrong as far as i can see in that file
[14:05:03] donnib: epochwolf: funny coz i did almost same search
[14:05:09] donnib: i think without rollbar
[14:05:33] donnib: but, weird enough i have everything up to date
[14:05:38] donnib: that issue is from 2016
[14:06:00] donnib: i use rake 12
[14:06:17] donnib: and rollbar 2.4.0
[14:06:35] donnib: np, weird anyway, there must be some incompability issue
[14:06:40] donnib: since no code change is made
[14:07:41] donnib: gem 'rollbar', '~> 2.4.0' should this not be updated to latest if i do gem update
[14:08:04] donnib: ahh i see
[14:08:26] donnib: let me try again
[14:10:24] donnib: epochwolf: same here ;)


[08:25:45] donnib: has joined #RubyOnRails
[08:26:53] donnib: so i have found this nice project and i am interested to add some additional functionality
[08:27:47] donnib: i would like to be able to schedule (on time, specific time or a cron description) when to show what survey or if an location is active, and i am unsure what the best approach is
[08:28:14] donnib: could somebody maybe give an idea how i could attack this
[08:30:00] donnib: dminuoso: thx, i mentioned cron but i am not sure i need cron but that's my best guess since the user should be able to define when and at what time he wants to change survey on a location
[08:34:54] donnib: dminuoso: ok that looks good but how would it work in practice ? I mean let's pressume the user has UI to set a a schedule that at 1PM the location with ID 1 should change to survey ID 1, does the cron job call ruby or how would this work ?
[12:14:56] donnib: if i need to schedule an action at some specific time what would i use ? cron or can i use something easier ?
[12:16:32] donnib: i am unsure if cron would be a good solution because i am in doubt how it will work in practice like how will cron know who to call in ruby to initiate an action ?
[12:29:50] donnib: Takumo: there was many new words there, let me look that up :)
[12:48:29] donnib: Takumo: these ActiveJobs can the app create those on the fly ? What i need is that the user can create a schedule dynamically.
[12:58:38] donnib: Takumo: so the user will thru an userinterface make a schedule, this will be saved in the db then also create a ActiveJob ?
[13:07:25] donnib: dminuoso: it was for me


[06:54:36] donnib: has joined #RubyOnRails
[11:18:56] donnib: any tried to use this library ?
[11:19:30] donnib: i am trying it but i don't see a difference in the time i see in the browser, it's still UTC time, i was expecting that the time would be local time of the client
[11:21:19] donnib: <time data-format="%B %d, %Y %H:%M" data-local="time" datetime="2017-03-31T11:19:45Z">March 31, 2017 11:19</time>
[11:21:39] donnib: where it should say 13:19
[11:22:51] donnib: not that i see, i am looking in Chrome -> Developer Tools -> Console
[11:25:30] donnib: i did what it says, added the gem, ran bundle
[11:25:41] donnib: maybe i should run bundle install
[11:25:47] donnib: and not just bundle ?
[11:26:01] donnib: i added the //= require local_time
[11:26:11] donnib: do i need to add some specific files myself ?
[11:27:26] donnib: the //=require local_time is at the bottom of the applicaiton.js file
[11:29:47] donnib: got it, it was a typo in the //=require


[07:59:47] donnib: has joined #RubyOnRails
[08:00:18] donnib: i have this <%= link_to 'Destroy', survey, method: :delete, data: { confirm: 'Are you sure?' } %> how can i add an argument that i am passing to the delete ? i want to clear the data and not delete
[08:00:56] donnib: I mean i want to make <%= link_to 'Clear data', survey, method: :delete, data: { confirm: 'Are you sure?' } %> but somewhere i need to tell that this is a clear and not a destpry anymore
[08:03:55] donnib: Andr3as: i still need it but i can keep that method and add another one in this file ?
[08:04:30] donnib: I am pretty new to this so i am not exactly sure if it's ok to make a new method in the controller above and call that ?
[08:05:12] donnib: I still want the delete, i just want an additional method that can also clear data without delete
[08:06:45] donnib: Andr3as: now that you mention it, what i want to accomplish is to be able to reset the votes, the only way that can happen now is by deleting the survey
[08:07:48] donnib: and what i am trying to do is clear the votes for the survey without removing the survey itself
[08:09:44] donnib: uhhh, sounds fancy, i have no idea what routes are and how they work, i'll have to read
[08:10:55] donnib: ok so where does the new action live in ? in the surveys controller ?
[08:28:26] donnib: Andr3as: i didn't write the initial code but it's correct that each user have surveys.
[08:31:00] donnib: i'll try to see if i can add that route and the method, i am sure that it's going to give me some hard work ;)
[08:40:49] donnib: Andr3as: now if i want to call clear_votes how do i do that within this <%= link_to 'Clear votes', survey, method: :delete, data: { confirm: 'Are you sure?' } %> do i write : <%= link_to 'Destroy', survey, method: :clear_votes, data: { confirm: 'Are you sure?' } %> ?
[08:41:42] donnib: Andr3as: yes exactly as you specified it above
[08:44:20] donnib: for some reason the link does not work for me, i did replace it with my ip
[08:44:44] donnib: No route matches [GET] "/rails/info/routes"
[08:49:33] donnib: Andr3as: so i get GET /surveys/:id/clear(.:format) surveys#clear_votes
[08:51:12] donnib: so i need to change the route ?
[08:52:35] donnib: clear_votes GET /surveys/:id/clear(.:format) surveys#clear_votes
[08:54:21] donnib: so now i am back to add something like this but point to clear_votes : <%= link_to 'Clear votes', survey, method: :clear_votes, data: { confirm: 'Are you sure?' } %>
[08:57:56] donnib: <%= link_to 'Clear votes', clear_votes_path(survey), data: { confirm: 'Are you sure?' } %> ?
[09:02:52] donnib: the method inside the controller clear_votes i guess i need to give it the argument like clear_votes(id) then use id to find the survey then i can do @survey.votes.destroy_all ?
[09:03:49] donnib: ah i see so nee
[09:03:56] donnib: ah i see so need for that
[09:10:53] donnib: so i made the method def clear_votes and inside it i do @survey = Survey.where(:user_id => @current_user).find(params[:id]) and i can see that Clear votes link points to http://localhost:3000/surveys/4/clear but i get a crash Template is missing Missing template surveys/clear_votes, application/clear_votes
[09:14:00] donnib: id should stay on the same page and refresh it
[12:57:40] donnib: Read error: Connection reset by peer



[07:26:14] donnib: has joined #RubyOnRails
[07:26:51] donnib: i am trying to use rake db:create but because of permissions it fails so i am trying to do sudo rake db:create but then i get that the command is not found
[07:27:08] donnib: i then tried to do export PATH=$PATH:$HOME/bin:/home/raistlin/.rvm/gems/ruby-1.9.3-p551/bin but still sudo rake does not work
[07:29:21] donnib: any ideas what i can do to get it to work ?


[15:06:37] donnib: has joined #RubyOnRails
[15:07:07] donnib: i am trying to do rake db:create and i get error "Couldn't create database for..." where do i get more information what fails ?
[15:08:59] donnib: has left #RubyOnRails: ()


[06:48:43] donnib: Hi, i am trying to run following code and i get an error :
[06:49:00] donnib: and the error i get is undefined method `update_attribute' for nil:NilClass/Users/xxx/moodapp/db/migrate/20130327010536_make_first_user_admin.rb:4:in `up'
[06:49:01] donnib: NoMethodError: undefined method `update_attribute' for nil:NilClass
[06:49:38] donnib: i haven???t written the code so i don???t know anything about it
[06:49:59] donnib: trying to follow this guide :
[06:50:28] donnib: and maybe there is a step they have not defined in the readme above
[06:50:36] donnib: any idea how i do that ?
[06:58:03] donnib: baahs05: the script is called make_first_user_admin.rb
[06:58:19] donnib: baahs05: so i would have guessed that would create the user
[07:00:14] donnib: baahs05: hmm, i need to figure out how to do that, haven???t played with ruby on rails
[07:02:02] donnib: baahs05: idk, this is the code they made
[07:02:03] donnib: