ruby-on-railssymlinkrack-pow

Trying to create symlink - keep getting error: "File exists"


I am trying to use Pow and create a symlink so that I can ultimately run my rails application locally at the following URL:

http://market_place_api.dev/

I am going through the API's on Rails tutorial, and when I follow the author's instructions on setting up Pow and a symlink, here is what is happening:

  1. cd into a folder called "code", and created a new rails app: $ rails new market_place_api -T
  2. Installed Pow: $ curl get.pow.cx | sh
  3. Gone to the Pow directory: $ cd ~/.pow
  4. And here is where the problem occurs. The instructions say to symlink: $ ln -s /path/to/myapp
  5. In my case, the app is located at this URL: /Users/harrylevine/Dropbox/Coding/BLOC/code/market_place_api
  6. So I enter into the command line: $ ln -s /Users/harrylevine/Dropbox/Coding/BLOC/code/market_place_api and I keep getting this error: ln: ./market_place_api: File exists

I have tried many variations of this, including:

All to no avail.

How can I properly create this symlink so that I can ultimately run my rails application locally at the following URL:

http://market_place_api.dev/

Thank you.


Solution

  • The error means that there is already a file (or a sym-link) called market_place_api in that directory (~/.pow).

    Check with $ ls -l to see what the file is. If it's the correct sym-link then you are ready to proceed with the tutorial.