Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save rgarciaj/5930156 to your computer and use it in GitHub Desktop.

Select an option

Save rgarciaj/5930156 to your computer and use it in GitHub Desktop.
# Crear gemset global
rvm gemset create global
rvm use @global
# Instalar Passenger en el gemset global
gem install bundler passenger capistrano hirb wirble
# Configurar Passenger
rvm wrapper ruby-2.0.0-p247@global passenger
passenger-install-apache2-module
# Copiar lineas de configuración de Passenger en el conf de Apache
# Crear gema para el proyecto
rvm gemset create rails4_project
rvm use @rails4_project
# Crear rvmrc en la ruta del proyecto
rvm use 1.9.3-p194@pigliala --rvmrc --create
# Crear archivo config/setub_load_path.rb con este codigo:
if ENV['MY_RUBY_HOME'] && ENV['MY_RUBY_HOME'].include?('rvm')
begin
gems_path = ENV['MY_RUBY_HOME'].split(/@/)[0].sub(/rubies/,'gems')
ENV['GEM_PATH'] = "#{gems_path}:#{gems_path}@rails_last" # Debe ir el nombre de la gema del proyecto
require 'rvm'
RVM.use_from_path! File.dirname(File.dirname(__FILE__))
rescue LoadError
raise "RVM gem is currently unavailable."
end
end
# If you're not using Bundler at all, remove lines bellow
ENV['BUNDLE_GEMFILE'] = File.expand_path('../Gemfile', File.dirname(__FILE__))
require 'bundler/setup'
# Configurar virtualhost
# links
http://everydayrails.com/2010/09/13/rvm-project-gemsets.html
http://edapx.com/2012/10/28/nginx-passenger-rvm-and-multiple-virtual-hosts/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment