开发者

How can I create new symlink for RoR Application in the public_html folder?

I have one folder in the public_html folder named techease and I want my application symlink with this existing folder how can I do this ?

because when I link this with this folder then it will create public folder in the techease folder and then symlink with that folder.

It开发者_如何学运维 how can I create symlink with the existing folder not new created folder If I delete techease folder and create symlink then it will working fine but when that folder already exists then it will not working.

Please help me out on this problem.

Thank you


The place to do this is from your Capistrano recipe. You can create a new task that automatically creates the symbolic link after the deployment. It will look something like this (you'll have to update the paths for your situation):

after :deploy, 'deploy:link_dependencies'

namespace :deploy do
  desc <<-DESC
    Creates symbolic links to configuration files and other dependencies after deployment.
  DESC
  task :link_dependencies, :roles => :app do
    run "ln -nfs #{shared_path}/public/techease #{release_path}/public/techease"
  end
end
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