Skip to content
This repository has been archived by the owner on Mar 7, 2018. It is now read-only.

Status 302 when going to root URL #97

Closed
roblight opened this issue Apr 11, 2013 · 7 comments
Closed

Status 302 when going to root URL #97

roblight opened this issue Apr 11, 2013 · 7 comments
Labels

Comments

@roblight
Copy link

I just created a sample project and when I go to localhost:3030 I get 302'ed to sampletv vs. sample. According to the wiki the default dashboard is picked simply as the first one alphabetically. Why is this happening then?

@kevinthompson
Copy link
Contributor

In config.ru the default dashboard can be defined using set :default_dashboard, :sampletv. Can you see if a different default dashboard has been defined there?

@roblight
Copy link
Author

I just created a new project and verified that there isn't a default dashboard defined in config.ru and I get 302'ed to /sampletv vs. /sample when I enter 0.0.0.0:3030 in Chrome (or FF).

@kevinthompson
Copy link
Contributor

Ok. I'm trying to reproduce the issue. What Ruby version are you currently using?

I just created a new project and verified that there isn't a default dashboard defined in config.ru and I get 302'ed to /sampletv vs. /sample when I enter 0.0.0.0:3030 in Chrome (or FF).


Reply to this email directly or view it on GitHub.

@davefp
Copy link
Contributor

davefp commented Aug 9, 2013

@roblight is this still a problem for you? Please let us know if you can reproduce using the latest version of Dashing (1.2.0)

@roblight
Copy link
Author

roblight commented Aug 9, 2013

Hi @davefp, it's not necessarily a problem for me, just something unexpected. I would have expected to be 302'ed to /sample rather than /sampletv based on what's written in the wiki.

I just verified with 1.2.0 and it's behaving the same way. I looked into the Dashing code and I think the solutions are:

  1. Change to code.
    • Add .sort call to the end of line 144 of lib/dashing.rb. I can send a PR if necessary.
  2. Change the wiki.
    • From: "Out of the box, the default dashboard is picked simply as the first one alphabetically."
    • To: "Out of the box, the default dashboard is picked simply as the first one."

Thanks!

@roblight
Copy link
Author

roblight commented Aug 9, 2013

Somehow I managed to delete my reply to @kevinthompson regarding the version of Ruby I'm using, which is:

ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux]

@pushmatrix
Copy link
Member

Ah that makes sense because using Dir doesn't guarantee order across OSes

Will add the sort.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants