Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 19 2018 23:23
    kiddrew commented #14160
  • Nov 19 2018 23:23
    gmcgibbon synchronize #34468
  • Nov 19 2018 23:23
    kiddrew commented #14160
  • Nov 19 2018 23:12
    kamipo commented #34316
  • Nov 19 2018 23:10
    oniofchaos commented #34218
  • Nov 19 2018 23:09
    rafaelfranca synchronize #30320
  • Nov 19 2018 23:08
    oniofchaos commented #34236
  • Nov 19 2018 23:07
    rafaelfranca closed #34487
  • Nov 19 2018 23:07

    rafaelfranca on master

    Prevent TextHelper#word_wrap fr… Merge pull request #34488 from … (compare)

  • Nov 19 2018 23:07
    rafaelfranca closed #34488
  • Nov 19 2018 23:06
    rafaelfranca review_requested #34308
  • Nov 19 2018 23:05
    oniofchaos commented #34280
  • Nov 19 2018 23:01
    oniofchaos commented #34308
  • Nov 19 2018 22:52
    rafaelfranca synchronize #30320
  • Nov 19 2018 22:51

    rafaelfranca on master

    Indent guides as rails help com… Homogenize rails help output I… Merge pull request #34085 from … (compare)

  • Nov 19 2018 22:51
    rafaelfranca closed #34085
  • Nov 19 2018 22:51
    rafaelfranca commented #33643
  • Nov 19 2018 22:51
    rafaelfranca closed #33643
  • Nov 19 2018 22:50

    rafaelfranca on 5-2-stable

    Merge pull request #34106 from … (compare)

  • Nov 19 2018 22:49
    rafaelfranca synchronize #30320
Sourav Goswami
@Souravgoswami
It works just fine
Kaia Leahy
@tenebrousedge
okay?
Sourav Goswami
@Souravgoswami
Yup, sure...
But you can read stuff from /proc/ or /sys/ on heroku
why not the data.txt?

But you can read stuff from /proc/ or /sys/ on heroku

And show that live with ajax

Kaia Leahy
@tenebrousedge
you can read from data.txt
you can't write to it
or at least, you can't expect that to be persistent
Sourav Goswami
@Souravgoswami
Got it
I think the method just caches it. It generates random coloured svgs, but it doesn't update the data read from data file... So it's mysteriously caching IO.read() only...

you can't write to it

But actually there's my confusion. Cat shows the data is updated.

image.png

Here

IO.read() doesn't read the data, it's kind of cached
I am using a class variable there though...
Kaia Leahy
@tenebrousedge
and you're entirely sure that cat is reading from the same dyno?
Sourav Goswami
@Souravgoswami
Sure
The reason is that the dyno is a container
What does it show? Look at the process start time, it's like 1 hour or so
Because you are running the same container as I am
No matter where you are, my heroku account is free
If you then go to the home page, start calculating pi, you will see the CPU usage goes 12.5%, core count is 8, 12.5 * 8 = 100% of a core
Kaia Leahy
@tenebrousedge
you say yes it is, your code says no it isn't
Sourav Goswami
@Souravgoswami
Well actually you are right. I am running the picalc, and then I ran heroku bash on my system, then checked the nodename with LinuxStat::OS.nodename, it's different. The IP is different, the root is mounted on /dev/loop8 instead of /dev/loop2. So the online instance is different from the heroku bash I am running.
Kaia Leahy
@tenebrousedge
kk. So I'm going to go out for a run, I'll check back later if you have further questions
Sourav Goswami
@Souravgoswami
I learnt a lot! Thanks... I don't have further questions!
Interestingly I am changing data on another container with the rake task, rather than changing it on the rails root... 😂😂
Sourav Goswami
@Souravgoswami
Anyway, I have created one thread in the controller that updates the data there. I have also implemented begin rescue block that is run if the thread fails for 3 times, to avoid race condition. It's updating the data.txt, but not keeping that data in memory for some other reason. It's working perfectly fine. So technically I can write to heroku's rootfs, it's just a simple container with r/w access. But I can't use rake task because the container that I fire up with rake or with heroku run bash is completely different container, as far as I have seen...
Actually I don't even need rails for that. My app's view folder is deleted, along with many rubygems like webpacker itself! It has no JS, or database. It just has a route and the controller. At this point I think it's really not a good idea to use rails... Any ruby server could be used there...
Gus P
@staycreativedesign
how does one add a helper to a gem im creating? I just created a gem and im trying to add a helper to my gem inside the gem
Marco Amato
@linediconsine

Hi all,

I see in the log this error

"../../../../../../../../../../etc/services{{" is not a valid MIME type

Do you have any clue about what its happening here?

Thanks

Look like somebody with an Header parameter like:

../../../../../../../../../../etc/services{{

Make a request to my app, its this a sort of attack?

Mike Simkins
@msimkins
Has been seen before, they are hoping you have insecure permissions on system files
Marco Amato
@linediconsine
@msimkins Thanks for confirm it
Andrews Peprah Addai
@andrews-peprah
Hi. Does anybody have in mind any other internationalisation gem aside the rails default?
Valentin Damian
@1a
hi people - newbie here. Did anyone do Michael Hartl's rails tutorial and had an Invalid Activation Link error although they followed every step?
KuldeepChotaliya146
@KuldeepChotaliya146
Hello
I am newbie here
Biep
@Biep
I am new, and don't even know my user name..
Ah, it's "Biep". All right.
matedemorphy
@matedemorphy
hello
i'm trying to deploy my app to Heroku but i'm getting this error ´cannot load such file -- bootsnap/setup´
Rails 5.2.4, Ruby 2.6.3, Heroku Stack 18, gem 'bootsnap', '>= 1.4.3'
please help
matedemorphy
@matedemorphy
even if i remove the bootsnap gem the error remains: Could not detect rake tasks, ensure you can run $ bundle exec rake -P against your app and using the production group of your Gemfile.
Mpampis Kostas
@charkost
Rails N+1 queries auto-detection with zero false positives / false negatives: https://github.com/charkost/prosopite
Sourav Goswami
@Souravgoswami

even if i remove the bootsnap gem the error remains: Could not detect rake tasks, ensure you can run $ bundle exec rake -P against your app and using the production group of your Gemfile.

That happens to me, the thing I do to solve this is to copy rake to bin/, and run rake from bin/rake

That doesn't only appen in rails, but also in sinatra..
Jordan Shackelford
@JordanShackelford
hey guys I replaced sqlite3 with pg in my gem file