Hi, I'm a developer of the Rails-CMS RailFrog (www.railfrog.com). We want to use RailsEngines as part of our plugin system. So far it works great but now we want to append a version string to the engine-dir (i.e. railfrog_admin_ui-0.5.3), so that the user can have multiple versions of the same engine in /vendor/plugins with only one being active at one time. But since RailsEngines uses the directory name to get the engine name, migrations from one version to another won't work because migrate uses the engine name _with_ the version string in the schema info table. So my question is, if either there is a way to set the engine name manually or if you think that it would be a good idea to replace the current naming convention with one that supports this kind of directory names and uses the name before the version string as engine name. Thanks Daniel
on 2006-05-03 18:59
on 2006-05-03 18:59
It seems like inviting trouble to have multiple versions of a particular framework or plugin sitting side-by-side in the location from which they are loaded. Certainly this is going to be problematic if engines ever start up automatically (like plugins do, and this *may* happen). With this in mind, I'd recommend that you use an alternative strategy. One suggestion might be to store your multiple copies in /vendor/some_other_dir, and create symlinks (or just delete and re-copy on Windows) to the particular version you want. Another option might be to use SVN, either directly or via some set of rake tasks, to up/downgrade the engine at will, and migrate the engine down and back up to the latest set of migrations for that particular version of the engine. Again - getting complex, and the recommended mechanism for performing engine migrations is going to change in a not-too-distant version too. I guess in summary - not really a good idea to hve multiple version of the same component sitting in a directory where things might get automatically loaded. Incidentally, why did you want the user to have multiple versions? - james On 5/2/06, Daniel Siemssen <daniel@dr-siemssen.de> wrote: > manually or if you think that it would be a good idea to replace the > -- * J * ~
on 2006-06-05 19:06
"James Adam" <james.adam@gmail.com> wrote in message news:9ec5d0aa0605020913t7e436617q2fd6165779ccddd2@mail.gmail.com... ... > One suggestion might be to store your multiple copies in > /vendor/some_other_dir, and create symlinks (or just delete and > re-copy on Windows) to the particular version you want. Just want to mention that Windows NT based OSes have the ability to do hard links in NTFS file systems. They are called reparse points and the resource kits for your particular OS flavor have a utility that can create them. Alternatively, Sysinternals has a free little utility named Junction that can be used to create them as well. Very handy for solving this type of problem in the same way you'd use symlinks to solve it on *nix. Daniel
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.