Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

nginx: [emerg] invalid number of arguments in "passenger_root" directive

I'm trying to set up for the first time with Rubber onto EC2 (complete_passenger_nginx_postgresql). I changed a bunch of settings in the config files to make it work with a different AMI (Ubuntu 12.04.3 LTS - ami-a73264ce (64-bit)), Ruby 2.1.0, Passenger 4.0.29, and Nginx 1.4.4. I almost got it to work, but it failed when starting Nginx with the following error:

nginx: [emerg] invalid number of arguments in "passenger_root" directive in /etc/nginx/nginx.conf:45

rubber-passenger_nginx.yml has the following code for "passenger_root":

passenger_lib: "#{passenger_root}/ext/nginx"

Any idea what I should change to make it work?

like image 259
Ben Avatar asked Dec 29 '13 09:12

Ben


2 Answers

In My case, I have missed to mention ; at the end of the root directory declaration

Error:

root "/directory/with double quotes/will work"

Solution:

root "/directory/with double quotes/will work";
like image 98
KARTHIKEYAN.A Avatar answered Sep 28 '22 11:09

KARTHIKEYAN.A


You have an error in your /etc/nginx/nginx.conf file.

Change the lines:

passenger_root /usr/local/rubies/2.1.0/lib/ruby/gems/2.1.0/extensions/x86_64-linux/2.1.0-static‌​/passenger-4.0.29
/usr/local/rubies/2.1.0/lib/ruby/gems/2.1.0/gems/passenger-4.0.29;
passenger_ruby /usr/local/rubies/2.1.0/bin/ruby;

into:

passenger_root /usr/local/rubies/2.1.0/lib/ruby/gems/2.1.0/gems/passenger-4.0.29;
passenger_ruby /usr/local/rubies/2.1.0/bin/ruby;
like image 34
griffon vulture Avatar answered Sep 28 '22 12:09

griffon vulture