Deploying with Sub Directories

Hi, I am following this “tutorial” on dreamhost to deploy with sub

  1. Upload your railsapp to ~/railsapp/.
    ** I have uploaded to / (list is my railsapp folder)

  2. Make all necessary changes mentioned in the QuickStart Guide above.
    ** Did this…

  3. Create a symlink at the location you want the subdirectory that
    points to ~/railsapp/public/:
    $ cd ~/
    $ ln -s ~/railsapp/public/ railsapp
    **I put: ln -s ~/list/public/ list and I recieve “cannot overwrite
    directory” Does anyone know why I am getting this? Obviously it is
    because “list” is the same name as the folder, but shouldn’t it be?? Am
    I doing something wrong here?

  4. That will mostly work, but your railsapp will still write URLs
    incorrectly. To fix this, add the following line at the end of
    ActionController::AbstractRequest.relative_url_root = “/railsapp”
    **I put this in.

Any help would be greatly appreciated! I have been pulling my hair out
all day today trying to get this thing working.

Nevermind :slight_smile: I got it to work… I found this and it worked:

User Post (2005-08-30 13:30:11 by jwatson)
A much, much easier way to do this (and safer!) is to create your rails
app above your site directory (i.e., /home/username/yourrailsapphere
rather than /home/username/ Then all you have
to do is cd to where you want to access your rails app and create a
symlink. For example, let’s create a rails app named foobar that we want
to access from

[server]$ cd ~
[server]$ rails foobar
[server]$ cd foobar
[server]$ chmod 755 public
[server]$ chmod 755 dispatch*
[server]$ cd …/
[server]$ ln -s …/foobar/public foobar

Now, you should be able to access your rails app at No .htaccess modifications required (unless
you want to switch to fastcgi, of course). This should at least get you
working assuming you’re not using a sub-domain, etc.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs