Linking Rails Applications

I have created two rather simple ROR applications. I would like to link them together but they are in different sub directories and use different databases. I created App1 and it is in use. I have since created app2, which triggers two small db searches. I would like to have app2 link to app1 without having to copy app2 into the same directory as app1.

They exists in C:\ruby\bin\app1 and C:\ruby\bin\app2.

I tried: <%= link_to 'Building Permits ',       :controller => 'item',       :action => 'list' %><br /> this is from within app2\admin\main

I get the following error: no route found to match "/item/list" with {:method=>:get}

I am new at this and learning as I go along, any help would be greatly appreciated.

Lewis

You can use link_to to create links just with the actual URL: so, say you’re running this on localhost.

link_to ‘Building Permits’, 'http://localhost:3000/app1/item/list ’ You can put whatever you want in that second string and it should create a link to it.

It is also possible, through using the establish_connection, to have the second app just access the first app’s DB, if that would work better for you. See http://api.rubyonrails.org/classes/ActiveRecord/Base.html#M001075