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

Server not serving assets as the current rack app does not match the Rails.application #15

Closed
wants to merge 1 commit into from

Conversation

rahult
Copy link

@rahult rahult commented Dec 8, 2014

Removed an explicit check to compare a Rack app with Rails.application

I was having issue with using this gem with any application which has a NewRelic RPM gem

As NewRelic gem was overwriting the structure of the current Rack app in such a way that the current Rails was stored under app.target instead of app.

I think we can get away with just checking if we have a Rails.application defined as that give us enough surety that their is a Rails Application.

=> app
=> #<NewRelic::Agent::Instrumentation::MiddlewareProxy:0x007f8684fd9988
 @category=:rack,
 @is_app=true,
 @target=
  #<Gymy::Application:0x007f8685fceca8
   @_all_autoload_paths=
    ["/Users/rahult/Development/katalyst/rails/koi/gymy/app/assets", ...],
   @_all_load_paths=
    ["/Users/rahult/Development/katalyst/rails/koi/gymy/lib", ...],
   @app=
    #<NewRelic::Agent::Instrumentation::MiddlewareProxy:0x007f8685fa4368

instead of

=> app
=> #<Gymy::Application:0x007f8685fceca8
   @_all_autoload_paths=
    ["/Users/rahult/Development/katalyst/rails/koi/gymy/app/assets", ...],
   @_all_load_paths=
    ["/Users/rahult/Development/katalyst/rails/koi/gymy/lib", ...],
   @app=
    #<NewRelic::Agent::Instrumentation::MiddlewareProxy:0x007f8685fa4368

@rondale-sc
Copy link
Collaborator

I suspect this is okay. /cc @rwz

@rwz
Copy link
Collaborator

rwz commented Dec 8, 2014

That rack app hack should only happen in development. So my question would be why do you even have newrelic in development environment?

I don't feel it's safe to assume that any rack server starting in dev environment is a rails app. I believe this patch will break more code than it'll fix.

@rahult
Copy link
Author

rahult commented Dec 9, 2014

We generally use NewRelic in development to do some basic performance analysis. I can get away with not using it in development.

However I still think we should put a warning or an error message if EmberCLI.run! is not executed due to something like this. As otherwise it is hard to debug.

@rwz rwz closed this in 9dc5ae9 Dec 10, 2014
@rwz
Copy link
Collaborator

rwz commented Dec 10, 2014

Please check the new version I've just released. This problem should be fixed :)

@rahult
Copy link
Author

rahult commented Dec 11, 2014

Awesome dude, it is fixed now, thank you 😄

seanpdoyle added a commit that referenced this pull request Oct 29, 2015
Depends on [rondale-sc/ember-cli-rails-addon#][#15].

Closes [#220].

Exposes new public methods for `EmberCLI::App`:

* `#index_html` - return the EmebrCLI generated `index.html` string
* `#application_assets` - return the EmberCLI exposes app assets
* `#vendor_assets` - return the EmberCLI exposes vendor assets

Exposes new Rails helper:

* `include_ember_index_html` - Renders the `index.html` inline.
  Replaces EmberCLI asset paths with Sprockets asset paths

[#15]: rondale-sc/ember-cli-rails-addon#15
[#220]: #220
seanpdoyle added a commit that referenced this pull request Oct 29, 2015
Depends on [rondale-sc/ember-cli-rails-addon#][#15].

Closes [#220].

Exposes new public methods for `EmberCLI::App`:

* `#index_html` - return the EmberCLI generated `index.html` string
* `#application_assets` - return the EmberCLI exposes app assets
* `#vendor_assets` - return the EmberCLI exposes vendor assets

Exposes new Rails helper:

* `include_ember_index_html` - Renders the `index.html` inline.
  Replaces EmberCLI asset paths with Sprockets asset paths

[#15]: rondale-sc/ember-cli-rails-addon#15
[#220]: #220
seanpdoyle added a commit that referenced this pull request Oct 29, 2015
Depends on [rondale-sc/ember-cli-rails-addon#][#15].

Closes [#220].

Exposes new public methods for `EmberCLI::App`:

* `#index_html` - return the EmberCLI generated `index.html` string
* `#application_assets` - return the EmberCLI exposes app assets
* `#vendor_assets` - return the EmberCLI exposes vendor assets

Exposes new Rails helper:

* `include_ember_index_html` - Renders the `index.html` inline.
  Replaces EmberCLI asset paths with Sprockets asset paths

[#15]: rondale-sc/ember-cli-rails-addon#15
[#220]: #220
seanpdoyle added a commit that referenced this pull request Oct 29, 2015
Depends on [rondale-sc/ember-cli-rails-addon#][#15].

Closes [#220].

Exposes new public methods for `EmberCLI::App`:

* `#index_html` - return the EmberCLI generated `index.html` string
* `#application_assets` - return the EmberCLI exposes app assets
* `#vendor_assets` - return the EmberCLI exposes vendor assets

Exposes new Rails helper:

* `include_ember_index_html` - Renders the `index.html` inline.
  Replaces EmberCLI asset paths with Sprockets asset paths

[#15]: rondale-sc/ember-cli-rails-addon#15
[#220]: #220
seanpdoyle added a commit that referenced this pull request Oct 29, 2015
Depends on [rondale-sc/ember-cli-rails-addon#][#15].

Closes [#220].

Exposes new public methods for `EmberCLI::App`:

* `#index_html` - return the EmberCLI generated `index.html` string
* `#application_assets` - return the EmberCLI exposes app assets
* `#vendor_assets` - return the EmberCLI exposes vendor assets

Exposes new Rails helper:

* `include_ember_index_html` - Renders the `index.html` inline.
  Replaces EmberCLI asset paths with Sprockets asset paths

[#15]: rondale-sc/ember-cli-rails-addon#15
[#220]: #220
seanpdoyle added a commit that referenced this pull request Oct 29, 2015
Depends on [rondale-sc/ember-cli-rails-addon#][#15].

Closes [#220].

Exposes new public methods for `EmberCLI::App`:

* `#index_html` - return the EmberCLI generated `index.html` string
* `#application_assets` - return the EmberCLI exposes app assets
* `#vendor_assets` - return the EmberCLI exposes vendor assets

Exposes new Rails helper:

* `include_ember_index_html` - Renders the `index.html` inline.
  Replaces EmberCLI asset paths with Sprockets asset paths

[#15]: rondale-sc/ember-cli-rails-addon#15
[#220]: #220
seanpdoyle added a commit that referenced this pull request Oct 29, 2015
Depends on [rondale-sc/ember-cli-rails-addon#][#15].

Closes [#220].

Exposes new public methods for `EmberCLI::App`:

* `#index_html` - return the EmberCLI generated `index.html` string
* `#application_assets` - return the EmberCLI exposes app assets
* `#vendor_assets` - return the EmberCLI exposes vendor assets

Exposes new Rails helper:

* `include_ember_index_html` - Renders the `index.html` inline.
  Replaces EmberCLI asset paths with Sprockets asset paths

[#15]: rondale-sc/ember-cli-rails-addon#15
[#220]: #220
seanpdoyle added a commit that referenced this pull request Oct 29, 2015
Depends on [rondale-sc/ember-cli-rails-addon#][#15].

Closes [#220].

Exposes new public methods for `EmberCLI::App`:

* `#index_html` - return the EmberCLI generated `index.html` string
* `#application_assets` - return the EmberCLI exposes app assets
* `#vendor_assets` - return the EmberCLI exposes vendor assets

Exposes new Rails helper:

* `include_ember_index_html` - Renders the `index.html` inline.
  Replaces EmberCLI asset paths with Sprockets asset paths

[#15]: rondale-sc/ember-cli-rails-addon#15
[#220]: #220
seanpdoyle added a commit that referenced this pull request Oct 29, 2015
Depends on [rondale-sc/ember-cli-rails-addon#][#15].

Closes [#220].

Exposes new public methods for `EmberCLI::App`:

* `#index_html` - return the EmberCLI generated `index.html` string
* `#application_assets` - return the EmberCLI exposes app assets
* `#vendor_assets` - return the EmberCLI exposes vendor assets

Exposes new Rails helper:

* `include_ember_index_html` - Renders the `index.html` inline.
  Replaces EmberCLI asset paths with Sprockets asset paths

[#15]: rondale-sc/ember-cli-rails-addon#15
[#220]: #220
seanpdoyle added a commit that referenced this pull request Oct 29, 2015
Depends on [rondale-sc/ember-cli-rails-addon#][#15].

Closes [#220].

Exposes new public methods for `EmberCLI::App`:

* `#index_html` - return the EmberCLI generated `index.html` string
* `#application_assets` - return the EmberCLI exposes app assets
* `#vendor_assets` - return the EmberCLI exposes vendor assets

Exposes new Rails helper:

* `include_ember_index_html` - Renders the `index.html` inline.
  Replaces EmberCLI asset paths with Sprockets asset paths

[#15]: rondale-sc/ember-cli-rails-addon#15
[#220]: #220
seanpdoyle added a commit that referenced this pull request Oct 29, 2015
Depends on [rondale-sc/ember-cli-rails-addon#][#15].

Closes [#220].

Exposes new public methods for `EmberCLI::App`:

* `#index_html` - return the EmberCLI generated `index.html` string
* `#application_assets` - return the EmberCLI exposes app assets
* `#vendor_assets` - return the EmberCLI exposes vendor assets

Exposes new Rails helper:

* `include_ember_index_html` - Renders the `index.html` inline.
  Replaces EmberCLI asset paths with Sprockets asset paths

[#15]: rondale-sc/ember-cli-rails-addon#15
[#220]: #220
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants