Unable to set up Rails app by Apache on Mac OS X 10.9.3

4294967294 is actually “-2”, default uid and gid for nobody in Mac OS X.

Not sure how to get around this, change ownership of some files will
help?

Liz

On Tuesday, July 1, 2014 11:55:43 AM UTC-4, Liz H. wrote:

the error I got now seem to be something different…

integer 4294967294 too big to convert to int' (RangeError) /usr/local/var/rbenv/versions/2.1.0/lib/ruby/2.1.0/fileutils.rb:724:inchown’

Who is the owner of your rails app? Passenger will run your app as the
user set as the owner of the rails root (or maybe the environment file,
not
sure). For development, I just set myself as the owner. For
deployment,
you may want to set up an unprivileged user to own the rails app, but
apparently Passenger has issues if the “nobody” user owns the app.

Jim

On Tuesday, July 1, 2014 10:40:51 AM UTC-4, Liz H. wrote:

Great, it seems that I got further, now I got error message

It looks like Bundler could not find a gem. Maybe you didn’t install all
the gems that this application needs. To install your gems, please run:

bundle install

You just need to get your PassengerRuby directive set up properly then.
That will need to be specified in your site configuration file in
/Library/Server/Web/Config/apache2/sites/. You can use the passenger
utility:

passenger-config --ruby-command

which will show you what your PassengerRuby directive should look like.
I
put that directive just above the closing tag in the site
config file. If you want to run in development mode, you will also need
the “RackEnv development” directive.

If you installed passenger using HomeBrew, then you do not want to list
passenger as a requirement in your rails app Gemfile. Personally, I
only
list app-specific gems in the Gemfile, and leave out the server-specific
details like Passenger.

Jim

Yes! passenger will start up according to the ownership of config.ru
file
(>rails 3, or environment.rb for rails 1 & 2)
and has issue if it is owned by “nobody”. I change ownership of
config.ru
file and it works now. Thanks a lot
for your help! Now I can host single rails app, will need to figure out
how
to set up multiple rails apps by sub URI.

Best,
Liz

On Jul 2, 2014, at 2:06 PM, Liz H. wrote:

will need to figure out how to set up multiple rails apps by sub URI.

If you’ve ever configured Apache for multiple name-based virtual hosts,
you will have already done this. I host many Rails apps (non-critical)
on my staging server, and Passenger makes it trivial to add another one.
Just add the virtual host config file, make sure that the Directory
statement therein points to the new app’s public folder, and you’re
done.

As long as these sites aren’t popular, there’s really no limit to the
number of them you can run, because Passenger will allow them to spin
down if they don’t get any requests, and you will get your memory back
to use elsewhere. Of course if they all get crawled by Google at once,
your server WILL fall over.

Walter

Yes, “nobody” is the owner and it seems to be a bug with Ruby. I will
change the ownship of the rails project
to see if it fixes the problem.

Liz

Hey, try out our new service http://teatro.io, which allow you to run
stage
server automatically in the cloud.

понедельник, 23 июня 2014 г., 19:20:55 UTC+4 пользователь Liz H.
написал: