# Append version string to engine-dir

**URL:** <https://www.ruby-forum.com/t/append-version-string-to-engine-dir/59394>\
**Category:** Engines Development\
**Created:** [May 3, 2006, 6:59pm UTC](https://www.ruby-forum.com/t/append-version-string-to-engine-dir/59394 "2006-05-03T18:59:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dasch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b2d939/32.png) [@dasch](https://www.ruby-forum.com/u/dasch)\
**Post date:** [May 3, 2006, 6:59pm UTC](https://www.ruby-forum.com/t/append-version-string-to-engine-dir/59394/1 "2006-05-03T18:59:46Z")

</div>

Hi,  
I’m a developer of the Rails-CMS RailFrog ([www.railfrog.com](http://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

---

<div class="post-metadata">

**Author:** ![dasch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b2d939/32.png) [@dasch](https://www.ruby-forum.com/u/dasch)\
**Post date:** [May 3, 2006, 6:59pm UTC](https://www.ruby-forum.com/t/append-version-string-to-engine-dir/59394/2 "2006-05-03T18:59:50Z")

</div>

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 S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> manually or if you think that it would be a good idea to replace the

–

- J \*  
~

---

<div class="post-metadata">

**Author:** ![dasch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b2d939/32.png) [@dasch](https://www.ruby-forum.com/u/dasch)\
**Post date:** [June 5, 2006, 7:06pm UTC](https://www.ruby-forum.com/t/append-version-string-to-engine-dir/59394/3 "2006-06-05T19:06:45Z")

</div>

“James A.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote in  
message  
news:removed\_email\_address@domain.invalid…  
…

> 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
