From: David Masover Date: 2010-10-08T16:12:40+09:00 Subject: Re: ODBC app in Ruby - I don't believe it. On Wednesday, October 06, 2010 02:40:38 am Dave Howell wrote: > My current web-app environment is PostgreSQL for the database, Apache &/or > Mongrel &/or WeBrick for the web server (I really don't understand that > part yet). The ODBC driver has been replaced with some postgres libraries > and the pg gem. Tango has been replaced with Ramaze&Sequel&(mumble). > "Mumble" was originally HAML, but in the end I just scrapped the entire > idea of using a templating engine because I couldn't stand the > limitations, so now (mumble) is some custom code I wrote for myself. What limitations? I'm curious. And, did you try Erector, or something similar? I prefer Haml, but if I was finding it "limiting", I think that's where I'd go next. > I then spent yet another whole day trying to get Rails to work. I'd heard > such glowing praise for Rails that it took me that long to realize that it > was utterly unsuitable for my web app. Again, I'm curious -- both about what the app was, and when this was. Rails has come a long way. > I looked at Sequel, > ActiveRecord, and at least two other ORMs (after figuring out what the > heck an ORM was in the first place and why I would care). DataMapper? > Either I have to make Ramaze quit playing around with this > stupid Mongrel gizmo and hook directly into Apache, Trivial -- look into Passenger. But I'm trying to answer the "what, not how" questions below. > so I can put muliple > websites on the same (*$*)%&@#@ port, by which I mean, port EIGHTY! ...why? Assuming this is a requirement, the most flexible approach seems to be some sort of reverse proxy. Apache can do it, nginx makes it simple and lightweight, fairly trivial to just say "Any URL that starts with this gets forwarded to this port on localhost." The cool part is that you're then no longer tied to any one webserver, or even any one machine. The annoying part is that it's maybe more work than it should be to get a dev environment setup. > or > Mongrel (or Ramaze, or Innate, or maybe WeBrick, I really haven't a clue > whose fault this is) has to quit f**king up my redirect URLs by sticking > :7000 at the end, which contaminates the proxy/reverse proxy URL rewrites Probably Ramaze, or you. Generate relative URLs, or absolute URLs that start with / instead of a domain, or hardcode the domain instead of detecting the port. I don't know enough about Ramaze to know how difficult this is. It would probably be possible to fix this at a lower level, like Rack or the webserver itself, to fool Ramaze into thinking it's running somewhere else, but you want the freedom to be able to tell Ramaze what kind of URLs it should generate.