naftilos76

Activity Graph

Page 1 of 8 | Next »

2019-08-09

[12:06:15] naftilos76: has joined #RubyOnRails
[12:09:58] naftilos76: I am having a weird behaviour in my 4.2.4 rails app. An object instance @jscript.code contains this string: "1234\r\n456" but when i try to do inside a view <div style="...."><%= @jscript.code %></div> the string does not show up. If the unix new line is not in the string then the string shows up as expected. What am i missing here?
[12:26:32] naftilos76: Problem solved - do not bother
[13:08:48] naftilos76: Ping timeout: 245 seconds
[18:44:47] naftilos76: has joined #RubyOnRails
[19:55:56] naftilos76: Quit: Leaving

2019-08-02

[07:59:26] naftilos76: has joined #RubyOnRails
[08:02:47] naftilos76: Hi i am working on a rails 4.2.4 app and trying to download any file that i want just by placing it in the ../public/downloads folder. I am in dev mode. It works in a rails app that i have already setup in my vps but the one i am working right now doesn't. When i try to access the path i get : Forbidden. You don't have permission to access /download/gps.zip on this server. Any ideas what may be wrong?
[08:03:28] naftilos76: the folder is ../public/download not ../public/downloads
[08:06:19] naftilos76: Even if i place the file in public folder i still get the error
[08:09:01] naftilos76: I basically want to be able to download any file from a rails folder tree without using method send_file
[08:09:08] naftilos76: Can anybody help?
[08:27:41] naftilos76: Problem resolved - i had to change 'others' group permissions
[08:54:20] naftilos76: Quit: Leaving

2019-07-30

[08:47:58] naftilos76: has joined #RubyOnRails
[08:50:38] naftilos76: Hi i am running a 4.2.4 rails app in my laptop with webrick and it runs fine but on my vps i get "Specified 'sqlite3' for database adapter, but the gem is not loaded." The adapter is clearly defined in database.yml to "mysql2" . Any ideas why this is happening?
[08:54:25] naftilos76: Remote host closed the connection

2018-07-24

[09:40:51] naftilos76: has joined #ruby
[20:22:25] naftilos76: Quit: Leaving

2018-07-14

[07:06:23] naftilos76: has joined #ruby
[07:34:09] naftilos76: Quit: Leaving

2018-07-13

[05:53:09] naftilos76: has joined #ruby
[05:56:37] naftilos76: Hi, i want to redirect warning and error messages from a shell command in my ruby script into a variable. For example, i am compiling some cpp files with 'g++ main.cpp -c' and i want the warning messages to be saved in a variable.
[05:58:55] naftilos76: havenwood: thanks a lot
[06:49:33] naftilos76: Ping timeout: 264 seconds
[06:50:28] naftilos76: has joined #ruby
[07:48:35] naftilos76: Quit: Leaving

2018-07-07

[04:37:08] naftilos76: has joined #ruby
[08:05:43] naftilos76: Quit: Leaving

2018-07-06

[21:18:58] naftilos76: has joined #ruby
[21:29:14] naftilos76: Quit: Leaving

2018-07-05

[07:29:38] naftilos76: has joined #ruby
[15:46:35] naftilos76: Ping timeout: 240 seconds
[17:56:17] naftilos76: has joined #ruby
[20:51:57] naftilos76: Quit: Leaving

2018-07-04

[10:14:36] naftilos76: has joined #ruby
[11:41:10] naftilos76: Quit: Leaving

2018-07-03

[16:03:23] naftilos76: has joined #ruby
[17:24:25] naftilos76: Ping timeout: 260 seconds

2018-07-02

[09:55:08] naftilos76: has joined #ruby
[16:34:47] naftilos76: Quit: Leaving

2018-07-01

[09:05:39] naftilos76: has joined #ruby
[09:08:18] naftilos76: Hi i have just tried executing a ruby script that starts with "#!/usr/bin ruby" and the next line is "puts "this is a test" and i get: bash: ./test: /usr/bin: bad interpreter: Permission denied . The file's permissions are -rwxrwxr-x .
[09:08:59] naftilos76: When i do `which ruby` in a terminal i get /usr/bin/ruby
[09:09:22] naftilos76: I am using rvm but at this point i have done 'rvm use system'
[09:09:43] naftilos76: if i do: ruby test then it works!
[09:10:10] naftilos76: Isn't that weird? I am on Linux mint 18.3
[09:10:45] naftilos76: Has anybody got a clue what this is all about?
[09:12:32] naftilos76: Zarthus: it works thanks with /usr/bin/env
[13:45:40] naftilos76: Ping timeout: 245 seconds
[14:41:57] naftilos76: has joined #ruby
[15:48:06] naftilos76: Quit: Leaving
[17:04:58] naftilos76: has joined #ruby
[17:52:24] naftilos76: Quit: Leaving

2018-05-01

[19:18:48] naftilos76: has joined #ruby
[20:02:04] naftilos76: Quit: Αποχώρησε

2018-03-18

[17:04:13] naftilos76: has joined #ruby
[17:47:52] naftilos76: Quit: Αποχώρησε

2018-03-04

[16:59:40] naftilos76: has joined #ruby
[19:37:30] naftilos76: Quit: Αποχώρησε

2018-03-03

[16:24:44] naftilos76: has joined #ruby
[17:26:52] naftilos76: Quit: Αποχώρησε

2018-02-05

[19:35:19] naftilos76: has joined #ruby
[20:13:02] naftilos76: Quit: Αποχώρησε

2018-01-08

[17:56:58] naftilos76: has joined #ruby
[19:22:34] naftilos76: Quit: Αποχώρησε

2017-12-01

[15:34:06] naftilos76: has joined #ruby
[18:08:58] naftilos76: Quit: Αποχώρησε

2017-10-23

[17:43:43] naftilos76: has joined #ruby
[17:56:38] naftilos76: Ping timeout: 255 seconds
[17:58:30] naftilos76: has joined #ruby
[18:57:27] naftilos76: Quit: Αποχώρησε
[19:19:40] naftilos76: has joined #ruby
[20:01:05] naftilos76: Ping timeout: 240 seconds
[20:09:35] naftilos76: has joined #ruby
[20:56:11] naftilos76: Ping timeout: 255 seconds

2017-10-10

[14:46:13] naftilos76: has joined #ruby

2017-10-09

[17:29:40] naftilos76: has joined #ruby
[18:19:18] naftilos76: has joined #RubyOnRails
[18:20:03] naftilos76: is there a gem to unpack / beautify an unglified javascript file ?
[20:29:37] naftilos76: Ping timeout: 255 seconds

2017-10-08

[07:56:49] naftilos76: has joined #ruby
[07:57:01] naftilos76: has joined #RubyOnRails
[07:58:29] naftilos76: Hi, is there a gem that can be used to load a controller file from another rails app and give me a list of defs, before/after filters, defs after a private or protected section etc?
[10:40:25] naftilos76: Quit: Αποχώρησε

2017-10-06

[13:13:52] naftilos76: has joined #ruby
[14:13:08] naftilos76: Ping timeout: 240 seconds

2017-10-05

[16:55:54] naftilos76: has joined #ruby
[19:28:31] naftilos76: Ping timeout: 248 seconds

2017-10-04

