0

I have a rails application that in turn uses sinatra app in it. I added this line to routes

mount TestApp::Application => "/test_app"

now while accessing /test_app routes it gives

TypeError (no marshal_dump is defined for class Mutex)

if ran against Ruby 1.9.2 and rails 3.2.1. Sinatra app uses mongo gem.

Now when I run this app against ruby 1.8.7 and rails 3.2.1, it gives following error

TypeError (can't dump TCPSocket)

Any help is highly appreciated.

ducktyped
  • 4,354
  • 4
  • 26
  • 38

1 Answers1

-1

Assuming you've required your TestApp::Application correctly, I think your routes definition should be:

match "/test_app", :to => TestApp::Application

See Rails Routing from the Outside in for more info.

Dan Garland
  • 3,350
  • 1
  • 24
  • 24
  • Sorry! but this would not server static content from sinatra dir. And FYI `mount TestApp::Application => "/test_app"` is the only way to solve static content problem. – ducktyped Feb 22 '12 at 16:28
  • Seems a bit harsh... you didn't mention static content in your question. How is the above suggestion incorrect? I was under the impression that mount uses match for its routing? [http://living5to9.com/2011/11/rails-routes-match-and-mount](http://living5to9.com/2011/11/rails-routes-match-and-mount/) – Dan Garland Feb 23 '12 at 10:53