Skip to content

Instantly share code, notes, and snippets.

@juno
Created November 15, 2013 07:44
Show Gist options
  • Save juno/7480622 to your computer and use it in GitHub Desktop.
Save juno/7480622 to your computer and use it in GitHub Desktop.
Investigating xray-rails 0.1.7 prob. https://github.com/brentd/xray-rails/issues/29

Create new Rails app with Rails 4.0.1.

$ rails -v
Rails 4.0.1
$ rails new xray-rails-example
$ cd xray-rails-example

Generate a controller and action (home/index).

$ rails g controller home index

Bundle with xray-rails 0.1.6.

$ vi Gemfile
gem 'xray-rails', '0.1.6'
$ bundle

Run server and access to home/index.

$ rails s
$ open http://localhost:3000/home/index

Started GET "/assets/xray.css?body=1" for 127.0.0.1 at 2013-11-15 16:38:07 +0900

Generated javascript include tag refers assets/xray.css and it worked.

Next, bundle with xray-rails 0.1.7.

$ vi Gemfile
gem 'xray-rails', '0.1.7'
$ bundle

Run server and access to home/index.

$ rails s
$ open http://localhost:3000/home/index

Started GET "/javascripts/xray.js" for 127.0.0.1 at 2013-11-15 16:36:52 +0900

ActionController::RoutingError (No route matches [GET] "/javascripts/xray.js"):
  vendor/bundle/gems/actionpack-4.0.1/lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
  vendor/bundle/gems/actionpack-4.0.1/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  vendor/bundle/gems/railties-4.0.1/lib/rails/rack/logger.rb:38:in `call_app'
  vendor/bundle/gems/railties-4.0.1/lib/rails/rack/logger.rb:20:in `block in call'
  vendor/bundle/gems/activesupport-4.0.1/lib/active_support/tagged_logging.rb:67:in `block in tagged'
  vendor/bundle/gems/activesupport-4.0.1/lib/active_support/tagged_logging.rb:25:in `tagged'
  vendor/bundle/gems/activesupport-4.0.1/lib/active_support/tagged_logging.rb:67:in `tagged'
  vendor/bundle/gems/railties-4.0.1/lib/rails/rack/logger.rb:20:in `call'
  vendor/bundle/gems/actionpack-4.0.1/lib/action_dispatch/middleware/request_id.rb:21:in `call'
  vendor/bundle/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call'
  vendor/bundle/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call'
  vendor/bundle/gems/activesupport-4.0.1/lib/active_support/cache/strategy/local_cache.rb:83:in `call'
  vendor/bundle/gems/rack-1.5.2/lib/rack/lock.rb:17:in `call'
  vendor/bundle/gems/actionpack-4.0.1/lib/action_dispatch/middleware/static.rb:64:in `call'
  vendor/bundle/gems/rack-1.5.2/lib/rack/sendfile.rb:112:in `call'
  vendor/bundle/gems/railties-4.0.1/lib/rails/engine.rb:511:in `call'
  vendor/bundle/gems/railties-4.0.1/lib/rails/application.rb:97:in `call'
  vendor/bundle/gems/rack-1.5.2/lib/rack/lock.rb:17:in `call'
  vendor/bundle/gems/rack-1.5.2/lib/rack/content_length.rb:14:in `call'
  vendor/bundle/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in `service'
  /Users/juno/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
  /Users/juno/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
  /Users/juno/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'

Generated javascript include tag refers /javascripts/xray.js and it not worked.

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