[16:13:16] naftilos76: has joined #ruby
[16:15:45] naftilos76: hi i am trying to extract a substring from a big string with "some_string".scan(//) . Assuming that there are two words in the big string "one" and "two" and i want to extract the substring between these two words what would be your approach?
[16:19:10] naftilos76: Papierkorb, correct question! one occurence only
[16:21:35] naftilos76: Papierkorb, thanks, that would be mine but somehow it does not work
[16:21:47] naftilos76: let me try a few things
[16:24:29] naftilos76: Papierkorb, i have an instance that contains a big string and i do this: @file_data[/^(.*)$/, 1] and i get an empty string. Is that what it should do?
[16:25:03] naftilos76: "" is what i get
[16:25:24] naftilos76: i try this while using byebug
[20:19:42] naftilos76: Ping timeout: 260 seconds

2017-09-30

[04:46:17] naftilos76: has joined #ruby
[04:46:41] naftilos76: has joined #RubyOnRails
[04:48:05] naftilos76: hi, is there a beautifier gem that can auto format most files in rails? I tried HTMLbeautifier but did not perform as expected on a js.erb view file. Anyone?
[19:33:56] naftilos76: Quit: Αποχώρησε

2017-09-18

[19:10:57] naftilos76: has joined #ruby
[20:40:30] naftilos76: Quit: Αποχώρησε

2017-09-03

[18:35:58] naftilos76: has joined #ruby
[20:34:20] naftilos76: Quit: Αποχώρησε

2017-08-08

[21:05:52] naftilos76: has joined #ruby
[21:18:07] naftilos76: Quit: Αποχώρησε

2017-07-30

[11:59:41] naftilos76: has joined #ruby
[11:59:53] naftilos76: has joined #RubyOnRails
[12:06:51] naftilos76: Hi, i am facing a problem with my project. I have backgrounds (controller) which has_many backgrounds and belongs_to background . This worked fine until i had the need for a background to belong to one or more backgrounds. Can a join table do the job? I mean, there should be 2 columns of this_id and that_id and as you can understand both will be background_id which is impossible. Is there another way to accomplish this?
[14:58:34] naftilos76: Hi, i am facing a problem with my project. I have backgrounds (controller) which has_many backgrounds and belongs_to background . This worked fine until i had the need for a background to belong to one or more backgrounds. Can a join table do the job? I mean, there should be 2 columns of this_id and that_id and as you can understand both will be background_id which is impossible. Is there another way to accomplish this?
[15:02:13] naftilos76: oded, the tricky part is that associations will be between the same mdel
[15:59:18] naftilos76: Quit: Αποχώρησε

2017-07-23

[10:22:17] naftilos76: has joined #ruby
[10:44:44] naftilos76: Does anybody know a tool that can validate CSS property values?
[10:44:55] naftilos76: In ruby i mean...
[12:07:29] naftilos76: Quit: Αποχώρησε
[19:06:07] naftilos76: has joined #ruby
[19:56:49] naftilos76: Quit: Αποχώρησε

2017-06-18

[12:26:14] naftilos76: has joined #ruby
[12:27:12] naftilos76: Read error: Connection reset by peer

2017-06-10

[09:27:16] naftilos76: has joined #ruby
[10:02:56] naftilos76: Quit: Αποχώρησε

2017-05-09

[08:38:29] naftilos76: has joined #ruby
[11:05:27] naftilos76: Ping timeout: 240 seconds

2017-04-27

[09:28:47] naftilos76: has joined #ruby
[09:29:07] naftilos76: has joined #RubyOnRails
[09:29:34] naftilos76: Read error: Connection reset by peer
[09:33:27] naftilos76: has joined #ruby
[09:33:44] naftilos76: has joined #RubyOnRails
[09:39:52] naftilos76: Hi, everyone. I am debugging a rails 4.2 app and playing with FF debugging tools. When something goes wrong in a controller i do "render "common/error", status: 422" . Now, error.js.erb is one tiny js view that simply contains a js alert("An error occured, pls see the log for more info..."); That works fine until i use the debugging tools to manually change the query string or the request body params. When i re-submit that request that i change
[09:39:53] naftilos76: its' params then the erro.js.erb view is still rendered but i get no js alert message. Does anybody have any idea why this happens?
[12:04:57] naftilos76: Quit: Αποχώρησε

2017-04-25

[08:38:00] naftilos76: has joined #ruby
[08:39:53] naftilos76: has joined #RubyOnRails

2017-04-09

[15:15:48] naftilos76: has joined #RubyOnRails
[15:15:48] naftilos76: has joined #ruby
[17:40:51] naftilos76: Quit: Αποχώρησε

2017-04-06

[09:12:49] naftilos76: has joined #RubyOnRails
[09:12:49] naftilos76: has joined #ruby
[09:34:49] naftilos76: Quit: Αποχώρησε

2017-04-05

[09:36:32] naftilos76: has joined #RubyOnRails
[09:36:32] naftilos76: has joined #ruby
[16:40:44] naftilos76: Hi everyone, i have a class method named foo that returns a hash like this: {"id"=>1, "name"=>"some_string", "title"=>"some_title"} . This means that i can do foo["id"] and get the id. What if i want to do foo.id and get the id?
[18:24:30] naftilos76: Assuming that i have a hash {"id"=>1, "title"=>"Happy new year"} and i do => local_var = {"id"=>1, "title"=>"Happy new year"} . Then i can do local_var["id"] . How can i convert the hash keys into hash methods so that i can do local_var.id ?
[20:38:57] naftilos76: Quit: Αποχώρησε

2017-04-04

[08:48:24] naftilos76: has joined #ruby
[08:48:25] naftilos76: has joined #RubyOnRails
[08:50:19] naftilos76: Is it a good practice to keep a small amount of data per session in a global var like $global[session.id] = {} where i could keep for example user's preferences of some kind?
[08:51:04] naftilos76: Do you have any suggestions towards that?
[08:59:49] naftilos76: dminuoso, helpa: OK, here is a case. A user logs in into a website builder (built on rails :) and loads a website (one out of many) to edit further. During his session many of the actions, he calls, need to know the name of the website or even the website obj itself. The name of the website is not always in the queries. It is only met during loading a website for the first time. So i was thinking storing the website obj in a $global[session.id]
[08:59:50] naftilos76: and have handy until the user logs out or loads another website where the $global[session.id] overwritten. How does that sound?
[09:01:27] naftilos76: because sometimes i need more than just the website name. So i have to save the whole obj
[09:01:51] naftilos76: and we all know that session size has limitations
[09:03:40] naftilos76: sevenseacat, why does everybody hate global vars?
[09:06:22] naftilos76: matthewd, i am just trying to do it the right way. I am not a know-everything guy. I am not even close.
[09:11:11] naftilos76: matthewd, thanks for your time.
[11:04:23] naftilos76: Quit: Αποχώρησε

2017-04-01

[11:51:56] naftilos76: has joined #RubyOnRails
[11:51:56] naftilos76: has joined #ruby
[12:07:39] naftilos76: Quit: Αποχώρησε

2017-03-23

[08:41:35] naftilos76: has joined #RubyOnRails
[08:41:35] naftilos76: has joined #ruby
[08:45:30] naftilos76: Hi, is it a really good idea to have a captcha on my user login sreen? I am using rails 4.2 and bcrypt which is on purpose slow (as you probably already know) so that bots are discouraged to continue hitting my login page. What do you think?
[08:48:27] naftilos76: Does anybody kno if i can create an image file containing a number out of a number string? I want to implement my own captcha service.
[08:53:18] naftilos76: Is bcrypt enough to keep robots away?
[09:03:19] naftilos76: adaedra, thanks
[09:16:21] naftilos76: Andr3as, thanks
[09:19:24] naftilos76: Andr3as, it is not a page yet :) . I am building a basic website builder.
[09:47:27] naftilos76: dminuoso, i think i will not use it for now. I will rely on fail2ban or a future ruby version of fail2ban and iptables that drops down the number of requests/sec
[10:44:10] naftilos76: Quit: Αποχώρησε

