manveru / ramaze
- Source
- Commits
- Network (35)
- Issues (3)
- Downloads (0)
- Wiki (2)
- Graphs
-
Branch:
master
-
example not found "require 'rubygems'" in examples/basic/gestalt.rb
1 comment Created 5 months ago by haru01Hi
I learn ramaze.
cann't start examples/basic/gestalt.rbmust require 'rubygems' ??
Comments
-
Impossible to route or rewrite requests for static files
10 comments Created 8 months ago by rgroveSince routes are evaluated after static file lookups in Ramaze, it's impossible to route or rewrite a request for a static file. It was possible in pre-Innate Ramaze, so this is a regression.
There's a simple test case to reproduce this issue at http://gist.github.com/101797
Comments
clivecrous
Sat Apr 25 23:23:07 -0700 2009
| link
I tried your code exactly as you've put it with the current repository versions of rack, innate and ramaze and "It worked!"
clivecrous
Sat Apr 25 23:25:41 -0700 2009
| link
You most likely didn't create the public/test.txt file. If that file doesn't exist, the route will work fine. When it does exist, the route never gets evaluated.
clivecrous
Sun Apr 26 00:23:32 -0700 2009
| link
ahhhhh, this is why I should never do anything online with a hangover :( sorry
clivecrous
Sun Apr 26 00:28:51 -0700 2009
| link
After giving this some thought, I'm very interested to hear what manveru says about this. I actually prefer the way it works now, routing only if a static file is not found ... but I won't use this often enough to really care which way is "more correct". I'm just wondering if manveru did this on purpose or if it's accidental regression.
Already discussed this with manveru on #ramaze, and I agree with him that this is probably the preferred behavior for performance reasons, but since it's different from pre-Innate Ramaze and could break existing apps (it broke mine), I wanted to leave the bug open at least until the difference is documented.
OK, thanks guys :)
I won't change this behaviour anymore unless someone has a killer-argument.
The way Ramaze handles it now out-of-the-box is closer to the way real deployment is setup, and should make it easier to anticipate the environment the app has to run in.
Now looking for places where we could document that... the Route/Rewrite code?That seems logical. Also might make sense to explain Ramaze's hands-off approach to static file serving elsewhere in the docs, like where public directories are discussed.
OK, I'll write a bit about it today when i find some time, will close the bug when it's done.
clivecrous
Mon Apr 27 01:41:56 -0700 2009
| link
I like that github has bug tracking now :D






Yes, either you start with
ruby -rubygems, or useRUBYOPT=-rubygems ruby.I won't add the require "rubygems" to new examples anymore, as it's not needed in Ruby 1.9 anymore.