Reputation: 2563
I'm deploying a Rails application on inmotion hosting at coolmappdb.com
- and when I get there it says
Could not spawn process for application /home/username/public_html/coolmappdb.com: An error occurred while starting up the preloader.
<p>If that didn't work, then maybe the problem is that your gems are installed to <code>/home/username/.rvm/gems</code>, while at the same time you set <code>PassengerRuby</code> (Apache) or <code>passenger_ruby</code> (Nginx) to <code>/usr/local/rvm/gems/ruby-2.3.1/wrappers/ruby</code>. Because of the latter, RVM does not load gems from the home directory.</p>
The error message is clear. It is saying that my Phusion Passenger is pointed at the wrong location. How can I make it work at the right location?
UPDATES:
<VirtualHost 170.239.250.29:80>
ServerName coolmappdb.com
ServerAlias www.coolmappdb.com
DocumentRoot /home/coolma7/public_html
PassengerRuby /home/coolma7/.rvm/gems
ServerAdmin [email protected]
UseCanonicalName Off
CustomLog /usr/local/apache/domlogs/coolmappdb.com combined
<IfModule log_config_module>
<IfModule logio_module>
CustomLog /usr/local/apache/domlogs/coolmappdb.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
</IfModule>
</IfModule>
</VirtualHost>
Upvotes: 1
Views: 386
Reputation: 3723
I visited the application at http://coolmappdb.com/ and there you find the reason of your problem.
As I said in my first comment to your question, you have a problem with permissions, as it says in you Phusion error page:
*** ERROR ***: Cannot execute /home/coolma7/.rvm/gems: Permission denied (13)
It happens that you have
Ruby interpreter command = /home/coolma7/.rvm/gems
and in the "Environment variables" section you may find the following
MY_RUBY_HOME=/usr/local/rvm/rubies/ruby-2.3.1
It happens that your Ruby interpreter can't run anything in a system folder like /usr/local.
To fix this you have to set, inside your Apache's VirtualServer the following
PassengerRuby "/home/coolma7/.rvm/gems"
This will make your Ruby interpreter search for the gems in the correct place, where you have all permissions needed.
Make sure your Apache is running as a user with permissions to execute inside /home/coolma7
, setting User
and Group
correctly at Apache's configuration file.
Finally, the fact that you have gems at /usr/local/rvm/rubies/ruby-2.3.1
means the you are using a system Ruby. This is not recommended. Try to stick to RVM when installing Ruby versions and you'll have less problems. See this. And maybe this post may help you too.
Upvotes: 1