Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

configuring loader.io in rails

I am trying to use the loader.io add on in heroku to stress test the servers and optimize the servers. I am having a really hard time verifying my URL. I have followed the loader.io documentation on how to verify the URL but I don't think I am doing it correctly. The documentation suggests the following steps.

1) Place the verification token in a file or download it. I downloaded the .txt file. However the documentation says, "The file should be uploaded at the root of your server". I placed the file in the root directory but I get the following error. URL returned wrong response code (404). Therefore, I don't think I am placing it in the right place.

2) Upload the file to your server so it is accessible at one of the following URLs:

http://example..com/loaderio-28016b04fdb0ed4ea066**********a.txt

http://example..com/loaderio-28016b04fdb0ed4ea066**********a.html

http://example..com/loaderio-28016b04fdb0ed4ea066**********a/

The only way I know to make these links available was through relevant controller and actions. I made a controller called loaders_controller and the show template with the token file in it. The named route points the loaders controller and show action. This is the only way I know I can make the following route available. The route file is given below.

get 'http://example..com/loaderio-28016b04fdb0ed4ea066**********a.txt' => 'loaders#show'

When I tired to verify it, It said that the URL was found but the token was not present. I don't think this is the right way to do it. That route formation does not seem right to me. I think the problem is placing the file in the root servers. I am not sure what I am doing wrong.

like image 696
kpaul Avatar asked Mar 30 '26 20:03

kpaul


1 Answers

Place the .txt file in the public folder of your Rails app. Then it will automatically be served at the root URL, i.e. http://example.com/xxxxxx.txt.

like image 61
Matt Brictson Avatar answered Apr 02 '26 21:04

Matt Brictson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!