login community faq

Hello, I'm trying to setup my rails application to use the latest stable everything, using rvm I was able to get ruby/rails and all that working right. The last step I think is setting up passenger with my existing nginx.

I got far in that I downloaded the src, and ran the configure script pointing to my passenger location. But then I get the error:

Permission denied - /tmp/passenger-compile-check-15512.c.out

In which I'm not sure what to do about that.

The nginx bin files are in my: ~/nginx1.0.5/src/nginx-1.0.5/ folder

which from there I'm supposed to run:

./configure --add-module=/home/pixelfist/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.8/ext/nginx --prefix=/home/pixelfist/webapps/pierce_engineering/nginx2/

The nginx2 is just a test folder since I didn't want to install it over my current nginx installation that was set up for me when I created that app.

asked Aug 05 '11 at 20:24

Jaybydesign's gravatar image

Jaybydesign
266


Thanks Johns, though as I read through the output of all that I noticed it wasn't nginx that was trying to execute from the /tmp directory. It was actually the rake command to setup the NGINX that was messed up. The problem is the /tmp dir is hard-coded into the ~/.rvm/gems/ruby-1.9.2-p290/gems/passenger-3.0.8/lib/phusion_passenger/platform_info.rb

and on line 163 you see:

1
2
3
4
5
6
7
8
9
   def self.tmpdir
            result = ENV['TMPDIR']

            if result && !result.empty?
                    return result.sub(/\/+\Z/, '')
            else
                    return '/tmp'
            end
    end

So I replaced the line return '/tmp' to return '~/tmp' Then I created a dir: mkdir ~/tmp

So it would work out of the tmp folder in your home directory.

Once I did that and ran that rake command that it was attempting it worked fine, I've also ran the configure script again as well and the phusion-nginx-installer or whatever it was script again and not only did it work, but my site is now fully functional running on the latest stable releases!

answered Aug 05 '11 at 21:45

Jaybydesign's gravatar image

Jaybydesign
266

1

Wouldn't it be more sensible to just export TMPDIR=$HOME/tmp maybe even in .rvmrc only?

(Dec 07 '11 at 04:26) Jan Limpens Jan%20Limpens's gravatar image

It looks like it is trying to execute a file within /tmp/ which will not work as /tmp on our servers has noexec for security. Try setting '--builddir' to someplace within your home directory. http://wiki.nginx.org/InstallOptions

answered Aug 05 '11 at 21:12

johns's gravatar image

johns ♦♦
340427

If you're looking to set up Ruby 1.9.2 with a Passenger + Rails application, see this related community post.

answered Jan 06 '12 at 19:48

ryans's gravatar image

ryans ♦♦
28411420

Your answer
If you have an answer to the above question, then use the form below. Otherwise, use the appropriate 'add new comment' button above to post your feedback.
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×127
×76
×25
×19
×6

Asked: Aug 05 '11 at 20:24

Seen: 1,506 times

Last updated: Jan 06 '12 at 19:48

Plans & prices    Sign up    Why WebFaction?    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
Powered by OSQA
© Copyright 2003-2012 Swarma Limited - WebFaction is a service of Swarma Limited