Reputation: 349
I had ruby v1.9 installed ( and am running a few rails applications, e.g: redmine). I wanted to install GitLab, which required ruby >2.0. So I installed ruby following this guideline( compiled from source). Now after GitLab installation finished i restarted apache, now redmine has stopped working. Tried running gem install bundler
and bundle install
both of them gave the following error:
ERROR: While executing gem ... (Errno::EACCES)
Permission denied @ rb_sysopen - /usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.10.5/.gitignore
I am guessing that I cannot run them cause they are in folders that only root can access. Anyway, now running with sudo
didn't solve the problem. Apache log shows the following error:
[ 2015-07-22 13:51:30.0223 377/7f2ed6b49700
age/Cor/Req/CheckoutSession.cpp:252 ]: [Client 1-82] Cannot checkout session because a spawning error occurred. The identifier of the error is f16d292b. Please see earlier logs for details about the error.
App 4932 stderr: *** ERROR ***: Cannot execute /usr/bin/ruby1.9.1: No such file or directory (2)
App 4932 stdout:
[ 2015-07-22 13:51:30.4210 377/7f2ed40bf700 App/Implementation.cpp:303 ]: Could not spawn process for application /sites/www/6Qj8BHSbtswjs5gJXv1lXpao: An error occurred while starting up the preloader. It exited before signalling successful startup back to Phusion Passenger.
Error ID: b9bbbe68
Error details saved to: /tmp/passenger-error-OA4S88.html
Message from application: An error occurred while starting up the preloader. It exited before signalling successful startup back to Phusion Passenger. Please read <a href="https://github.com/phusion/passenger/wiki/Debugging-application-startup-problems">this article</a> for more information about this problem.<br>
<h2>Raw process output:</h2>
<pre>*** ERROR ***: Cannot execute /usr/bin/ruby1.9.1: No such file or directory (2)
</pre>
[ 2015-07-22 13:51:30.4274 377/7f2ed62c7700 age/Cor/Req/CheckoutSession.cpp:252 ]: [Client 2-82] Cannot checkout session because a spawning error occurred. The identifier of the error is b9bbbe68. Please see earlier logs for details about the error.
I am guessing that application is trying to use old ruby path, which is unavailable. Can somebody provide a solution that would solve this issue?
Upvotes: 0
Views: 750
Reputation: 349
So I found out the problem. The main problem was that /etc/apache2/apache2.conf
had the wrong path for passenger
. That was the main reason for apache log error. I fixed that by re-running sudo passenger-install-apache2-module
. As pointed out by @Srdjan, I had to install passenger specific to ruby version installed. After that it worked.
Upvotes: 0
Reputation: 8202
In the short term, I suggest you install rvm, https://rvm.io and then using it, install Ruby 1.9.
This way, you can keep redmine on 1.9 by setting up a .ruby_version
file within its directory that auto-selects the 1.9 version. The rest of your system will use the system ruby, it being 2.x.
In the long term, you need to find out how to upgrade redmine to work on 2.x Ruby. Also, you might need to install Phusion Passenger specific to the 2.x Ruby and configure Apache to use that.
Upvotes: 1