2017-03-21

[09:54:04] naftilos76: has joined #RubyOnRails
[09:54:04] naftilos76: has joined #ruby
[09:56:44] naftilos76: Is there a way to make FF show errors in js code located inside a js view? The controller action returns a status 200 but if something goes wrong inside my js view i can no errors in the FF's console. However if i execute js from anywhere else and something goes wrong then i get an error in js console. Can anybody help?
[12:06:24] naftilos76: Quit: Αποχώρησε

2017-03-09

[07:09:40] naftilos76: has joined #RubyOnRails
[07:09:40] naftilos76: has joined #ruby
[07:09:50] naftilos76: Read error: Connection reset by peer

2016-07-31

[09:18:53] naftilos76: has joined #RubyOnRails
[09:18:53] naftilos76: has joined #ruby
[13:44:50] naftilos76: Quit: Αποχώρησε
[15:46:18] naftilos76: has joined #RubyOnRails
[15:46:18] naftilos76: has joined #ruby
[21:05:13] naftilos76: Quit: Αποχώρησε

2016-07-29

[19:46:09] naftilos76: has joined #RubyOnRails
[19:46:09] naftilos76: has joined #ruby
[19:47:52] naftilos76: Hi everyone, is there a way to exclude a certain .css file from loading? Maybe something in application.css ? Or do i have to explicitly define all the .css files i want to load and leave out the one i do not want?
[19:48:10] naftilos76: again in application.css?
[19:58:43] naftilos76: matthewd, thanks and sorry for me being in aa hurry. I googled it and it showed up. I tried it and it works.
[21:51:02] naftilos76: Quit: Αποχώρησε

