MiniProfiler / rack-mini-profiler

Profiler for your development and production Ruby rack apps.
MIT License
3.7k stars 403 forks source link

POST to /mini-profiler-resources/results returns 404 #71

Open YoranBrondsema opened 10 years ago

YoranBrondsema commented 10 years ago

Hi,

I am running rack-mini-profiler on Rails 4.0.3 and I'm having issues. All but one POST to /mini-profiler-resources/results returns a 404. I included a screenshot below. Would anyone have an idea what might be causing this?

mini-profiler

sevos commented 10 years ago

+1

pbuzek commented 10 years ago

+1

raphaeleidus commented 10 years ago

+1

tonytonyjan commented 10 years ago

+1

tomoyuki28jp commented 10 years ago

+1

elranu commented 10 years ago

+1

elranu commented 10 years ago

could it be in my case because the request is being done to http and not https?

elranu commented 10 years ago

sorry in the miniprofiler looks with http, but on the console the post is with https

michiomochi commented 10 years ago

+1

wild5r commented 9 years ago

temporay solve problem by removing files in tmp/miniprofiler/mp_timers_* in project dir and restart server. hope this help find permanent solution

casertap commented 9 years ago

+1

guange2015 commented 9 years ago

rm -fr tmp/miniprofiler

MrHubble commented 9 years ago

Thanks @wild-r and @guange2015 , rm -fr tmp/miniprofiler has worked for me as a temporary solution.

EleanorRagone commented 9 years ago

+1 for @wild-r and @guange2015 for rm -rf tmp/miniprofiler

murtali commented 9 years ago

+1

sanrodari commented 8 years ago

With http://lotusrb.org/ getting 404 to POST to /mini-profiler-resources/results

AnatoliiD commented 8 years ago

@sanrodari @murtali MemoryStorage seems to be broken. FileStorage works, which is default storage for rails.

Rack::MiniProfiler.config.storage = Rack::MiniProfiler::FileStore
Rack::MiniProfiler.config.storage_options = { path: './tmp' }
kbrock commented 8 years ago

Is there desire to make file system the default for all? Do we need to do something more extravagant than path: './tmp' like ENV['TMP_DIR'] or something?

AnatoliiD commented 8 years ago

@kbrock path depends on framework you are working with. Just do like you want.

File.join(Dir.pwd, 'tmp')
# or
File.join(__dir__, 'tmp')
# or
File.expand_path(File.dirname(__FILE__), 'tmp') # if you are setting it in config.ru

Don't forget to create target directory. About default engine, I think everybody free to choose one :smile:

kbrock commented 8 years ago

creating the target directory should be all set with #208

@railsme Setting the default store to FileStore is easy enough. But I still don't know what the gem should set as the default path. every framework wants something different. I agree that the user can pick something easily. But if the default store is file, then either a good default path needs to be chosen, or it will be broken out of the box. (maybe not much of a change)

@sanrodari Is there something like railties for Hanami (Framework Formerly Known as Lotus) where a suitable Hanami defaults can be set?

sanrodari commented 8 years ago

@kbrock I don't know something like a railtie in Hanami, maybe @jodosha can help us?

techsethi commented 8 years ago

+1 rm -rf tmp/miniprofiler solved the issue. Thanks.

jodosha commented 8 years ago

@kbrock @sanrodari Hi, Hanami is Rack based, you can use it in config.ru.

Kite0301 commented 8 years ago

+1

robertleelittleiii commented 8 years ago

+1

prokopsimek commented 8 years ago

+1

kbrock commented 8 years ago

Sorry to see so many +1 here. Are the issues still with rails. or are they for Rack / Sinatra / Other framework apps?

shaneog commented 8 years ago

For me, it's happening with Rails

kbrock commented 8 years ago

@shaneog thanks. and that is rails 4.0 I assume?

shaneog commented 8 years ago

@kbrock Apologies, it is. Rails 4.2.7

prokopsimek commented 8 years ago

Rails 4.2.x

Sent from my iPhone

On 25 Aug 2016, at 19:44, Keenan Brock notifications@github.com wrote:

Sorry to see so many +1 here. Are the issues still with rails. or are they for Rack / Sinatra / Other framework apps?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

robertleelittleiii commented 8 years ago

Rails 4.2.x

Thanks,

Rob Little.

On Thu, Aug 25, 2016 at 9:07 AM, Prokop Simek notifications@github.com wrote:

Rails 4.2.x

Sent from my iPhone

On 25 Aug 2016, at 19:44, Keenan Brock notifications@github.com wrote:

Sorry to see so many +1 here. Are the issues still with rails. or are they for Rack / Sinatra / Other framework apps?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/MiniProfiler/rack-mini-profiler/issues/71#issuecomment-242503182, or mute the thread https://github.com/notifications/unsubscribe-auth/ABjJo1SDMaPibQIjdOn3KvTEMiJ-ldoGks5qjefXgaJpZM4BxCLX .

constantm commented 7 years ago

This still seems to be an issue on Rails 4.2 - @railsme's suggestion above works perfectly.

tisba commented 5 years ago

jFYI: Same with Rails 5.2.2

ireneybean commented 3 years ago

I'm running into this with a Sinatra app and version 2.3.1 - I know this issue is pretty old, but since it's still open I figured it might be worth a comment.

kzkn commented 2 years ago

Same with:

PositiveControl commented 1 year ago

Seeing it (HTTP 422) with:

Rails 6.1.7 Puma 5.6.4 rack-mini-profiler 3.0.0

rm -rf tmp/miniprofiler fixes the issue for now :adhesive_bandage:

nateberkopec commented 1 year ago

I think if we had a simple reproducing app, we could fix this for all storage engines.