Reputation: 6030
My rails 3.2.8
application was using ruby1.8.7
and was running perfectly. Recently, i've upgraded ruby
version to 1.9.3
, which caused server to crash. I updated all gems to be compatible with ruby's latest version. But since then, apache is not running my application. If I run rails webrick server, site is accessible using IP address and port. But it is not accessible using domain's name as Apache's configuration doesn't seem to be correct. It was quite fine earlier, I didn't change it or something. I just upgraded Ruby. Anyone got any idea what I'm missing here? Please help.
apache configurations files are as follow.
apache2.conf
LockFile ${APACHE_LOCK_DIR}/accept.lock
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
<IfModule mpm_worker_module>
StartServers 2
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
ThreadsPerChild 25
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
<IfModule mpm_event_module>
StartServers 2
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
ThreadsPerChild 25
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
AccessFileName .htaccess
<Files ~ "^\.ht">
Order allow,deny
Deny from all
Satisfy all
</Files>
DefaultType None
HostnameLookups Off
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
Include mods-enabled/*.load
Include mods-enabled/*.conf
Include httpd.conf
Include ports.conf
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r..
test.myapplication.com
<VirtualHost *:80>
ServerName test.myapplication.com
ServerAlias XX.XX.XX.X/mytest
DocumentRoot /home/XXXX/public_html/public
ErrorLog /var/log/apache2/XXXXX_errors.log
LogLevel warn
CustomLog /var/log/apache2/XXXXX_access.log combined
SetEnv RAILS_ENV production
<Directory /home/XXXXX/public_html/public>
Allow from all
Options -MultiViews
</Directory>
</VirtualHost>
Upvotes: 0
Views: 126
Reputation: 1822
I'm guessing you need to update the apache configuration to use new ruby.
So in your apache conf you should have something like this:
LoadModule passenger_module /usr/lib/ruby/gems/1.9.2@rails3/gems/passenger-3.0.2/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.9.2/gems/passenger-3.0.2
PassengerRuby /usr/bin/ruby1.9.2
You should just need to fix the paths..
Upvotes: 1