Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option for evergreen to run its own server instead of mounting on top of Rails application #36

Open
dlee opened this issue Nov 10, 2011 · 2 comments

Comments

@dlee
Copy link

dlee commented Nov 10, 2011

I have a catch-all route get "*path" => "controller#method" that prevents tests from reaching /evergreen.

I was surprised at first that javascript tests would have anything to do with Rails routes.

My assumption is that you run evergreen on the actual app server to support sprockets. I suggest running a standalone evergreen server that has sprocket support instead of starting up the entire Rails app. Besides, loading the entire Rails app is quite a heavy bootstrapping requirement that loads a bunch of unnecessary dependencies.

At the minimum, the evergreen server should always have /evergreen accessible, even if that means adding a Rails route map that has precedence over all other routes.

@dlee
Copy link
Author

dlee commented Nov 10, 2011

For now, I've added this to the top of the routes as a workaround:

if Rails.env.development? || Rails.env.test?
  mount ::Evergreen::Application => "/evergreen"
end

@abepetrillo
Copy link
Owner

Note to self: @thomet has been working on something very similar to this in Sage.

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

No branches or pull requests

2 participants