This project is archived and is in readonly mode.
Impossibility to mount a Sinatra app
Reported by Damien MATHIEU | April 26th, 2010 @ 12:54 PM | in 3.0.2
It's currently impossible to mount any Sinatra application on
rails3.
The route is recognized by the rake routes
command.
But whenever we go to it in the browser or we execute it in the
tests, we get a ActionController::RoutingError exception.
I've written a test case that reproduces it (but as I didn't
succeed to reproduce it without Sinatra, it includes the framework.
So it's not committable to rails).
http://gist.github.com/376653
A few days ago, I posted about it in Rails: Core. Mislav has
already given some suppositions about it.
http://groups.google.com/group/rubyonrails-core/browse_thread/threa...
Comments and changes to this ticket
-
Damien MATHIEU May 25th, 2010 @ 04:47 PM
- Tag changed from rack, rack-mount, rails3, routes, sinatra to feature_request, rack, rack-mount, rails3, routes, sinatra
Rizwan Reza has published a repository showing that in fact, it works : http://github.com/rizwanreza/sinatra-rails
Indeed, like that, it does.So I guess that's not really a bug but an improvement.
In Rizwan's example, the Sinatra app is mounted in the "/sinatra" directory. And it does gets on /.
This requires any Sinatra mounted application to be aware of the directory in which it'll be mounted. And if we change this directory, we need to also change all the routes in the sinatra app.Moreover, it forbids us to mount external apps without updating them.
For example if I wanted to mount the resque's web app in the "/resque" directory, I couldn't without updating the sinatra app in the gem. -
José Valim June 17th, 2010 @ 01:28 PM
- Milestone cleared.
- State changed from new to invalid
Damien, this is actually a Sinatra bug. According to the rack specification, env["PATH_INFO"] could be an empty string but Sinatra is not behaving properly when it sees one.
Please see this issue: http://github.com/sinatra/sinatra/issues#issue/13
Have you tried with other routes? I have a sinatra app working here with Rails 3 without problems (except by the ones related in that other ticket)!
-
Jeremy Kemper October 15th, 2010 @ 11:01 PM
- Milestone set to 3.0.2
- Importance changed from to Low
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Referenced by
- 4874 Calling mount and resource inside the router makes mount stop working Seems a lot similar to this one : https://rails.lighthou...