Ubuntu 14.04 + Apache + rbenv

25 views
Skip to first unread message

Zack Reed

unread,
Aug 27, 2015, 8:49:33 AM8/27/15
to Phusion Passenger Discussions
Hello,

I have a mix of old and new Rails apps that I want to deploy with Passenger 5, but I'm having trouble getting it to work at all. I've started with one of my older sites that needs Ruby 1.8.7 and Rails 2.1.0.  When I setup the vhost and try to connect to the application, I just get the index of the public directory.  I have a deploy user that I have set rbenv up for and everything works via Webrick.  I have installed the passenger gem, and ran passenger-install-apache2-module and Apache says the module is loaded.

Here's my vhost file for the application.
<VirtualHost *:80>
    ServerName aoi.domain.com
    DocumentRoot /var/www/rails/aoi.domain.com/public

    PassengerRuby /home/deploy/.rbenv/versions/1.8.7-p375/bin/ruby

    # Relax Apache security settings
    <Directory /var/www/rails/aoi.domain.com/public>
      Allow from all
      Options -MultiViews
      # Uncomment this if you're on Apache > 2.4:
      Require all granted
    </Directory>
</VirtualHost>

I have tried running Apache both as the www-data user and deploy user, I have chown'd the directory to www-data:www-data and deploy:deploy, and I have added the www-data user to the deploy group so that the user should be able to use the deploy user's rbenv ruby, but all of this has been met with failure.  Any ideas are greatly appreciated.

Hongli Lai

unread,
Aug 27, 2015, 2:07:24 PM8/27/15
to phusion-passenger
Is it a Rails 2 app? Since Passenger 5, Rails versions < 2.3 are no longer supported. For Rails = 2.3 apps, a config.ru file is required.

--
You received this message because you are subscribed to the Google Groups "Phusion Passenger Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phusion-passen...@googlegroups.com.
To post to this group, send email to phusion-...@googlegroups.com.
Visit this group at http://groups.google.com/group/phusion-passenger.
To view this discussion on the web visit https://groups.google.com/d/msgid/phusion-passenger/f297618e-c977-484c-9f47-a5a34a051fcf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Phusion B.V. | Web Application deployment, scaling, and monitoring solutions

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
Chamber of commerce no: 63501007 (The Netherlands)

Zack Reed

unread,
Aug 27, 2015, 4:21:23 PM8/27/15
to Phusion Passenger Discussions, hon...@phusion.nl
Thanks for the response.  That stinks, but I can understand deprecating older versions.  I've been trying to update one of my apps from 2.1.0 to 2.3.18 without success (I have 13 total to upgrade).

rake rails:update shows no warnings, I've changed the rails version in environment.rb, and moved the application controller from application.rb to application_controller.rb, but I'm greated with this fine error.

/var/www/rails/aoi.domain.com/vendor/rails/activesupport/lib/active_support/dep‌​endencies.rb:469:in 'load_missing_constant': uninitialized constant Inflector (NameError) 
Reply all
Reply to author
Forward
0 new messages