Error: Missing Rvm Environment File After Doing Rvm Upgrade Command - Passenger 4.0.23

Issue with Phusion Passenger handling multiple projects with multiple RVM rubies

Go to the project directory and run the below commands one by one:

rvm use ruby-1.8.7-p374
gem install bundler passenger
rvm passenger-install-apache2-module

This will install passenger along with Apache module, mean while you will be asked to add some configuration changes to /etc/apache2/apache2.conf and do it as such.

Create a file in /etc/apache2/sites-available/ for your site (something like 'www.virtualx.com') and insert this:

<VirtualHost *>
# Change these 3 lines to suit your project
RailsEnv production
ServerName www.virtualx.com
DocumentRoot /var/www/my_project/public # Note the 'public' directory
</VirtualHost>

and set the PassengerRuby option to ruby-1.8.7-p374.

Restart Apache service. You are all done.

Now it will work ok.

If you need multiple ruby versions working simultaneously for different projects, then refer here.

Hope it helps :)

How do I upgrade RVM when the official way doesn't work?

Install RVM from scratch

1) First remove the current version, see: https://stackoverflow.com/a/3558763/1076207

# use sudo at your own discretion
rvm implode --force
gem uninstall rvm
rm -rf ~/.rvm

# open file
vim ~/.bash_profile
# remove lines:
# [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
# close file

2) Follow the directions on the RVM install page: https://rvm.io/rvm/install

RVM - Automatically use a certain Ruby version for a given command?

rvm generates wrappers for you:

rvm wrapper 2.0.0 --no-prefix knife
rvm wrapper 1.9.2 --no-prefix sup

assuming you do not install this gems in all rubies the default from $rvm_path/bin/ will be used with loading proper ruby.

Wrong src-uri in rails app using font-awesome

I posted this after many hours of trying to resolve it and solved my own issue about five minutes later. Including the answer here for others that might find this:

It looks like I was using ENV['RAILS_RELATIVE_URL_ROOT'] improperly.

When I moved it to my asset precompile line like so:

RAILS_RELATIVE_URL_ROOT='/vns' rake assets:precompile

everything came out as expected. I'm not familiar enough with Rails to know what I was doing wrong or if there is a better way to solve this issue but this is fixes it for me.



Related Topics



Leave a reply



Submit