Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have an existing website that is a Ruby on Rails project. I have another server I need to transfer the existing website too. The server I wish to transfer too was originally hosting the website so has the necessary gems/configuration are installed.

I have tar the current releases shared dir from the old server and transfered them over to the new server.

I have then unpack the tar in the apps directory to the new location which is a different URL path.

My problem is now as you can see below that the path on the current -> is pointing to the old URL. (I ran ls -la to see ownership).

How can I change this current path to read with my new web address?

Current releases shared sitepack.tar.
root@server1: /var/www/clients/client1/NEWSITE.com/web/apps# ls -la
Current -> /var/www/OLDSITE.com/web/apps/releases/20120130171636
root@server1: /var/www/clients/client1/NEWSITE.com/web/apps#

share|improve this question

migrated from stackoverflow.com Apr 2 '12 at 0:26

This question came from our site for professional and enthusiast programmers.

    
I wonder if this should not have gone to ServerFault instead? –  Joshua Drake Apr 3 '12 at 14:52
add comment

1 Answer 1

Your Ruby on Rails application will reference files in your 'shared' folder. The 'current' folder points to the directory which contains your applications files - not the shared folder.

If you keep assets, such as images, in your shared folder then you needed to copy that over as you did. Your current folder is probably easier to maintain through capistrano, which you should consider using to deploy your app.

The 'current' folder is just a link to the directory that your app was deployed to, which is within your 'releases' directory.

I'm presuming that you've misunderstood how the current folder works, simply change your deploy.rb configuration from within app/config in your rails source and this will fix the link for you.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.