Which type of rvm install do I do if I want to use it with phusion passanger - rvm

I am on ubuntu 12.04.1 LTS.
I have installed apache2 running as www-data.
I want to use ruby 1.9.3.
I need to install passanger.
The question is which installation method should I use to install rvm. Should I use the single-user or the multi-user installation.
If I have to use the single-user installation, do I install it as my user or as www-data.

On my production systems, I install RVM system-wide. That way I can log in (or anyone else can login) and pull up a console on the system using the same ruby and gemsets. I am sure there are ways to do that with single user, but this has always been the least complicated for me.
However, for Passenger, I recommend installing that against the system ruby. The reason for that is because every time you change or upgrade your ruby, it would blow up your passenger installation and you would need to change your Apache configuration and rerun the passenger installation. This works because passenger and your application do not need to run on the same ruby installation.

Related

redmine.org not running after updated the ruby

Ruby updated to version 1.8.7 and the redmine display at the top right side "Not Running" The issue that I found is that doesn't send mailing alerts to users when the status of one task change.
The redmine save tasks normally.
Do you know why I get "Not running"?
Do you know how can I found what is not running?
Do you know how the mail alerts will work as before?
Also the redmine is hosted in cPanel.
First of all your Ruby version is very old and non-maintaned, you should look for 2.4.x versions.
I recommend that you install new ruby via rvm or rbenv
So if you are to proceed with RVM, it's easy to install via console, it first imports the key
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
And then installs via curl and bash (your should ask for permission to use bash, because often with cpanel, the only shell users can use is some kind of jailshell)
\curl -sSL https://get.rvm.io | bash -s stable
Once RVM is installed, you will be able to install new ruby for that particular user, by typing rvm install rubyversion replace rubyversion with one of your choice.
And then proceed with Redmine upgrade, as explained in manual
http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade
Once you are done with that, you must figure out, how is your redmine being served, I assume it's served as fcgi module, since it's old version of ruby, so you might have to seek for a way to run your Redmine with new ruby, I recommend to try this approach first How to get rvm running inside fcgi?
There are several ways to deploy rails app like Redmine on a web-server, however running under cpanel gives you little or no choices, alternative would be to run some server like thin, or webrick, and proxy it thru apache, which should be possible with cpanel.

change server selection after installing phpmyadmin

After reading a bit I installed phpmyadmin on an Ubuntu server (14.04) with
sudo apt-get install phpmyadmin
In the installation configuration screens I was asked whether I wanted to use apache2 or lighttpd servers. I selected lighttpd and the installation went on smoothly. I noticed that it still (aparently) installed apache2 server.
Now, reading more on the topic, I feel more confortable if I could use phpmyadmin on apache2 server instead of on lighttpd. Is there a way to change this selection now, without uninstalling and reinstalling again?
There are two possibilities about being prompted for a webserver to use; before apt-get downloads any files it resolves conflicts and installs dependencies -- if you don't have a webserver installed it will prompt you to install one (or do so automatically). The other time it asks you about which webserver to use is after downloading and during configuration; if you have more than one webserver installed, you're prompted for which you want to work with phpMyAdmin. You can pick more than one here, by the way.
To configure phpMyAdmin to work with Apache instead, you can use:
sudo dpkg-reconfigure -plow phpmyadmin

Why does apache2.2 keeps installing instead of apache2.4?

I've been trying to set Vagrant up for local development on my machine. I see from Apache's official website that 2.4.7 is the current stable version. And I had no issues installing it on my VPS. But with Vagrant it's a different story. I'm trying with both Base64 and Base32 boxes. This is the command i'm running:
sudo apt-get install -y apache2
It should install apache 2.4.x. But it doesn't. Sometimes it installs version 2.2, sometimes 2.4. This is driving me nuts, since the whole idea of using Vagrant is to have the same Virtual machine replicated everywhere. Any ideas?
Because the Debian based distro (possibly Ubuntu) you're using is still using 2.2.x. Switching to 2.4.x from 2.2.x means all the 3rd party modules they ship have to be upgraded (or at least rebuilt) so they probably haven't made the switch yet.

rvm on live server

I'm using RVM on my development machine for my Ruby on Rails application which works really well. My question is should I (can I) use RVM on my live server for deployment?
I already have the web app up on a live server using Passenger but I have just installed Ruby and all the gems on the system.
Are there any performance issues with RVM and is there much that I would need to do with my Apache web server to get it up and running?
Thanks
Performance of ruby compiled manually and with RVM - should be the same (unless you uses patches like patchexpress or falcon).
You can use RVM for deployment - you can do it together with updating ruby version / patchlevel, it's very important to use the latest patchlevel as it contains important fixes for ruby - including security fixes.
As for integration of RVM compiled Rubies - read the docs: https://rvm.io/integration/passenger/

How can I make RVM to use a local tarball?

My Inet connection is slow. I have downloaded Ruby 1.8.7, 1.9.1 and 1.9.2 on a 32bits machine (with RVM). Now I want to install those same ruby interpreters on my 64bits, but I don't want to download them again. Can I instruct rvm to use a local tarball?
I'm not sure that it's possible to instruct RVM to use a local tarball, but it will use any files present in $rvm_path/archives (e.g. /home/me/.rvm/archives/) instead of downloading them again from the internet.
You should be able to copy these files from one machine to another.