Passenger on Apache 2 Installation fails with Your RVM wrapper scripts are too old - apache

I'm trying to install passenger on a virtual rootserver (which has multiple user accounts) but running 'passenger-install-apache2-module' results always in the following error:
Your RVM wrapper scripts are too old. Please update them first by running 'rvm get head && rvm reload && rvm repair all'.
Following this given instructions does not take any effect.
Before installing passenger, i installed RVM as multiuser / mixed mode according to https://rvm.io//rvm/install/
After that I did (using a non root-account):
rvmsudo rvm user gemsets
rvm install 1.9.3
gem install rails
gem install passenger
and lastly passenger-install-apache2-module
I searched for hours on this problem but could not find any working solution yet.
Any suggestions ? Thanks in advance!

Try to install passenger-install-apache2-module like this :
rvmsudo passenger-install-apache2-module

I just encountered this very same issue. I'm using ZSH, but switching to Bash also failed on first attempt.
My solution was to switch to Bash with the --login flag:
/bin/bash --login
Then I noticed that my RVM ruby had become unset, so I re-set using:
rvm use ruby-1.9.3 --default
Once this was done, the following worked as expected:
passenger-install-apache2-module
Rich

I have had similar issue and have taken extreme steps on my centos 6.3 system after struggling for days! In specific, I failed to install standalone phusion passenger apache2 module on gemsets other than default and global. I have taken the following steps and now, it works for me:
Login as root (I hope you know what you're dealing with)
To completely uninstall existing rvm, invoke
[root#] rvm implode
Install stable rvm, invoke
[root#] curl -L get.rvm.io | bash -s stable
run rvm shell,
[root#] source /etc/profile.d/rvm.sh
check rvm requirements, invoke
[root#] rvm requirements
and install all requirements.
Install ruby 1.9.3, invoke
[root#] rvm install 1.9.3
Install current rubygems, invoke
rvm rubygems current
Set default to ruby 1.9.3, invoke
[root#] rvm use 1.9.3 --default
Add other users who are using rvm to rvm group, invoke
[root#] usermod -a -G rvm USERNAME
If USERNAME is currently logged in, pls logout so the group add will take effect.
Make sure rvm group added, invoke
[USERNAME#] groups
Create and Switch to a new gemset on ruby 1.9.3, invoke
[USERNAME#] rvm use 1.9.3#mygemset --create
Confirm that you're on the right gemset, invoke
[USERNAME#] rvm gemset name
Install passenger gem, invoke
gem install passenger
To skip gem documentation instead, invoke
[USERNAME#] gem install passenger --no-ri --no-rdoc
or specify them in your .gemrc file
To install apache2 mod, invoke
[USERNAME#] passenger-install-apache2-module
Hope that helps!

Related

Unable to install rvm on mac OSX 10.8.2

Error running 'make', please read /Users/Megha/.rvm/log/ruby-1.9.3-p374/make.log
There has been an error while running make. Halting the installation.
There is a new experimental way of dealing with dependencies in RVM => https://github.com/wayneeseguin/rvm/pull/1544 :
rvm get branch /features/improved_dependencies
rvm pkg remove
rvm remove 1.9.3
rvm install 1.9.3
You need the command lines tools (install xcode via the app store - then open it to install the command lines tools). I am talking 1Gb+ so it will take some time.
After that, get brew:
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
Update and run brew to install gcc:
brew update
brew tap homebrew/dupes
brew install apple-gcc42
Then RVM and ruby 1.9.3 should work:
curl -L https://get.rvm.io | bash -s stable --rails
rvm install 1.9.3

How do I install same version of ruby as different names with rvm?

After I installed a version of ruby with rvm, I noticed that some minor configuration issue on installation process. So I wanted to try to install with another configuration options, but I don't want to spoil the installed ruby at all.
So I just to attempt to backup the installed ruby before rvm reinstall.
(cd .rvm/rubies && mv ruby-1.9.3-p194 ruby-1.9.3-p194.org)
In my case, reinstallation fixed the issue, I didn't rollback ruby. So, I don't know this can work.
Are there any clean or correct way? Just for future references.
you can install named rubies:
rvm install 1.9.3-test1 [options]
and after it worked set it as default:
rvm use 1.9.3-test1 --default
or reinstall the original 1.9.3, named rubies are useful especially for testing compilation flags or patched rubies:
rvm install 1.9.3-performance --patch falcon
You can also have different gemsets with the same version using
rvm create gemset projectname

I can't seem to get rails installed on my Mac (10.6.5). Following Ruby on Rails Tutorial 3

I'm trying to get Rails 3 up and running by following the steps outlined in "Ruby on Rails Tutorial" by Michael Hartl (http://ruby.railstutorial.org/ruby-on-rails-tutorial-book).
The details start in section 1.2.2 (http://ruby.railstutorial.org/ruby-on-rails-tutorial-book#sec:rubygems). Here you go through the following steps:
Installing Git
Installing Ruby (version 1.9.2) using Ruby Version Manager (RVM)
Creating different gemsets for environments using Ruby 1.8.7 and 1.9.2
Installing RubyGems
and finally, installing Rails.
I run the following command [sudo] gem install rails --version 3.0.7
Everything seemed to install correctly (based on no errors). However, when I type "rails -v", rails cannot be found.
I am a Rails newbie. I'm trying to install Rails on a machine running Mac OS X 10.6.7.
Thanks.
If you are using RVM you probably don't want to use sudo when installing gems. If you have Git installed only steps needed to get Rails are:
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.zshrc
# Reload your shell now (open a new terminal for example)
rvm install 1.9.2
rvm 1.9.2 --default
gem install rails --version 3.0.7
hash -r
This skips the gemsets part (you don't need it if you are just starting learning Rails) and assumes that you use Zsh (I think it's Mac OS X default, if you use Bash then you have to alter .bashrc, not .zshrc).
If you want to remove your previous installation and start over use rvm implode.

Ubuntu 11.04 Ruby on Rails install write permissions error

I am trying to install rails and have installed rvm and am trying to install rails but it is saying I do not have write permissions.
$ gem install rails --version 3.0.7
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /var/lib/gems/1.8 directory.
When I try sudo it give me this error, I know that you can use --no-ri --no-r-doc but even when I did this rails was not installed properly. Does anyone have any ideas?
$ sudo gem install rails --version 3.0.7
Successfully installed rails-3.0.7
1 gem installed
Installing ri documentation for rails-3.0.7...
file 'lib' not found
Installing RDoc documentation for rails-3.0.7...
file 'lib' not found
from my experience with rvm, gems should't stay in /var/lib/
if you didn't specifically asked for this, there might be a problem with your rvm installation
if so, i would definetly recommend a clean rvm install by following ryan bigg's guide of installing rvm. i followed it every time and never ever had the slightest problem after.
hope this helps!

Need help setting up passenger with RVM

I'm trying to setup passenger with rvm. I keep getting this error
Your RVM wrapper scripts are too old.
Please update them first by running
'rvm update --head && rvm reload &&
rvm repair all'.
I did that still same problem
GNU C++ compiler... found at /usr/bin/g++
Curl development headers with SSL support... found
OpenSSL development headers... found
Zlib development headers... found
Ruby development headers... found
OpenSSL support for Ruby... found
RubyGems... found
Your RVM wrapper scripts are too old.
Please update them first by running 'rvm update
--head && rvm reload && rvm repair all'.
I'm using Fedora 14, Ruby 1.9.2, Rails 3.0.7
RVM is installed for multiuser
I also get this error when I do 'passenger start'
Cannot execute
'/home/antarr/.passenger/standalone/3.0.7-x86_64-ruby1.9.2-linux-gcc4.5.1-1002/support/helper-scripts/prespawn
http://0.0.0.0:3000': Permission
denied (13)
I was having the same issue but found that using the rvmsudo command worked. Instead of
sudo passenger-install-apache2-module
try using:
rvmsudo passenger-install-apache2-module
It looks like Passenger 3.0.7 is confused by newer versions of rvm, but it seems like the instructions are incorrect and it's causing trouble. If the GEM_HOME environment variable is not set you get this error.
The correct instructions should be to use your particular version first:
rvm use 1.9.2
Although I got the same error as you, after that it worked for me.
If none of the above solutions work for you and you're getting the GEM_HOME warning
delete everything in .rvmrc
rvm get head && rvm reload && rvm repair all
gem install passenger
passenger-install-apache2-module
copy/paste the end message into your apache.conf
I am still having the same issue with passenger 3.0.19 if I tried to install on gemsets other than default and global. This is soooo troublesome. I have tried many suggestions and even rvm implode, then have everything brand new. but still hitting the brick wall. my forehead almost flatten. Hope not to lose my head!
Luckily, I found myself a fix. I found out that in i am in rvm multiuser envrioment and the issue arised if I switch to user gemset using command: "rvm user gemsets" which basically will create and use .rvm folder in user's home folder. e.g.: /home/.rvm instead of /ur/local/rvm folder. Since I do not know how to switch back and could not find any documention on how to, I did the following steps:
remove .rvm folder in the user home folder,
rm -rf ~username/.rvm
added back the user to rvm group (in multi enviroment, every new user need to be added to rvm group)
sudo usermod -a -G rvm username
re-login.
Now, as long as I am using shared rvm gemset folder, phusion passenger wont complaint.
Hope that helps someone.
I fixed the Permission Denied issue with:
chmod a+x /Users/tvd/.passenger/standalone/3.0.7-x86_64-ruby1.9.2-macosx-10.6/support/helper-scripts/*
Found it in comment section on the phusion.nl blog:
Goto Comment on Phusion Blog