Skip to content

Instantly share code, notes, and snippets.

@mpage
Created April 30, 2011 21:08
Show Gist options
  • Save mpage/949995 to your computer and use it in GitHub Desktop.
Save mpage/949995 to your computer and use it in GitHub Desktop.
From 4d05ee7e1a8be2464e12027f3b2687accd4fc7a1 Mon Sep 17 00:00:00 2001
From: mpage <[email protected]>
Date: Sat, 30 Apr 2011 13:50:44 -0700
Subject: [PATCH] Fix runtimes for rails3 staging
---
cloud_controller/staging/rails3/plugin.rb | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/cloud_controller/staging/rails3/plugin.rb b/cloud_controller/staging/rails3/plugin.rb
index 0776a1a..fb569a1 100644
--- a/cloud_controller/staging/rails3/plugin.rb
+++ b/cloud_controller/staging/rails3/plugin.rb
@@ -13,7 +13,7 @@ class Rails3Plugin < StagingPlugin
if uses_bundler?
# Specify Thin if the app bundled it; otherwise let Rails figure it out.
server_script = thin? ? "server thin" : "server"
- "#{local_runtime} #{gem_bin_dir}/bundle exec rails #{server_script} $@"
+ "#{local_runtime} #{gem_bin_dir}/bundle exec #{local_runtime} #{gem_bin_dir}/rails #{server_script} $@"
else
"#{local_runtime} -S thin -R config.ru $@ start"
end
@@ -26,7 +26,7 @@ class Rails3Plugin < StagingPlugin
def migration_command
if uses_bundler?
- "#{local_runtime} #{gem_bin_dir}/bundle exec rake db:migrate --trace"
+ "#{local_runtime} #{gem_bin_dir}/bundle exec #{local_runtime} #{gem_bin_dir}/rake db:migrate --trace"
else
"#{local_runtime} -S rake db:migrate --trace"
end
--
1.7.1
@mpage
Copy link
Author

mpage commented May 2, 2011

If possible, would you be able to include a gist of the startup script generated for your rails app when staged with the ruby18 runtime? You can find this file on the dea at /var/vcap.local/dea/apps/<your app name>-<hash>/startup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment