views:

73

answers:

1

I have a Rails app that works fine on my local environment. But when I upload it to my ISP the app is not loading any of the assets in the public directory. Because the ISP uses .htaccess rewrites for Rails apps, I suspect this is the problem, but I'm pretty green on that sort of thing.

On the server, my rails app is deployed at ~/etc/rails_apps/myapp

In my home dir there's a symlink www -> etc/rails_apps/myapp/public

Isn't the idea that the symlink loads the assets from etc/rails_apps/myapp/public? Am I missing something else?

The server is Mongrel, if that matters. The public/stylesheets and public/javascripts dirs both have 755 permissions, if that matters.

A: 

Please specify the Hosting environment that you are using whether its shared host like Bluehost or Hosmonster or Dedicated Hosting Service .

If you are hosting in a Shared hosting environment , Then your rails root directory should be in /home/user-name/rails_apps. Since the shared host provider doesn't allow you to change the permission of the /etc folder .

if your railsapps is in /home/user-name/rails_apps/yourapp then in the created symbolic link chmod 777 permission to the created symobilic folder which will be your domain name inside the public_html folder .

ln -s ~/rails/your-rails-app-name/public your-domain-name-without-extension

example : ln -s ~/rails/your-rails-app-name/public stackoverflow

$ chmod 777 /public_html/stackoverflow

Hope this helps !

YetAnotherCoder