Skip to content
Browse files

Updated Ruby Enterprise to the latest version. Reorganised ruby enter…

…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...
1 parent 9b69f34 commit 2f9d7bd9c6731b40a42540d886f72dd87c25398a @benschwarz benschwarz committed Jan 18, 2009
View
8 README.markdown
@@ -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
@@ -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
View
3 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
View
BIN config/stack/.DS_Store
Binary file not shown.
View
2 config/stack/mysql.rb
@@ -11,5 +11,5 @@
description 'Ruby MySQL database driver'
gem 'mysql'
- requires :ruby
+ requires :ruby_enterprise
end
View
2 config/stack/postgresql.rb
@@ -11,5 +11,5 @@
description 'Ruby PostgreSQL database driver'
gem 'postgres'
- requires :ruby
+ requires :ruby_enterprise
end
View
29 config/stack/ruby.rb
@@ -1,29 +0,0 @@
-package :ruby do
- description 'Ruby Virtual Machine'
- version '1.8.6'
- source "ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-#{version}-p114.tar.gz"
- requires :ruby_dependencies
-
- verify do
- has_file '/usr/local/bin/ruby'
- end
-end
-
-package :ruby_dependencies do
- description 'Ruby Virtual Machine Build Dependencies'
- apt %w( bison zlib1g-dev libssl-dev libreadline5-dev libncurses5-dev file )
-end
-
-package :rubygems do
- description 'Ruby Gems Package Management System'
- version '1.3.1'
- source "http://rubyforge.org/frs/download.php/45905/rubygems-#{version}.tgz" do
-
- custom_install 'ruby setup.rb'
- end
- requires :ruby
-
- verify do
- has_file '/usr/local/bin/gem'
- end
-end
View
45 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
View
10 config/stack/server.rb
@@ -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"
@@ -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.
Something went wrong with that request. Please try again.