This question has been archived.

Can I run a Ruby on Rails app in root folder? Having changed nginx and unicorn settings?

February 17, 2016 1.7k views
Nginx Ruby on Rails Ubuntu

I have used "How To Use the 1-Click Ruby on Rails on Ubuntu 14.04 Image" but I haven't installed in "home/rails", I have installed in "/root/druby"

I've changed all directories in configuration files storing "root/druby" where were "home/rails"

The problem is that I get a "504 Gateway Time-out" error.

I'm not a Unix expert, and I don't know if is there any user issue.

I suspect a user issue, because, after using rvm and installed the latest ruby and rails with

bunde install

if I execute

root@cave-canem:~/druby/cavecanem# sudo bundle install

I get this message !!

Your Ruby version is 1.9.3, but your Gemfile specified 2.2.3

But rvm tell me another thing:

root@cave-canem:~/druby/cavecanem# rvm list gemsets

rvm gemsets

   ruby-2.2.1 [ x86_64 ]
   ruby-2.2.1@global [ x86_64 ]
   ruby-2.2.3 [ x86_64 ]
=> ruby-2.2.3@4.2.5 [ x86_64 ]
   ruby-2.2.3@global [ x86_64 ]

I don't understand what's happening ¿?
Thanks a lot

  • Finally I moved all project to /home/rails and worked

  • If you put anything in the /root, you would need to change your permissions on that folder most likely. Meaning the nginx user doesn't have ownership of that directory, and thus can't execute your rails app inside it (most likely).

Be the first one to answer this question.