Giter VIP home page Giter VIP logo

letter_opener_web's Introduction

letter_opener_web

Build Status Gem Version Code Climate

Gives letter_opener an interface for browsing sent emails.

Installation

First add the gem to your development environment and run the bundle command to install it.

group :development do
  gem 'letter_opener_web', '~> 3.0'
end

Usage

Add to your routes.rb:

Your::Application.routes.draw do
  mount LetterOpenerWeb::Engine, at: "/letter_opener" if Rails.env.development?
end

And make sure you have :letter_opener delivery method configured for your app. Then visit http://localhost:3000/letter_opener after sending an email and have fun.

If you are running the app from a Vagrant machine or Docker container, you might want to skip letter_opener's launchy calls and avoid messages like these:

12:33:42 web.1  | Failure in opening /vagrant/tmp/letter_opener/1358825621_ba83a22/rich.html
with options {}: Unable to find a browser command. If this is unexpected, Please rerun with
environment variable LAUNCHY_DEBUG=true or the '-d' commandline option and file a bug at
https://github.com/copiousfreetime/launchy/issues/new

In that case (or if you really just want to browse mails using the web interface and don't care about opening emails automatically), you can set :letter_opener_web as your delivery method on your config/environments/development.rb:

config.action_mailer.delivery_method = :letter_opener_web

If you're using :letter_opener_web as your delivery method, you can change the location of the letters by adding the following to an initializer (or in development.rb):

LetterOpenerWeb.configure do |config|
  config.letters_location = Rails.root.join('your', 'new', 'path')
end

Usage on pre-production environments

Some people use this gem on staging / pre-production environments to avoid having real emails being sent out. To set that up you'll need to:

  1. Move the gem out of the development group in your Gemfile
  2. Set config.action_mailer.delivery_method on the appropriate config/environments/<env>.rb
  3. Enable the route for the environments on your routes.rb.

In other words, your Gemfile will have:

gem 'letter_opener_web'

And your routes.rb:

Your::Application.routes.draw do
  # If you have a dedicated config/environments/staging.rb
  mount LetterOpenerWeb::Engine, at: "/letter_opener" if Rails.env.staging?

  # If you use RAILS_ENV=production in staging environments, you'll need another
  # way to disable it in "real production"
  mount LetterOpenerWeb::Engine, at: "/letter_opener" unless ENV["PRODUCTION_FOR_REAL"]
end

NOTICE: Using this gem on Heroku will only work if your app has just one Dyno and does not send emails from background jobs. For updates on this matter please subscribe to GH-35

Acknowledgements

Special thanks to @alexrothenberg for some ideas on this pull request and @pseudomuto for keeping the project alive for a few years.

Contributing

  1. Fork it and run bin/setup
  2. Create your feature branch (git switch -c my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

letter_opener_web's People

Contributors

amatsuda avatar ashmckenzie avatar byroot avatar davekaro avatar dee-see avatar evie404 avatar fgrehm avatar gogainda avatar graywh avatar iguchi1124 avatar ihatov08 avatar iurifq avatar joejwright avatar josisusan avatar kimrgrey avatar kmcphillips avatar koheisg avatar mdesantis avatar mjc-gh avatar nashby avatar olleolleolle avatar pseudomuto avatar rosenfeld avatar sauy7 avatar shishi avatar stevenharman avatar sunny avatar takikazuya avatar tricknotes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

letter_opener_web's Issues

NameError `letter_opener_web'

When trying to access /letter_opener

Showing C:/Dev/Ruby21-x64/lib/ruby/gems/2.1.0/gems/letter_opener_web-1.3.0/app/views/letter_opener_web/letters/index.html.erb where line #5 raised:

undefined local variable or method `letter_opener_web' for #<#<Class:0x0000000dbbeec0>:0x0000000dbe3630>

Beginning of trace:

letter_opener_web (1.3.0) app/views/letter_opener_web/letters/index.html.erb:5:in `_____ev__uby___x___lib_ruby_gems_______gems_letter_opener_web_______app_views_letter_opener_web_letters_index_html_erb___821572538_115672740'
actionview (4.2.0) lib/action_view/template.rb:145:in `block in render'
activesupport (4.2.0) lib/active_support/notifications.rb:166:in `instrument'
actionview (4.2.0) lib/action_view/template.rb:333:in `instrument'
actionview (4.2.0) lib/action_view/template.rb:143:in `render'
actionview (4.2.0) lib/action_view/renderer/template_renderer.rb:54:in `block (2 levels) in render_template'
actionview (4.2.0) lib/action_view/renderer/abstract_renderer.rb:39:in `block in instrument'
activesupport (4.2.0) lib/active_support/notifications.rb:164:in `block in instrument'
activesupport (4.2.0) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.2.0) lib/active_support/notifications.rb:164:in `instrument'

I have followed the instructions (with of course the gems in the gemfile),

mount LetterOpenerWeb::Engine, at: "/letter_opener", as: 'letter_opener'

config.action_mailer.delivery_method = :letter_opener # or letter_opener_web

I had managed to make it work at some point, but cannot figure out what goes wrong this time...

Error while accessing to /letter_opener

Environment:

  • ruby 2.1.2
  • rails 4.1.5
  • letter_opener 1.2.0
  • letter_opener_web 1.2.2
  • sprockets 2.11.0
  • sprockets-rails 2.1.4

LetterOpenerWeb relevant code parts:

  • config/development.rb
  config.action_mailer.delivery_method = :letter_opener_web`
  config.assets.precompile += %w( letter_opener_web/glyphicons-halflings.png
                                  letter_opener_web/glyphicons-halflings-white.png )
  • config/routes.rb
  mount LetterOpenerWeb::Engine, at: '/letter_opener'

Action: accessing at /letter_opener path

Error log:

Started GET "/letter_opener/" for 127.0.0.1 at 2014-09-12 10:27:21 +0200
Processing by LetterOpenerWeb::LettersController#index as HTML
  Rendered /home/user/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/letter_opener_web-1.2.2/app/views/letter_opener_web/letters/index.html.erb within layouts/letter_opener_web/application (9.3ms)
Completed 500 Internal Server Error in 620ms

ActionView::Template::Error (Asset names passed to helpers should not include the "/assets/" prefix. Instead of "/assets/letter_opener_web/blue-dot.ico", use "letter_opener_web/blue-dot.ico"):
    4:   <title>LetterOpenerWeb</title>
    5:   <%= stylesheet_link_tag    "letter_opener_web/application", :media => "all" %>
    6:   <%= javascript_include_tag "letter_opener_web/application" %>
    7:   <%= favicon_link_tag       asset_path("letter_opener_web/blue-dot.ico"), :rel => "icon" %>
    8:   <%= csrf_meta_tags %>
    9: </head>
   10: <body>
  sprockets-rails (2.1.4) lib/sprockets/rails/helper.rb:200:in `check_errors_for'
  sprockets-rails (2.1.4) lib/sprockets/rails/helper.rb:89:in `asset_path'
  actionview (4.1.5) lib/action_view/helpers/asset_url_helper.rb:281:in `image_path'
  actionview (4.1.5) lib/action_view/helpers/asset_tag_helper.rb:169:in `favicon_link_tag'
  letter_opener_web (1.2.2) app/views/layouts/letter_opener_web/application.html.erb:7:in `__home_user__rbenv_versions_______lib_ruby_gems_______gems_letter_opener_web_______app_views_layouts_letter_opener_web_application_html_erb___4194368318152562711_70049374559040'
  actionview (4.1.5) lib/action_view/template.rb:145:in `block in render'
  activesupport (4.1.5) lib/active_support/notifications.rb:161:in `instrument'
  actionview (4.1.5) lib/action_view/template.rb:339:in `instrument'
  actionview (4.1.5) lib/action_view/template.rb:143:in `render'
  actionview (4.1.5) lib/action_view/renderer/template_renderer.rb:67:in `render_with_layout'
  actionview (4.1.5) lib/action_view/renderer/template_renderer.rb:53:in `render_template'
  actionview (4.1.5) lib/action_view/renderer/template_renderer.rb:17:in `render'
  actionview (4.1.5) lib/action_view/renderer/renderer.rb:42:in `render_template'
  actionview (4.1.5) lib/action_view/renderer/renderer.rb:23:in `render'
  actionview (4.1.5) lib/action_view/rendering.rb:99:in `_render_template'
  actionpack (4.1.5) lib/action_controller/metal/streaming.rb:217:in `_render_template'
  actionview (4.1.5) lib/action_view/rendering.rb:82:in `render_to_body'
  actionpack (4.1.5) lib/action_controller/metal/rendering.rb:32:in `render_to_body'
  actionpack (4.1.5) lib/action_controller/metal/renderers.rb:32:in `render_to_body'
  actionpack (4.1.5) lib/abstract_controller/rendering.rb:25:in `render'
  actionpack (4.1.5) lib/action_controller/metal/rendering.rb:16:in `render'
  actionpack (4.1.5) lib/action_controller/metal/instrumentation.rb:41:in `block (2 levels) in render'
  activesupport (4.1.5) lib/active_support/core_ext/benchmark.rb:12:in `block in ms'
  /home/user/.rbenv/versions/2.1.2/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
  activesupport (4.1.5) lib/active_support/core_ext/benchmark.rb:12:in `ms'
  actionpack (4.1.5) lib/action_controller/metal/instrumentation.rb:41:in `block in render'
  actionpack (4.1.5) lib/action_controller/metal/instrumentation.rb:84:in `cleanup_view_runtime'
  activerecord (4.1.5) lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime'
  actionpack (4.1.5) lib/action_controller/metal/instrumentation.rb:40:in `render'
  actionpack (4.1.5) lib/action_controller/metal/implicit_render.rb:10:in `default_render'
  actionpack (4.1.5) lib/action_controller/metal/implicit_render.rb:5:in `send_action'
  actionpack (4.1.5) lib/abstract_controller/base.rb:189:in `process_action'
  actionpack (4.1.5) lib/action_controller/metal/rendering.rb:10:in `process_action'
  actionpack (4.1.5) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
  activesupport (4.1.5) lib/active_support/callbacks.rb:113:in `call'
  activesupport (4.1.5) lib/active_support/callbacks.rb:113:in `call'
  activesupport (4.1.5) lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
  activesupport (4.1.5) lib/active_support/callbacks.rb:149:in `call'
  activesupport (4.1.5) lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
  activesupport (4.1.5) lib/active_support/callbacks.rb:166:in `call'
  activesupport (4.1.5) lib/active_support/callbacks.rb:166:in `block in halting'
  activesupport (4.1.5) lib/active_support/callbacks.rb:229:in `call'
  activesupport (4.1.5) lib/active_support/callbacks.rb:229:in `block in halting'
  activesupport (4.1.5) lib/active_support/callbacks.rb:229:in `call'
  activesupport (4.1.5) lib/active_support/callbacks.rb:229:in `block in halting'
  activesupport (4.1.5) lib/active_support/callbacks.rb:166:in `call'
  activesupport (4.1.5) lib/active_support/callbacks.rb:166:in `block in halting'
  activesupport (4.1.5) lib/active_support/callbacks.rb:166:in `call'
  activesupport (4.1.5) lib/active_support/callbacks.rb:166:in `block in halting'
  activesupport (4.1.5) lib/active_support/callbacks.rb:86:in `call'
  activesupport (4.1.5) lib/active_support/callbacks.rb:86:in `run_callbacks'
  actionpack (4.1.5) lib/abstract_controller/callbacks.rb:19:in `process_action'
  actionpack (4.1.5) lib/action_controller/metal/rescue.rb:29:in `process_action'
  actionpack (4.1.5) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
  activesupport (4.1.5) lib/active_support/notifications.rb:159:in `block in instrument'
  activesupport (4.1.5) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (4.1.5) lib/active_support/notifications.rb:159:in `instrument'
  actionpack (4.1.5) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
  actionpack (4.1.5) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
  activerecord (4.1.5) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
  actionpack (4.1.5) lib/abstract_controller/base.rb:136:in `process'
  actionview (4.1.5) lib/action_view/rendering.rb:30:in `process'
  actionpack (4.1.5) lib/action_controller/metal.rb:196:in `dispatch'
  actionpack (4.1.5) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
  actionpack (4.1.5) lib/action_controller/metal.rb:232:in `block in action'
  actionpack (4.1.5) lib/action_dispatch/routing/route_set.rb:82:in `call'
  actionpack (4.1.5) lib/action_dispatch/routing/route_set.rb:82:in `dispatch'
  actionpack (4.1.5) lib/action_dispatch/routing/route_set.rb:50:in `call'
  actionpack (4.1.5) lib/action_dispatch/journey/router.rb:71:in `block in call'
  actionpack (4.1.5) lib/action_dispatch/journey/router.rb:59:in `each'
  actionpack (4.1.5) lib/action_dispatch/journey/router.rb:59:in `call'
  actionpack (4.1.5) lib/action_dispatch/routing/route_set.rb:678:in `call'
  railties (4.1.5) lib/rails/engine.rb:514:in `call'
  railties (4.1.5) lib/rails/railtie.rb:194:in `public_send'
  railties (4.1.5) lib/rails/railtie.rb:194:in `method_missing'
  actionpack (4.1.5) lib/action_dispatch/journey/router.rb:71:in `block in call'
  actionpack (4.1.5) lib/action_dispatch/journey/router.rb:59:in `each'
  actionpack (4.1.5) lib/action_dispatch/journey/router.rb:59:in `call'
  actionpack (4.1.5) lib/action_dispatch/routing/route_set.rb:678:in `call'
  omniauth (1.2.2) lib/omniauth/strategy.rb:186:in `call!'
  omniauth (1.2.2) lib/omniauth/strategy.rb:164:in `call'
  warden (1.2.3) lib/warden/manager.rb:35:in `block in call'
  warden (1.2.3) lib/warden/manager.rb:34:in `catch'
  warden (1.2.3) lib/warden/manager.rb:34:in `call'
  rack (1.5.2) lib/rack/etag.rb:23:in `call'
  rack (1.5.2) lib/rack/conditionalget.rb:25:in `call'
  rack (1.5.2) lib/rack/head.rb:11:in `call'
  actionpack (4.1.5) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
  actionpack (4.1.5) lib/action_dispatch/middleware/flash.rb:254:in `call'
  rack (1.5.2) lib/rack/session/abstract/id.rb:225:in `context'
  rack (1.5.2) lib/rack/session/abstract/id.rb:220:in `call'
  actionpack (4.1.5) lib/action_dispatch/middleware/cookies.rb:560:in `call'
  activerecord (4.1.5) lib/active_record/query_cache.rb:36:in `call'
  activerecord (4.1.5) lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call'
  activerecord (4.1.5) lib/active_record/migration.rb:380:in `call'
  actionpack (4.1.5) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
  activesupport (4.1.5) lib/active_support/callbacks.rb:82:in `run_callbacks'
  actionpack (4.1.5) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  actionpack (4.1.5) lib/action_dispatch/middleware/reloader.rb:73:in `call'
  actionpack (4.1.5) lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
  actionpack (4.1.5) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
  actionpack (4.1.5) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  railties (4.1.5) lib/rails/rack/logger.rb:38:in `call_app'
  railties (4.1.5) lib/rails/rack/logger.rb:20:in `block in call'
  activesupport (4.1.5) lib/active_support/tagged_logging.rb:68:in `block in tagged'
  activesupport (4.1.5) lib/active_support/tagged_logging.rb:26:in `tagged'
  activesupport (4.1.5) lib/active_support/tagged_logging.rb:68:in `tagged'
  railties (4.1.5) lib/rails/rack/logger.rb:20:in `call'
  quiet_assets (1.0.3) lib/quiet_assets.rb:23:in `call_with_quiet_assets'
  actionpack (4.1.5) lib/action_dispatch/middleware/request_id.rb:21:in `call'
  rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
  rack (1.5.2) lib/rack/runtime.rb:17:in `call'
  activesupport (4.1.5) lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
  rack (1.5.2) lib/rack/lock.rb:17:in `call'
  actionpack (4.1.5) lib/action_dispatch/middleware/static.rb:64:in `call'
  rack (1.5.2) lib/rack/sendfile.rb:112:in `call'
  railties (4.1.5) lib/rails/engine.rb:514:in `call'
  railties (4.1.5) lib/rails/application.rb:144:in `call'
  rack (1.5.2) lib/rack/lock.rb:17:in `call'
  rack (1.5.2) lib/rack/content_length.rb:14:in `call'
  rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'

Heroku - worker support

Hi guys

It seems letter_opener_web won't be much of use on heroku. I would assume that most people use workers to send their emails.

As far as i understand this workers and all dynos have isolated environments. Thus it can't really reach the same /tmp directory.

Thinking about it makes as a lot of sense.
A workaround would be s3 support i guess. Unfortunately i personally can't implement that right now. But i think it would be worth the note in the README that it only works on heroku under certain conditions. Simply to save the time of the next person ;)

best wishes
Andreas

Rails 6.0 is out

Hi folks,

It look like Rails 6.0 is finally out but letter_opener_web requires an older version of railties.

Thanks a lot to anyone who can help on this.

Change location

I'd like to change the default location Rails.root.join('tmp', 'letter_opener') by a custom one.

Is there any way to achieve that ? I've seed that the location is also present in LetterOpenerWeb::Letter.letters_location

DELETE routes are failing

Every time I tried to remove a message or clear all the messages I got this error:
error1

At my router.rb I added:

if Rails.env.development?
  mount LetterOpenerWeb::Engine, at: '/letter_opener'
end

And this is what I get when I run rake routes:

              letter_opener_web        /letter_opener                              LetterOpenerWeb::Engine
                    sidekiq_web        /sidekiq                                    Sidekiq::Web
                           root GET    /                                           redirect(301, http://gridleague-dev.com)

Routes for LetterOpenerWeb::Engine:
clear_letters DELETE /clear(.:format)                 letter_opener_web/letters#clear
delete_letter DELETE /:id(.:format)                   letter_opener_web/letters#destroy
      letters GET    /                                letter_opener_web/letters#index
       letter GET    /:id(/:style)(.:format)          letter_opener_web/letters#show
              GET    /:id/attachments/:file(.:format) letter_opener_web/letters#attachment

For some reason it calls using POST but should use DELETE instead.

malformed XML: missing tag start

Hi,

I'd like to open HTML messages and get the following XML error.
What can I do?

REXML::ParseException at /1410350525_4f84502/rich 
malformed XML: missing tag start
Line: 1
Position: 224
Last 80 unconsumed characters:
<a href="http://localhost"style="padding: 0

Empty output on SMIME signed email

Hello, we are working on an MR to add SMIME signing support to gitlab-ce, and we just noticed that rendering of the signed messages doesn't work, we get blank output (attached screenshots). This might be somehow expected since the component doesn't mention any SMIME support.

I'm not sure if this is an issue directly here, or the underlying letter_opener engine (or even maybe directly on rails / gitlab). Since gitlab is not giving me much log info, I'm not sure where to tackle this.

Any guidance is welcome. Thanks!

image

image

Wrong layout used in rails 5.1.4

In Rails 5.1.4 letter_opener uses default (application) layout.

Ruby: ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
Rails: 5.1.4

Routes:

if Rails.env.development?
    mount LetterOpenerWeb::Engine, at: '/letter_opener'
  end

environments/development.rb

config.action_mailer.delivery_method = :letter_opener_web

Screenshot:
buts - google chrome 2018-04-16 09 20 17

License missing from gemspec

RubyGems.org doesn't report a license for your gem. This is because it is not specified in the gemspec of your last release.

via e.g.

spec.license = 'MIT'
# or
spec.licenses = ['MIT', 'GPL-2']

Including a license in your gemspec is an easy way for rubygems.org and other tools to check how your gem is licensed. As you can imagine, scanning your repository for a LICENSE file or parsing the README, and then attempting to identify the license or licenses is much more difficult and more error prone. So, even for projects that already specify a license, including a license in your gemspec is a good practice. See, for example, how rubygems.org uses the gemspec to display the rails gem license.

There is even a License Finder gem to help companies/individuals ensure all gems they use meet their licensing needs. This tool depends on license information being available in the gemspec. This is an important enough issue that even Bundler now generates gems with a default 'MIT' license.

I hope you'll consider specifying a license in your gemspec. If not, please just close the issue with a nice message. In either case, I'll follow up. Thanks for your time!

Appendix:

If you need help choosing a license (sorry, I haven't checked your readme or looked for a license file), GitHub has created a license picker tool. Code without a license specified defaults to 'All rights reserved'-- denying others all rights to use of the code.
Here's a list of the license names I've found and their frequencies

p.s. In case you're wondering how I found you and why I made this issue, it's because I'm collecting stats on gems (I was originally looking for download data) and decided to collect license metadata,too, and make issues for gemspecs not specifying a license as a public service :). See the previous link or my blog post about this project for more information.

Release v1.3.1

Hey @fgrehm, you mentioned I should ping you when I was ready to cut a new release. In an effort to get the rails 5 stuff out, I want to make a 1.3.1 release using 78f81e0.

Would you be able to give me push access to rubygems?

Update to latest bootstrap release (or use another framework)

Project is using a really old release of bootstrap (2.2.2), I think we should update to the latest release available or use another lightweight framework.

The project's UI is super simple that we could even just get away with a reset framework + a handful of styles.

cc @pseudomuto in case you have any thoughts (also sorry for the @ spam today, I'm using the gem on a few side projects now)

Add a destroy configuration

I'm using this gem in a staging environment. I'd like to know if you can accept a PR that adds the ability to destroy old emails ?

For example, destroy all emails older than 3 days.

Timezone (Sent at)

Is it possible to use the timezone set in config/application.rb for "Sent at" values?

Looking for custom fonts

Since I added some fonts to my application I run into a lot of errors from letter opener. It's trying to access the fonts the rest of the website uses. It still works, but became extremely slow because errors are generated for every font (whose path isn't resolved correctly)

ActionController::RoutingError (No route matches [GET] "/letter_opener/1462018835_172e07c/Montserrat/montserrat-regular-webfont.ttf")

How does the asset pipeline works with letter_opener ? Is it grabbing all the styles also defined in application.scss ? How can I either prevent letter_opener from looting my styles, or fix the path resolution so it actually works (and stops polluting my terminal with error messages).

Those fonts are in app/assets/fonts/xxx/xxx/ttf

Missing gem dependency on rexml

I've noticed that rexml is a required gem:

require 'rexml/document'

Yet it is not mentioned as a runtime dependency in gemspec:

gem.add_dependency 'actionmailer', '>= 3.2'
gem.add_dependency 'letter_opener', '~> 1.0'
gem.add_dependency 'railties', '>= 3.2'

Is it intentional?

If not, perhaps it went unnoticed because development dependencies bring it to the load path.

Rails 5: api mode - undefined method `assets`

Getting this for clear rails 5 api-only app (rails new myapp --api):

/home/oivai/.rvm/gems/ruby-2.3.0/bundler/gems/rails-513f72804d80/railties/lib/rails/railtie/configuration.rb:95:in `method_missing': undefined met
hod `assets' for #<Rails::Application::Configuration:0x000000047352b8> (NoMethodError)
Did you mean?  asset_host
        from /home/oivai/.rvm/gems/ruby-2.3.0/bundler/gems/letter_opener_web-55c581e463e7/lib/letter_opener_web/engine.rb:16:in `block in <class:E
ngine>'
        from /home/oivai/.rvm/gems/ruby-2.3.0/bundler/gems/rails-513f72804d80/railties/lib/rails/initializable.rb:30:in `instance_exec'
        from /home/oivai/.rvm/gems/ruby-2.3.0/bundler/gems/rails-513f72804d80/railties/lib/rails/initializable.rb:30:in `run'
        from /home/oivai/.rvm/gems/ruby-2.3.0/bundler/gems/rails-513f72804d80/railties/lib/rails/initializable.rb:55:in `block in run_initializers
'

Is there a workaround?
Thank you!

html / plain text views

any thoughts on adding a radio toggle [html] | [text] similar to letter_opener

if so, I'd think to the left or right of the headers area

default to [html], (not sure about desired persistency behavior when navigating from one mail to the next)

Reading application.scss under the node_modules directory?

I have a problem with Sass::SyntaxError in LetterOpenerWeb::Letters#index occurs.

Environment

  • ruby 2.5.0p0
  • rails 5.2.0
  • letter_opener_web 1.3.4

Steps to reproduce the problem

# With letter_opener_web working properly

$ mkdir -p node_modules/foobar
$ touch node_modules/foobar/application.scss
$ echo ".foo { top: \$bar; }" > node_modules/foobar/application.scss
$ open http://localhost:3000/letter_opener

# An error occurs

Error

image

Is this a bug?
Why are you reading application.scss under the node_modules directory?

Thanks ๐Ÿ˜ƒ

Execution of ApplicationController filters

I have a problem with version 1.3.2.
The filters defined in ApplicationController of my application (app/controllers/application_controller.rb) are executed when accessising the list of emails.

This is strange beacuse LettersController (app/controllers/letter_opener_web/letters_controller.rb) inherits from ApplicationController defined within the gem (app/controllers/letter_opener_web/application_controller.rb).

Any idea on how to solve this issue?

Many thanks in advance.

Override Controllers

This gem is cool, and for my web application, it could actually be used as a core function by users themselves.

For example, project managers could see the emails that have been sent by themselves through the Rails app (and maybe even some other emails sent by the application itself, or other users) to the team they manage, etc.

Is it possible to easily override some controllers, so as to implement access control with the users, and eventually put the mails sent into specific subfolders, to which access control could be applied ?

[Exception] "undefined method `before_filter' for LetterOpenerWeb::LettersController:Class" on Rails5

Environment:

  • ruby: 2.3.1
  • rails: 5.1.1

How to reproduce

  1. Instal rails v5.1.x and letter_opneer_web
  2. Configure and open the web page

Stacktrace:

ActionController::RoutingError - undefined method `before_filter' for LetterOpenerWeb::LettersController:Class
Did you mean?  before_action:
  actionpack (5.1.1) lib/action_dispatch/routing/route_set.rb:45:in `rescue in controller'
  actionpack (5.1.1) lib/action_dispatch/routing/route_set.rb:43:in `controller'
  actionpack (5.1.1) lib/action_dispatch/routing/route_set.rb:29:in `serve'
  actionpack (5.1.1) lib/action_dispatch/journey/router.rb:46:in `block in serve'
  actionpack (5.1.1) lib/action_dispatch/journey/router.rb:33:in `serve'
  actionpack (5.1.1) lib/action_dispatch/routing/route_set.rb:832:in `call'
  railties (5.1.1) lib/rails/engine.rb:522:in `call'
  railties (5.1.1) lib/rails/railtie.rb:185:in `method_missing'
  actionpack (5.1.1) lib/action_dispatch/routing/mapper.rb:17:in `block in <class:Constraints>'
  actionpack (5.1.1) lib/action_dispatch/routing/mapper.rb:46:in `serve'
  actionpack (5.1.1) lib/action_dispatch/journey/router.rb:46:in `block in serve'
  actionpack (5.1.1) lib/action_dispatch/journey/router.rb:33:in `serve'
  actionpack (5.1.1) lib/action_dispatch/routing/route_set.rb:832:in `call'

I came across this commend. #46 (comment)
May I ask, does this gem not work with Rails 5 yet?

Missing Template Error

I'm trying to integrate letter_opener_web into a rails 4.0 application, and I"m getting this error when trying to view the letter through the interface:

Missing template letter_opener_web/letters/show, letter_opener_web/application/show with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :raw, :ruby, :coffee, :jbuilder, :slim]}. Searched in:

  • "/Users/adamgriffis/projects/SingleOps2/app/views"
  • "/Users/adamgriffis/.rvm/gems/ruby-2.1.2@SingleOps/gems/letter_opener_web-1.3.4/app/views"
  • "/Users/adamgriffis/.rvm/gems/ruby-2.1.2@SingleOps/gems/wash_out-0.12.0/app/views"
  • "/Users/adamgriffis/.rvm/gems/ruby-2.1.2@SingleOps/gems/kaminari-0.14.1/app/views"
  • "/Users/adamgriffis/.rvm/gems/ruby-2.1.2@SingleOps/bundler/gems/devise_security_extension-2e8703e5ef7b/app/views"
  • "/Users/adamgriffis/.rvm/gems/ruby-2.1.2@SingleOps/gems/devise_invitable-1.2.1/app/views"
  • "/Users/adamgriffis/.rvm/gems/ruby-2.1.2@SingleOps/gems/devise-3.0.0/app/views"

screen shot 2018-05-25 at 11 28 14 pm

Mounting Letter_Opener overrides any authentication

It looks like the default ApplicationController bundled in app/controllers overrides the target rails project ApplicationController. Therefore even if you have a default authentication method in your project's ApplicationController you can still browse directly to /letter_opener without authenticating.

:(

Eliminate need to require the gem in every environment

The way the gem initialization works, it is not possible to write

gem 'letter_opener_web', require: false

and adding

require 'letter_opener_web'

at the top of the desired environment configuration file(s).

This means letter_opener_web is loaded (and the delivery method registered etc.) in production where I certainly do not need it.

Add attachment viewing

I'd like to start off by thanking you for writing this gem. It's exactly what I was looking for!

Now, the only issue I have with it is that the attachment links don't work. I can still access them manually by browsing through tmp/letter_opener, but clicking on an attachment link from an email ends up with an error like:

No route matches [GET] "/letter_opener/1361154900_84ed2d3/foo.csv"

I tried to find an easy workaround, but Rails doesn't make it easy to define a random static directory from which to serve files.

Usage with Rails app installed in a sub-URI

I recently used the letter_opener_web gem on a Bitnami Redmine stack (which has the Rails app installed in a sub-URI [using Rails' config.action_controller.relative_url_root]) and I had to do some additional configuration (modification) to get the whole thing to run. As this might be useful to others too, I decided to post this issue.

I installed the gem, added the route to the engine and browsed to the set URL. The page opened without errors and the already received mails were picked-up and shown correctly.
However, three things didn't work:

  1. 'View plain text version' links resulted in a 404 within the frame
  2. Individual mail's delete buttons resulted in a 404 within the document, but the mails actually got deleted
  3. 'Clear' button resulted in a 404 within the document, but all mails actually got deleted

All these 404's showed me letter_opener_web URL's missing the sub-URI part of my Rails app. After some investigation I found out that I had to manually add the sub-URI to the routes of letter_opener_web. So I added Rails.application.routes.default_url_options[:script_name] = '/sub-URI' to LetterOpenerWeb::Engine.routes (by modifying https://github.com/fgrehm/letter_opener_web/blob/master/config/routes.rb), restarted the whole stack and tried it again. All earlier issues got resolved.

Environment:

  • Bitnami Redmine stack: 3.3.1-0-windows
  • Rails: 4.2.7.1
  • letter_opener: 1.4.1
  • letter_opener_web: 1.3.0

SystemStackError occures when more than 30 messages.

I have a problem with SystemStackError occures.

SystemStackError - stack level too deep:

Reproduction method:

  1. more than 30 messages in /inbox.
  2. access to /inbox page.

Environment:
Ruby v2.5.1
Rails v5.1.4
letter_opener_web v1.3.4

Does not work with Rails API only

1: from /bundle/gems/letter_opener_web-1.3.3/lib/letter_opener_web/engine.rb:21:in `block in <class:Engine>'
api_1         | /bundle/gems/railties-5.1.5/lib/rails/railtie/configuration.rb:95:in `method_missing': undefined method `assets' for #<Rails::Application::Configuration:0x000056411caebd58> (NoMethodError)

Rails 5 deprecation warning

I've been testing GitLab with Rails 5, and ran into this deprecation warning when I went to our Letter Opener route:

Started GET "/rails/letter_opener/1468524894_56e3355/rich" for 127.0.0.1 at 2016-07-27 14:05:57 -0600
Processing by LetterOpenerWeb::LettersController#show as HTML
  Parameters: {"id"=>"1468524894_56e3355", "style"=>"rich"}
DEPRECATION WARNING: `render :text` is deprecated because it does not actually render a `text/plain` response. Switch to `render plain: 'plain text'` to render as `text/plain`, `render html: '<strong>HTML</strong>'` to render as `text/html`, or `render body: 'raw'` to match the deprecated behavior and render with the default Content-Type, which is `text/plain`.

Context of deprecating this:

I can provide an example app if you'd like me to.

letter_opener_web/application_controller (LoadError) on production

routes.rb

begin
      require 'letter_opener_web/engine'
      mount LetterOpenerWeb::Engine, at: '/letter_opener'
    rescue LoadError => e
      # not installed
    end
group :development, :beta do
  gem 'better_errors'
  gem 'binding_of_caller'
  gem 'letter_opener_web'
end
No such file to load -- letter_opener_web/application_controller (LoadError)
  /var/www/apps/cms/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `require'
  /var/www/apps/cms/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `block in require'
  /var/www/apps/cms/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:232:in `load_dependency'
  /var/www/apps/cms/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `require'
  /var/www/apps/cms/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:348:in `require_or_load'
  /var/www/apps/cms/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:307:in `depend_on'
  /var/www/apps/cms/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:225:in `require_dependency'
  /var/www/apps/cms/shared/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/engine.rb:468:in `block (2 levels) in eager_load!'
  /var/www/apps/cms/shared/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/engine.rb:467:in `each'
  /var/www/apps/cms/shared/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/engine.rb:467:in `block in eager_load!'
  /var/www/apps/cms/shared/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/engine.rb:465:in `each'
  /var/www/apps/cms/shared/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/engine.rb:465:in `eager_load!'
  /var/www/apps/cms/shared/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/engine.rb:346:in `eager_load!'
  /var/www/apps/cms/shared/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/application/finisher.rb:58:in `each'
  /var/www/apps/cms/shared/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/application/finisher.rb:58:in `block in <module:Finisher>'
  /var/www/apps/cms/shared/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/initializable.rb:30:in `instance_exec'
  /var/www/apps/cms/shared/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/initializable.rb:30:in `run'
  /var/www/apps/cms/shared/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/initializable.rb:55:in `block in run_initializers'
  /home/webserver/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
  /home/webserver/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
  /home/webserver/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
  /home/webserver/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
  /home/webserver/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `each'
  /home/webserver/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `call'
  /home/webserver/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
  /home/webserver/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
  /home/webserver/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
  /var/www/apps/cms/shared/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/initializable.rb:54:in `run_initializers'
  /var/www/apps/cms/shared/bundle/ruby/2.1.0/gems/railties-4.1.7/lib/rails/application.rb:300:in `initialize!'
  /var/www/apps/cms/releases/20141117010133/config/environment.rb:7:in `<top (required)>'
  config.ru:3:in `require'
  config.ru:3:in `block in <main>'
  /var/www/apps/cms/shared/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
  /var/www/apps/cms/shared/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
  config.ru:1:in `new'
  config.ru:1:in `<main>'
  /home/webserver/.rvm/gems/ruby-2.1.2/gems/passenger-4.0.46/helper-scripts/rack-preloader.rb:112:in `eval'
  /home/webserver/.rvm/gems/ruby-2.1.2/gems/passenger-4.0.46/helper-scripts/rack-preloader.rb:112:in `preload_app'
  /home/webserver/.rvm/gems/ruby-2.1.2/gems/passenger-4.0.46/helper-scripts/rack-preloader.rb:158:in `<module:App>'
  /home/webserver/.rvm/gems/ruby-2.1.2/gems/passenger-4.0.46/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
  /home/webserver/.rvm/gems/ruby-2.1.2/gems/passenger-4.0.46/helper-scripts/rack-preloader.rb:28:in `<main>'

rails 4.1.7

NoMethodError in LetterOpenerWeb::LettersController#show

Got a bit of an issue loading emails:

Rails 3.2.X
Ruby 1.9.X

any suggestions?

Email is view able in tmp/letter_opener

http://awesomescreenshot.com/0ef5rbesc0


NoMethodError in LetterOpenerWeb::LettersController#show

undefined method `segment_keys' for nil:NilClass

Rails.root: /home/thief/dev/flight
Application Trace | Framework Trace | Full Trace

actionpack (3.2.22) lib/action_dispatch/routing/mapper.rb:443:in `block (2 levels) in define_generate_prefix'
actionpack (3.2.22) lib/action_dispatch/routing/route_set.rb:589:in `url_for'
actionpack (3.2.22) lib/action_dispatch/routing/route_set.rb:342:in `url_for'
actionpack (3.2.22) lib/action_dispatch/routing/route_set.rb:216:in `letter_path'
letter_opener_web (1.3.0) app/controllers/letter_opener_web/letters_controller.rb:14:in `show'
actionpack (3.2.22) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (3.2.22) lib/abstract_controller/base.rb:167:in `process_action'
actionpack (3.2.22) lib/action_controller/metal/rendering.rb:10:in `process_action'
actionpack (3.2.22) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
activesupport (3.2.22) lib/active_support/callbacks.rb:481:in `block in _run__2034020397138380733__process_action__1798997043620149784__callbacks'
activesupport (3.2.22) lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_10409'
activesupport (3.2.22) lib/active_support/callbacks.rb:326:in `around'
activesupport (3.2.22) lib/active_support/callbacks.rb:310:in `_callback_around_13'
activesupport (3.2.22) lib/active_support/callbacks.rb:214:in `_conditional_callback_around_10409'
activesupport (3.2.22) lib/active_support/callbacks.rb:403:in `_run__2034020397138380733__process_action__1798997043620149784__callbacks'
activesupport (3.2.22) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.22) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
activesupport (3.2.22) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.22) lib/abstract_controller/callbacks.rb:17:in `process_action'
actionpack (3.2.22) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (3.2.22) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
activesupport (3.2.22) lib/active_support/notifications.rb:123:in `block in instrument'
activesupport (3.2.22) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (3.2.22) lib/active_support/notifications.rb:123:in `instrument'
actionpack (3.2.22) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
actionpack (3.2.22) lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
activerecord (3.2.22) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/rails3/action_controller.rb:30:in `block in process_action'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/controller_instrumentation.rb:362:in `perform_action_with_newrelic_trace'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/rails3/action_controller.rb:29:in `process_action'
actionpack (3.2.22) lib/abstract_controller/base.rb:121:in `process'
actionpack (3.2.22) lib/abstract_controller/rendering.rb:45:in `process'
rack-mini-profiler (0.9.7) lib/mini_profiler/profiling_methods.rb:106:in `block in profile_method'
actionpack (3.2.22) lib/action_controller/metal.rb:203:in `dispatch'
actionpack (3.2.22) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
actionpack (3.2.22) lib/action_controller/metal.rb:246:in `block in action'
actionpack (3.2.22) lib/action_dispatch/routing/route_set.rb:73:in `call'
actionpack (3.2.22) lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
actionpack (3.2.22) lib/action_dispatch/routing/route_set.rb:36:in `call'
journey (1.0.4) lib/journey/router.rb:68:in `block in call'
journey (1.0.4) lib/journey/router.rb:56:in `each'
journey (1.0.4) lib/journey/router.rb:56:in `call'
actionpack (3.2.22) lib/action_dispatch/routing/route_set.rb:608:in `call'
railties (3.2.22) lib/rails/engine.rb:484:in `call'
railties (3.2.22) lib/rails/railtie/configurable.rb:30:in `method_missing'
actionpack (3.2.22) lib/action_dispatch/routing/mapper.rb:43:in `call'
journey (1.0.4) lib/journey/router.rb:68:in `block in call'
journey (1.0.4) lib/journey/router.rb:56:in `each'
journey (1.0.4) lib/journey/router.rb:56:in `call'
actionpack (3.2.22) lib/action_dispatch/routing/route_set.rb:608:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
omniauth (1.2.2) lib/omniauth/strategy.rb:186:in `call!'
omniauth (1.2.2) lib/omniauth/strategy.rb:164:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
omniauth (1.2.2) lib/omniauth/builder.rb:59:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
bullet (4.14.7) lib/bullet/rack.rb:12:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
meta_request (0.3.4) lib/meta_request/middlewares/app_request_handler.rb:13:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
meta_request (0.3.4) lib/meta_request/middlewares/meta_request_handler.rb:13:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/rack/agent_hooks.rb:30:in `traced_call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/rack/browser_monitoring.rb:32:in `traced_call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
railties (3.2.22) lib/rails/rack/log_tailer.rb:17:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
rack-attack (4.3.0) lib/rack/attack.rb:97:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
warden (1.1.1) lib/warden/manager.rb:35:in `block in call'
warden (1.1.1) lib/warden/manager.rb:34:in `catch'
warden (1.1.1) lib/warden/manager.rb:34:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
actionpack (3.2.22) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
rack (1.4.7) lib/rack/etag.rb:23:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
rack (1.4.7) lib/rack/conditionalget.rb:25:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
actionpack (3.2.22) lib/action_dispatch/middleware/head.rb:14:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
actionpack (3.2.22) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
actionpack (3.2.22) lib/action_dispatch/middleware/flash.rb:242:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
rack (1.4.7) lib/rack/session/abstract/id.rb:210:in `context'
rack (1.4.7) lib/rack/session/abstract/id.rb:205:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
actionpack (3.2.22) lib/action_dispatch/middleware/cookies.rb:341:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
activerecord (3.2.22) lib/active_record/query_cache.rb:64:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
activerecord (3.2.22) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
actionpack (3.2.22) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
activesupport (3.2.22) lib/active_support/callbacks.rb:405:in `_run__3710090046209339660__call__4369487391565187203__callbacks'
activesupport (3.2.22) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.22) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
activesupport (3.2.22) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.22) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
rails-dev-tweaks (1.2.0) lib/rails_dev_tweaks/granular_autoload/middleware.rb:36:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
actionpack (3.2.22) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
rack-contrib (1.2.0) lib/rack/contrib/response_headers.rb:17:in `call'
meta_request (0.3.4) lib/meta_request/middlewares/headers.rb:16:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
actionpack (3.2.22) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
actionpack (3.2.22) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
/home/thief/.rbenv/versions/1.9.3-p551/gemsets/mfl-32/bundler/gems/browserlog-45c27272346e/lib/browserlog/selective_logger.rb:16:in `call_app'
railties (3.2.22) lib/rails/rack/logger.rb:18:in `call'
quiet_assets (1.1.0) lib/quiet_assets.rb:27:in `call_with_quiet_assets'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
request_store (1.2.0) lib/request_store/middleware.rb:8:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
actionpack (3.2.22) lib/action_dispatch/middleware/request_id.rb:22:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
rack (1.4.7) lib/rack/methodoverride.rb:21:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
rack (1.4.7) lib/rack/runtime.rb:17:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
activesupport (3.2.22) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
rack (1.4.7) lib/rack/lock.rb:15:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
actionpack (3.2.22) lib/action_dispatch/middleware/static.rb:83:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
rack-mini-profiler (0.9.7) lib/mini_profiler/profiler.rb:276:in `call'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
railties (3.2.22) lib/rails/engine.rb:484:in `call'
railties (3.2.22) lib/rails/application.rb:231:in `call'
railties (3.2.22) lib/rails/railtie/configurable.rb:30:in `method_missing'
newrelic_rpm (3.14.0.305) lib/new_relic/agent/instrumentation/middleware_tracing.rb:78:in `call'
rack (1.4.7) lib/rack/content_length.rb:14:in `call'
railties (3.2.22) lib/rails/rack/log_tailer.rb:17:in `call'
thin (1.6.3) lib/thin/connection.rb:86:in `block in pre_process'
thin (1.6.3) lib/thin/connection.rb:84:in `catch'
thin (1.6.3) lib/thin/connection.rb:84:in `pre_process'
thin (1.6.3) lib/thin/connection.rb:53:in `process'
thin (1.6.3) lib/thin/connection.rb:39:in `receive_data'
eventmachine (1.0.8) lib/eventmachine.rb:1509:in `event_callback'
eventmachine (1.0.8) lib/em/pure_ruby.rb:544:in `block in eventable_read'
eventmachine (1.0.8) lib/em/pure_ruby.rb:542:in `times'
eventmachine (1.0.8) lib/em/pure_ruby.rb:542:in `eventable_read'
/home/thief/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/forwardable.rb:201:in `eventable_read'
eventmachine (1.0.8) lib/em/pure_ruby.rb:369:in `block in crank_selectables'
eventmachine (1.0.8) lib/em/pure_ruby.rb:369:in `each'
eventmachine (1.0.8) lib/em/pure_ruby.rb:369:in `crank_selectables'
eventmachine (1.0.8) lib/em/pure_ruby.rb:324:in `block in run'
eventmachine (1.0.8) lib/em/pure_ruby.rb:318:in `loop'
eventmachine (1.0.8) lib/em/pure_ruby.rb:318:in `run'
eventmachine (1.0.8) lib/em/pure_ruby.rb:62:in `run_machine'
eventmachine (1.0.8) lib/eventmachine.rb:193:in `run'
thin (1.6.3) lib/thin/backends/base.rb:73:in `start'
thin (1.6.3) lib/thin/server.rb:162:in `start'
rack (1.4.7) lib/rack/handler/thin.rb:13:in `run'
rack (1.4.7) lib/rack/server.rb:268:in `start'
railties (3.2.22) lib/rails/commands/server.rb:70:in `start'
zeus (0.15.4) lib/zeus/rails.rb:160:in `server'
zeus (0.15.4) lib/zeus.rb:148:in `block in command'
zeus (0.15.4) lib/zeus.rb:135:in `fork'
zeus (0.15.4) lib/zeus.rb:135:in `command'
zeus (0.15.4) lib/zeus.rb:50:in `go'
-e:1:in `<main>'

Request

Parameters:

{"id"=>"1459521465_8b3f119",
 "style"=>"rich"}

Show session dump

Show env dump
Response

Headers:

None

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.