Skip to content

Commit

Permalink
Updated Ruby Enterprise to the latest version. Reorganised ruby enter…
Browse files Browse the repository at this point in the history
…prise install so that it belongs in /usr/local/ruby-enterprise and symlinks binaries from /usr/local/bin. Removed plain old Ruby (no longer required). Updated README to match commit and updated credits
  • Loading branch information
benschwarz committed Jan 18, 2009
1 parent 9b69f34 commit 2f9d7bd
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 75 deletions.
8 changes: 2 additions & 6 deletions README.markdown
Expand Up @@ -27,18 +27,13 @@ Read [these tips](http://github.com/benschwarz/passenger-stack/wikis/my-app-isnt
### Wait, what does all this install?

* Apache (Apt)
* Ruby enterprise (Source) [includes rubygems]
* Ruby Enterprise (Source) [includes rubygems]
* Passenger (Rubygem)
* Memcached (Apt)
* Libmemcached (Source)
* MySQL (Apt) or PostgreSQL (Apt)
* MySQL or PostgreSQL ruby database drivers (Rubygem)
* Git (Apt)
* Ruby 1.8.6*

### Ruby 1.8.6?
Ruby 1.8.6 isn't used within these installation scripts; Ruby Enterprise binaries overwrite the default ruby, rake, and gem binaries so as to not confuse you (by having multiple binaries available)


## Requirements
* Ruby
Expand All @@ -50,6 +45,7 @@ Ruby 1.8.6 isn't used within these installation scripts; Ruby Enterprise binarie

* Marcus Crafter and other Sprinkle contributors
* Slicehost, for giving a free slice for testing passenger stack
* Nathan de Vries for Postgres support

## Disclaimer

Expand Down
3 changes: 2 additions & 1 deletion config/install.rb
@@ -1,9 +1,10 @@
# Require our stack
%w(essential server scm ruby ruby_enterprise memcached postgresql mysql).each do |r|
%w(essential server scm ruby_enterprise memcached postgresql mysql).each do |r|
require File.join(File.dirname(__FILE__), 'stack', r)
end

policy :passenger_stack, :roles => :app do
requires :build_essential
requires :appserver
requires :database
requires :database_driver
Expand Down
Binary file removed config/stack/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion config/stack/mysql.rb
Expand Up @@ -11,5 +11,5 @@
description 'Ruby MySQL database driver'
gem 'mysql'

requires :ruby
requires :ruby_enterprise
end
2 changes: 1 addition & 1 deletion config/stack/postgresql.rb
Expand Up @@ -11,5 +11,5 @@
description 'Ruby PostgreSQL database driver'
gem 'postgres'

requires :ruby
requires :ruby_enterprise
end
29 changes: 0 additions & 29 deletions config/stack/ruby.rb

This file was deleted.

45 changes: 13 additions & 32 deletions config/stack/ruby_enterprise.rb
@@ -1,44 +1,25 @@
package :ruby_enterprise do
description 'Ruby Enterprise Edition'
version '1.8.6-20081215'
source "http://rubyforge.org/frs/download.php/48623/ruby-enterprise-#{version}.tar.gz" do
custom_install 'echo -en "\n\n\n\n" | sudo ./installer'

# Modify the passenger conf file to point to REE
post :install, 'sed -i "s|^PassengerRuby [/a-zA-Z0-9.]*$|PassengerRuby /opt/ruby-enterprise-1.8.6-20081215/bin/ruby|" /etc/apache2/extras/passenger.conf'
version '1.8.6-20090113'

# Restart apache
post :install, '/etc/init.d/apache2 restart'

# Remove standard ruby binaries
post :install, 'rm /usr/local/bin/ruby'
post :install, 'rm /usr/local/bin/gem'
post :install, 'rm /usr/local/bin/rake'

# Symlink ruby enterprise binaries
%w(ruby gem rake rails).each do |bin|
post :install, "ln -s /opt/ruby-enterprise-#{version}/bin/#{bin} /usr/local/bin/"
end
install_path = "/usr/local/ruby-enterprise"
binaries = %w(erb gem irb passenger-config passenger-install-apache2-module passenger-make-enterprisey passenger-memory-stats passenger-spawn-server passenger-status passenger-stress-test rackup rails rake rdoc ree-version ri ruby testrb)

source "http://rubyforge.org/frs/download.php/50087/ruby-enterprise-#{version}.tar.gz" do
custom_install 'echo -en "\n/usr/local/ruby-enterprise\n" | sudo ./installer'

# Symlink for other binaries
#post :install "sudo ln -s /opt/ruby-enterprise-#{version}/bin/ /usr/local/bin/RE-binaries"
binaries.each {|bin| post :install, "ln -s #{install_path}/bin/#{bin} /usr/local/bin/#{bin}" }
end

verify do
has_directory "/opt/ruby-enterprise-#{version}"
has_executable "/opt/ruby-enterprise-#{version}/bin/ruby"
has_directory install_path
has_executable "#{install_path}/bin/ruby"
binaries.each {|bin| has_symlink "/usr/local/bin/#{bin}", "#{install_path}/bin/#{bin}" }
end

requires :apache
requires :passenger
requires :zlib
requires :openssl
end

package :zlib do
apt "zlib1g-dev"
requires :build_essential, :apache, :ree_dependencies
end

package :openssl do
apt "libssl-dev"
package :ree_dependencies do
apt %w(zlib1g-dev libreadline5-dev libssl-dev)
end
10 changes: 5 additions & 5 deletions config/stack/server.rb
Expand Up @@ -24,8 +24,8 @@
post :install, 'touch /etc/apache2/extras/passenger.conf'
post :install, 'echo "Include /etc/apache2/extras/passenger.conf"|sudo tee -a /etc/apache2/apache2.conf'

[%q(LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-2.0.6/ext/apache2/mod_passenger.so),
%q(PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-2.0.6),
[%q(LoadModule passenger_module /usr/local/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-2.0.6/ext/apache2/mod_passenger.so),
%q(PassengerRoot /usr/local/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-2.0.6),
%q(PassengerRuby /usr/local/bin/ruby),
%q(RailsEnv production)].each do |line|
post :install, "echo '#{line}' |sudo tee -a /etc/apache2/extras/passenger.conf"
Expand All @@ -37,11 +37,11 @@

verify do
has_file '/etc/apache2/extras/passenger.conf'
has_file '/usr/local/lib/ruby/gems/1.8/gems/passenger-2.0.6/ext/apache2/mod_passenger.so'
has_directory '/usr/local/lib/ruby/gems/1.8/gems/passenger-2.0.6'
has_file '/usr/local/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-2.0.6/ext/apache2/mod_passenger.so'
has_directory '/usr/local/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-2.0.6'
end

requires :apache
requires :apache2_prefork_dev
requires :ruby
requires :ruby_enterprise
end

0 comments on commit 2f9d7bd

Please sign in to comment.