2016-07-24

[19:10:56] naftilos76: has joined #RubyOnRails
[19:10:56] naftilos76: has joined #ruby
[20:08:39] naftilos76: Quit: Αποχώρησε

2016-07-18

[09:13:53] naftilos76: has joined #RubyOnRails
[09:13:53] naftilos76: has joined #ruby
[10:58:08] naftilos76: Quit: Αποχώρησε
[18:34:37] naftilos76: has joined #RubyOnRails
[18:34:37] naftilos76: has joined #ruby
[22:32:20] naftilos76: Quit: Αποχώρησε

2016-07-17

[19:49:59] naftilos76: has joined #RubyOnRails
[19:49:59] naftilos76: has joined #ruby
[21:01:01] naftilos76: Quit: Αποχώρησε

2016-07-15

[14:31:39] naftilos76: has joined #RubyOnRails
[14:31:39] naftilos76: has joined #ruby
[18:47:39] naftilos76: Remote host closed the connection

2016-07-14

[18:09:19] naftilos76: has joined #RubyOnRails
[18:09:19] naftilos76: has joined #ruby
[20:14:17] naftilos76: Quit: Αποχώρησε

2016-07-12

[06:03:22] naftilos76: has joined #ruby
[06:03:22] naftilos76: has joined #RubyOnRails
[18:40:07] naftilos76: Quit: Αποχώρησε

2016-07-11

[06:20:43] naftilos76: has joined #ruby
[06:20:43] naftilos76: has joined #RubyOnRails
[11:08:48] naftilos76: Ping timeout: 258 seconds
[11:25:59] naftilos76: has joined #RubyOnRails
[11:25:59] naftilos76: has joined #ruby
[20:08:00] naftilos76: Ping timeout: 272 seconds

2016-07-10

[04:34:38] naftilos76: has joined #ruby
[04:34:38] naftilos76: has joined #RubyOnRails
[04:46:26] naftilos76: Ping timeout: 258 seconds
[04:47:03] naftilos76: has joined #ruby
[04:47:03] naftilos76: has joined #RubyOnRails
[13:10:27] naftilos76: Ping timeout: 276 seconds
[15:38:59] naftilos76: has joined #ruby
[15:38:59] naftilos76: has joined #RubyOnRails
[19:32:22] naftilos76: Ping timeout: 260 seconds
[19:50:14] naftilos76: has joined #ruby
[19:50:14] naftilos76: has joined #RubyOnRails
[20:00:50] naftilos76: Ping timeout: 272 seconds

2016-07-09

[22:04:28] naftilos76: has joined #RubyOnRails
[22:04:28] naftilos76: has joined #ruby
[22:05:21] naftilos76: Is there a way to prevent a specific css file from loading by entering some kind of exception in application.css ?
[22:06:07] naftilos76: maybe by explicitly defining only those css files i wish to load?
[23:10:38] naftilos76: Ping timeout: 272 seconds

2016-07-08

[13:21:21] naftilos76: has joined #RubyOnRails
[13:21:21] naftilos76: has joined #ruby
[13:27:55] naftilos76: Hi everyone, i am sending an ajax request. However i sometimes alter the contents of one specific css stylesheet file which i want to be taken into consideration before rendering the target template view in order to reflect the changes in the css styling towards the view being rendered. Is that doable? Can i somehow re-load the css file i am interested in from my js view?
[13:28:15] naftilos76: I am on rails 4.2.4 and ruby 2.0
[13:40:52] naftilos76: Can a specific stylesheet be reloaded before rendering a template view after an ajax request?
[13:47:21] naftilos76: Ping timeout: 246 seconds
[14:43:11] naftilos76: has joined #RubyOnRails
[14:43:11] naftilos76: has joined #ruby
[20:05:39] naftilos76: Quit: Αποχώρησε

2016-07-05

[22:52:17] naftilos76: Quit: Αποχώρησε